From be618e96c66eeb4b6ad66f2e4cb93ba5902c6383 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 4 Feb 2026 16:11:55 -0800 Subject: [PATCH 1/2] add tunnel param to devbox create --- src/commands/devbox/create.ts | 15 +++++++++++++++ src/utils/commands.ts | 1 + 2 files changed, 16 insertions(+) diff --git a/src/commands/devbox/create.ts b/src/commands/devbox/create.ts index 5ceb9e56..741ce5e0 100644 --- a/src/commands/devbox/create.ts +++ b/src/commands/devbox/create.ts @@ -23,6 +23,7 @@ interface CreateOptions { root?: boolean; user?: string; networkPolicy?: string; + tunnel?: string; output?: string; } @@ -99,6 +100,13 @@ export async function createDevbox(options: CreateOptions = {}) { ); } + // Validate tunnel option + if (options.tunnel && !["open", "authenticated"].includes(options.tunnel)) { + outputError( + "Invalid tunnel mode. Must be either 'open' or 'authenticated'", + ); + } + // Build launch parameters const launchParameters: Record = {}; if (options.resources) { @@ -173,6 +181,13 @@ export async function createDevbox(options: CreateOptions = {}) { createRequest.secrets = parseSecrets(options.secrets); } + // Handle tunnel configuration + if (options.tunnel) { + createRequest.tunnel = { + auth_mode: options.tunnel, + }; + } + if (Object.keys(launchParameters).length > 0) { createRequest.launch_parameters = launchParameters; } diff --git a/src/utils/commands.ts b/src/utils/commands.ts index ac38e56d..d1217d46 100644 --- a/src/utils/commands.ts +++ b/src/utils/commands.ts @@ -59,6 +59,7 @@ export function createProgram(): Command { .option("--root", "Run as root") .option("--user ", "Run as this user (format: username:uid)") .option("--network-policy ", "Network policy ID to apply") + .option("--tunnel ", "Tunnel authentication mode (open, authenticated)") .option( "-o, --output [format]", "Output format: text|json|yaml (default: text)", From f3d79df152c67682cdbf1c5e40de7c0e6fb18ed5 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 4 Feb 2026 16:12:12 -0800 Subject: [PATCH 2/2] cp --- src/utils/commands.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/commands.ts b/src/utils/commands.ts index d1217d46..6f989d67 100644 --- a/src/utils/commands.ts +++ b/src/utils/commands.ts @@ -59,7 +59,10 @@ export function createProgram(): Command { .option("--root", "Run as root") .option("--user ", "Run as this user (format: username:uid)") .option("--network-policy ", "Network policy ID to apply") - .option("--tunnel ", "Tunnel authentication mode (open, authenticated)") + .option( + "--tunnel ", + "Tunnel authentication mode (open, authenticated)", + ) .option( "-o, --output [format]", "Output format: text|json|yaml (default: text)",