Skip to content

docs(cli): document agent / CI usage for deno deploy and deno sandbox#3180

Open
crowlbot wants to merge 3 commits into
mainfrom
agent-cli-usage
Open

docs(cli): document agent / CI usage for deno deploy and deno sandbox#3180
crowlbot wants to merge 3 commits into
mainfrom
agent-cli-usage

Conversation

@crowlbot
Copy link
Copy Markdown

@crowlbot crowlbot commented Jun 1, 2026

Summary

Documents the conventions that make deno deploy and deno sandbox reliable to drive from CI pipelines and AI agents (Claude Code, Cursor, etc.) without a human at the terminal. These conventions already exist in the CLI as of @deno/deploy 0.0.99 (see denoland/deploy-cli #91-#95) but are not yet documented anywhere users can find them.

Two files touched:

  • runtime/reference/cli/deploy.md — adds a dedicated Agent / CI usage section, and fills out the previously incomplete Global options section.
  • runtime/reference/cli/sandbox.md — adds --json / --non-interactive / --quiet / --debug / --endpoint to its Global options list and cross-links the new section.

What's in the new section

  • Token authentication — env var (DENO_DEPLOY_TOKEN), --token flag, keychain priority order; the "never opens a browser" guarantee when a token is supplied explicitly. (Expanded the existing Authentication section.)
  • Global flags reference--json, --non-interactive (-y), --quiet (-q), --debug, --token, --endpoint, --config, --ignore. Previously the page only listed --help, --org, --app, --prod and conflated root-command options with truly global ones.
  • Exit codes (0 OK, 1 GENERIC, 2 USAGE, 3 AUTH, 4 NOT_FOUND, 5 CONFLICT, 6 NETWORK).
  • Structured error envelope on stderr in --json mode (code, message, hint, traceId).
  • Stdio discipline — stdout = result, stderr = progress/errors.
  • Required flags under --non-interactive — per-subcommand table.
  • JSON output schemas for whoami, orgs list, apps list, deployments list, env list, database list, database query, publish, create (both --dry-run and GitHub source), logs (NDJSON).
  • Examples — 7 copy-pasteable agent flows.

Background

This content originally landed (incorrectly) as AGENTS.md in denoland/deploy-cli #96. That repo is invisible to people running deno deploy; the canonical home is the CLI reference page here. The deploy-cli PR is being closed in favor of this one (plus a small companion PR to the deploy-cli that expands deno deploy --help itself).

Test plan

CI (deno fmt --check + Lume build + link checker) covers this PR. No code paths touched.

crowlbot added 2 commits June 1, 2026 15:58
Adds a dedicated 'Agent / CI usage' section to the deno deploy CLI
reference covering the conventions that make non-interactive use
reliable: token discovery order, the global --json / --non-interactive /
--quiet / --debug / --token / --endpoint / --config flags, exit-code
taxonomy (0/1/2/3/4/5/6), the structured error envelope on stderr in
--json mode, the per-subcommand JSON output schemas, the
non-interactive flag coverage table, stdio discipline, and copy-pasteable
examples.

Also fills out the previously incomplete 'Global options' (most global
flags were undocumented) and splits root-command options from globals.
Cross-links the same conventions from the deno sandbox CLI reference.
The standalone deno sandbox command does not expose --json /
--non-interactive at the moment, and sandbox subcommands do not emit
JSON. Stop claiming they do; note the gap as future work.
Rewrap paragraphs and table column widths to match deno fmt output.
Switch the NDJSON logs example from a json fence to a text fence so
the single-record-per-line shape is preserved (fmt pretty-prints any
json block).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant