Skip to content

Commit 26a4736

Browse files
committed
feat(help): mention agent / CI conventions in root --help
Expand the deno deploy root description so deno deploy --help itself points users at DENO_DEPLOY_TOKEN, --json + --non-interactive, the exit code taxonomy, and the canonical reference page on docs.deno.com. Add three .example() entries to the deploy command for the most common agent flows: whoami, non-interactive publish, non-interactive create. For deno sandbox, the standalone command does not yet wire up --json / --non-interactive globally, so the description only documents the DENO_DEPLOY_TOKEN escape hatch and points at the docs reference.
1 parent f29d034 commit 26a4736

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

deploy/mod.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,27 @@ export const deployCommand = new Command()
300300
.description(`Interact with Deno Deploy
301301
302302
Calling this subcommand without any further subcommands will
303-
deploy your local directory to the specified application.`)
303+
deploy your local directory to the specified application.
304+
305+
For non-interactive use (CI, AI agents), authenticate via the
306+
DENO_DEPLOY_TOKEN env var (or --token) and pass --json --non-interactive
307+
to every subcommand. The CLI then emits a single JSON object on stdout,
308+
a structured { error: { code, message, hint } } envelope on stderr,
309+
and a stable exit code (0 OK, 1 GENERIC, 2 USAGE, 3 AUTH, 4 NOT_FOUND,
310+
5 CONFLICT, 6 NETWORK). See https://docs.deno.com/runtime/reference/cli/deploy/#agent--ci-usage
311+
for the full reference.`)
312+
.example(
313+
"Verify the active token",
314+
"whoami --json",
315+
)
316+
.example(
317+
"Deploy current directory non-interactively",
318+
"--json --non-interactive --org my-org --app my-app --prod",
319+
)
320+
.example(
321+
"Create a static app from CI",
322+
"create --json --non-interactive --org my-org --app my-app --source local --runtime-mode static --static-dir dist --region us",
323+
)
304324
.globalOption("--endpoint <endpoint:string>", "the endpoint", {
305325
default: "https://console.deno.com",
306326
hidden: true,

sandbox/mod.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,12 @@ Example:
590590
export const sandboxCommand = new Command<GlobalContext>()
591591
.name("deno sandbox")
592592
.version(VERSION)
593-
.description("Interact with sandboxes")
593+
.description(`Interact with sandboxes
594+
595+
For headless / CI use, authenticate via the DENO_DEPLOY_TOKEN env var
596+
(or --token) — no browser flow is opened when a token is supplied.
597+
See https://docs.deno.com/runtime/reference/cli/sandbox/ for the
598+
full reference.`)
594599
.globalOption("--endpoint <endpoint:string>", "the endpoint", {
595600
default: "https://console.deno.com",
596601
hidden: true,

0 commit comments

Comments
 (0)