The Open Framework for Building Agents
feat(eve): add scaffold-only init (#3596)
Colton Paddend98edb250f91
diff --git a/.changeset/scaffold-only-init.md b/.changeset/scaffold-only-init.mdnew file mode 100644index 000000000..20038790e--- /dev/null+++ b/.changeset/scaffold-only-init.md@@ -0,0 +1,5 @@+---+"eve": patch+---++Add `eve init --non-interactive` to scaffold and install an agent without opening the development TUI.diff --git a/docs/reference/cli.md b/docs/reference/cli.mdindex afff820b6..6a9d5455e 100644--- a/docs/reference/cli.md+++ b/docs/reference/cli.md@@ -42,7 +42,7 @@ eve collects CLI telemetry by default to improve the command-line interface. Run## `eve init````bash-eve init [target] [--model <provider/model-id>] [--reasoning <effort>] [--channel-web-nextjs]+eve init [target] [--model <provider/model-id>] [--reasoning <effort>] [--channel-web-nextjs] [--non-interactive]```Creates a new agent app or adds an agent to an existing app. Always installs dependencies. New directories also initialize Git.@@ -57,13 +57,14 @@ Creates a new agent app or adds an agent to an existing app. Always installs depExisting packages do not need a target-selection prompt: run `eve init` from the project directory or `eve init path/to/app`. New projects in non-interactive environments need a new directory name, such as `eve init my-agent`.-After scaffolding in an interactive human terminal, eve opens the TUI directly. Noninteractive and coding-agent invocations return without starting an interactive session. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.+After scaffolding in an interactive human terminal, eve opens the TUI directly. Pass `-n` or `--non-interactive` to return after scaffolding instead. It still installs dependencies and follows the normal Git setup behavior. Noninteractive and coding-agent invocations return without starting an interactive session. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.-| Flag | Type | Default | Description |-| ---------------------- | ------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------ |-| `--model <model>` | string | `spacexai/grok-4.7` | Set the root agent's AI Gateway model ID. |-| `--reasoning <effort>` | enum | provider default | Set reasoning to `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. `provider-default` leaves the field unauthored. |-| `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |+| Flag | Type | Default | Description |+| ----------------------- | ------ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------ |+| `--model <model>` | string | `openai/gpt-5.6-luna-fast` | Set the root agent's AI Gateway model ID. |+| `--reasoning <effort>` | enum | provider default | Set reasoning to `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. `provider-default` leaves the field unauthored. |+| `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |+| `-n, --non-interactive` | flag | off | Scaffold and install dependencies without starting development. |## `eve extension`diff --git a/packages/eve/src/cli/commands/init-agent-workspace.ts b/packages/eve/src/cli/commands/init-agent-workspace.tsindex a6fefba31..23a6870a5 100644--- a/packages/eve/src/cli/commands/init-agent-workspace.ts+++ b/packages/eve/src/cli/commands/init-agent-workspace.ts@@ -22,6 +22,8 @@ export interface InitCommandOptions {channelWebNextjs?: boolean;model?: string;reasoning?: AgentReasoningDefinition;+ /** Do not start development after initialization. */+ nonInteractive?: boolean;}export interface InitCliLogger {diff --git a/packages/eve/src/cli/commands/init.integration.test.ts b/packages/eve/src/cli/commands/init.integration.test.tsindex 62962ed5f..1fd84e612 100644--- a/packages/eve/src/cli/commands/init.integration.test.ts+++ b/packages/eve/src/cli/commands/init.integration.test.ts@@ -360,6 +360,17 @@ describe("runInitCommand", () => {expect(deps.runPackageManagerInstall).toHaveBeenCalled();});+ it("scaffolds without starting development when non-interactive", async () => {+ const parentDirectory = await mkdtemp(join(tmpdir(), "eve-init-non-interactive-"));+ const output = logger();+ const deps = dependencies();++ await runInitCommand(output, parentDirectory, "agent", { nonInteractive: true }, deps);++ expect(deps.spawnPackageManager).not.toHaveBeenCalled();+ expect(output.messages.join("\n")).toContain("pnpm exec eve dev --no-ui");+ });+it("creates an agent workspace from comma-separated names", async () => {const parentDirectory = await mkdtemp(join(tmpdir(), "eve-init-agents-"));const output = logger();diff --git a/packages/eve/src/cli/commands/init.ts b/packages/eve/src/cli/commands/init.tsindex cb251bd72..a8e27c0b1 100644--- a/packages/eve/src/cli/commands/init.ts+++ b/packages/eve/src/cli/commands/init.ts@@ -590,7 +590,7 @@ export async function runInitCommand(return;}- if (!interactive) {+ if (options.nonInteractive || !interactive) {logger.log(agentHandoff);return;}diff --git a/packages/eve/src/cli/run.test.ts b/packages/eve/src/cli/run.test.tsindex 219a1a846..e6922dec8 100644--- a/packages/eve/src/cli/run.test.ts+++ b/packages/eve/src/cli/run.test.ts@@ -382,6 +382,7 @@ describe("eve init compatibility flags", () => {expect(help).toContain("-y, --yes");expect(help).toContain("--model <model>");expect(help).toContain("--reasoning <effort>");+ expect(help).toContain("-n, --non-interactive");});it("does not print the boot banner because interactive onboarding owns its header", async () => {@@ -410,6 +411,30 @@ describe("eve init compatibility flags", () => {channelWebNextjs: undefined,model: "openai/gpt-5.6-sol",reasoning: "high",+ nonInteractive: undefined,+ },+ undefined,+ expect.any(Function),+ expect.any(Function),+ );+ });++ it("forwards -n to the init command", async () => {+ const logger = { error: vi.fn(), log: vi.fn() };+ runInitCommand.mockClear();++ await runCli(["init", "my-agent", "-n"], logger);++ expect(runInitCommand).toHaveBeenCalledWith(+ logger,+ resolve(process.cwd()),+ "my-agent",+ {+ agents: undefined,+ channelWebNextjs: undefined,+ model: undefined,+ reasoning: undefined,+ nonInteractive: true,},undefined,expect.any(Function),diff --git a/packages/eve/src/cli/run.ts b/packages/eve/src/cli/run.tsindex 7b8dc8600..aba86f945 100644--- a/packages/eve/src/cli/run.ts+++ b/packages/eve/src/cli/run.ts@@ -196,6 +196,7 @@ export function createCliProgram(parseAgentNamesOption,).option("--model <model>", "Set the agent model (provider/model-id)")+ .option("-n, --non-interactive", "Scaffold the agent without starting development").option("--reasoning <effort>","Set reasoning (provider-default|none|minimal|low|medium|high|xhigh)",@@ -210,6 +211,7 @@ export function createCliProgram(channelWebNextjs?: boolean;model?: string;reasoning?: AgentReasoningDefinition;+ nonInteractive?: boolean;yes?: boolean;},) => {@@ -227,6 +229,7 @@ export function createCliProgram(channelWebNextjs: options.channelWebNextjs,model: options.model,reasoning: options.reasoning,+ nonInteractive: options.nonInteractive,},undefined,(step) => {