The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 23:30 UTC
fix(server): t3 serve no longer offers --auto-bootstrap-project-from-cwd (#34227)
Julius Marminge committed
Nov 11, 2026 at 10:57 UTC
2dfbad7381bf3521c03e1757602273c9be5efe04
2 files changed
+21
-5
apps/server/src/cli/app.test.ts
+10
@@ -17,6 +17,7 @@ import * as ConfigProvider from "effect/ConfigProvider";
17
import * as Effect from "effect/Effect";
18
import * as Layer from "effect/Layer";
19
import * as Schema from "effect/Schema";
20
+import * as TestConsole from "effect/testing/TestConsole";
21
import { Command } from "effect/cli";
22
import { describe, expect } from "vite-plus/test";
23
@@ -180,6 +181,15 @@ describe("t3 server command safety", () => {
181
),
182
);
183
184
+ it.effect("does not offer auto-bootstrap in serve help, since serve never bootstraps", () =>
185
+ Effect.gen(function* () {
186
+ yield* runCli(["serve", "--help"]);
187
+ const help = (yield* TestConsole.logLines).join("\n");
188
+ expect(help).toContain("--no-browser");
189
+ expect(help).not.toContain("--auto-bootstrap-project-from-cwd");
190
+ }).pipe(Effect.provide(Layer.fresh(TestConsole.layer))),
191
+ );
192
+
193
it.effect("refuses manual startup over a live server before creating directories", () =>
194
withTempDirectory("t3-cli-running-", (root) =>
195
Effect.gen(function* () {
apps/server/src/cli/server.ts
+11
-5
@@ -87,15 +87,21 @@ export const startCommand = Command.make("start", { ...sharedServerCommandFlags
87
Command.withHandler((flags) => runServerCommand(flags, { rejectRunningServer: true })),
88
);
89
90
-export const serveCommand = Command.make("serve", { ...sharedServerCommandFlags }).pipe(
90
+// Serve never bootstraps a project, so it does not offer the flag that asks for one.
91
+const { autoBootstrapProjectFromCwd: _, ...serveCommandFlags } = sharedServerCommandFlags;
92
+
93
+export const serveCommand = Command.make("serve", serveCommandFlags).pipe(
94
Command.withShortDescription("Run T3 Code in this terminal, with no browser."),
95
Command.withDescription(
96
"Run T3 Code in this terminal without opening a browser, and print pairing details. The background service runs this. To set up access from your other devices, run `t3 up`.",
97
),
98
Command.withHandler((flags) =>
96
- runServerCommand(flags, {
97
- startupPresentation: "headless",
98
- forceAutoBootstrapProjectFromCwd: false,
99
- }),
99
+ runServerCommand(
100
+ { ...flags, autoBootstrapProjectFromCwd: Option.none() },
101
+ {
102
+ startupPresentation: "headless",
103
+ forceAutoBootstrapProjectFromCwd: false,
104
+ },
105
+ ),
106
),
107
);