Skip to content

Commit 0a1fc7a

Browse files
committed
docs(cli): apply deno fmt normalization
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).
1 parent 977c1ce commit 0a1fc7a

2 files changed

Lines changed: 35 additions & 37 deletions

File tree

runtime/reference/cli/deploy.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ platform for hosting JavaScript, TypeScript, and WebAssembly applications.
1414
When called without any subcommands, `deno deploy` will deploy your local
1515
directory to the specified application.
1616

17-
If you are scripting `deno deploy` from CI or driving it from an AI agent
18-
rather than running it interactively, jump to
19-
[Agent / CI usage](#agent--ci-usage) for non-interactive auth, structured
20-
output, and exit-code conventions.
17+
If you are scripting `deno deploy` from CI or driving it from an AI agent rather
18+
than running it interactively, jump to [Agent / CI usage](#agent--ci-usage) for
19+
non-interactive auth, structured output, and exit-code conventions.
2120

2221
## Authentication
2322

24-
The deploy command supports three ways to authenticate, checked in this
25-
order:
23+
The deploy command supports three ways to authenticate, checked in this order:
2624

2725
1. **`--token <token>` flag** - Useful for one-off scripted calls.
2826
2. **`DENO_DEPLOY_TOKEN` environment variable** - The recommended way to
@@ -602,20 +600,21 @@ prompting, structured output, exit codes, and per-command JSON shapes.
602600

603601
For the global flags themselves, see [Global options](#global-options).
604602
`--non-interactive` and `--json` are independent. The recommended agent
605-
invocation combines both: `deno deploy <subcommand> --json --non-interactive
603+
invocation combines both:
604+
`deno deploy <subcommand> --json --non-interactive
606605
<...>`.
607606

608607
### Exit codes
609608

610-
| Code | Name | Meaning |
611-
| ---- | ----------- | -------------------------------------------------------------------------------------- |
612-
| `0` | `OK` | Success. |
613-
| `1` | `GENERIC` | Unclassified failure. |
614-
| `2` | `USAGE` | Bad flag, missing required value, or `--non-interactive` short-circuit. |
615-
| `3` | `AUTH` | Token missing, invalid, expired, or rejected by the backend. |
616-
| `4` | `NOT_FOUND` | The targeted org / app / database / revision doesn't exist or isn't reachable. |
617-
| `5` | `CONFLICT` | A resource with the supplied name already exists (idempotent re-runs return this). |
618-
| `6` | `NETWORK` | Backend 5xx, transport failure, or unreachable endpoint. |
609+
| Code | Name | Meaning |
610+
| ---- | ----------- | ---------------------------------------------------------------------------------- |
611+
| `0` | `OK` | Success. |
612+
| `1` | `GENERIC` | Unclassified failure. |
613+
| `2` | `USAGE` | Bad flag, missing required value, or `--non-interactive` short-circuit. |
614+
| `3` | `AUTH` | Token missing, invalid, expired, or rejected by the backend. |
615+
| `4` | `NOT_FOUND` | The targeted org / app / database / revision doesn't exist or isn't reachable. |
616+
| `5` | `CONFLICT` | A resource with the supplied name already exists (idempotent re-runs return this). |
617+
| `6` | `NETWORK` | Backend 5xx, transport failure, or unreachable endpoint. |
619618

620619
Agents should pattern-match on the exit code first, then parse stderr if
621620
non-zero.
@@ -642,8 +641,8 @@ Fields:
642641
`POSTGRES_ERROR`. Agents should treat unknown codes as opaque.
643642
- `message` - Human-readable description.
644643
- `hint` - Optional. Suggests a concrete next step.
645-
- `traceId` - Optional. Server-side trace identifier from the
646-
`x-deno-trace-id` response header. Useful for bug reports.
644+
- `traceId` - Optional. Server-side trace identifier from the `x-deno-trace-id`
645+
response header. Useful for bug reports.
647646

648647
Human-mode errors go to stderr too but without the JSON envelope.
649648

@@ -652,9 +651,8 @@ Human-mode errors go to stderr too but without the JSON envelope.
652651
- **stdout** carries the result of the command. In `--json` mode this is a
653652
single object or array (NDJSON for streaming commands like `logs`). In human
654653
mode it is the formatted table / URL / etc.
655-
- **stderr** carries human progress, prompts, and the structured error
656-
envelope. `--quiet` suppresses progress but keeps the final result on
657-
stdout.
654+
- **stderr** carries human progress, prompts, and the structured error envelope.
655+
`--quiet` suppresses progress but keeps the final result on stdout.
658656

659657
This lets you pipe cleanly:
660658

@@ -666,8 +664,8 @@ deno deploy env list --json | jq '.[] | select(.isSecret == false)'
666664

667665
### Required flags under `--non-interactive`
668666

669-
When a required flag is missing in `--non-interactive` mode, the CLI exits
670-
`2` (`USAGE`) with an error envelope naming the missing flag.
667+
When a required flag is missing in `--non-interactive` mode, the CLI exits `2`
668+
(`USAGE`) with an error envelope naming the missing flag.
671669

672670
| Subcommand | Required flags |
673671
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
@@ -685,8 +683,8 @@ When a required flag is missing in `--non-interactive` mode, the CLI exits
685683

686684
### JSON output schemas
687685

688-
These shapes are stable; new fields may be added but existing fields will not
689-
be removed without a version bump.
686+
These shapes are stable; new fields may be added but existing fields will not be
687+
removed without a version bump.
690688

691689
#### `deno deploy whoami --json`
692690

@@ -855,10 +853,10 @@ envelope instead.
855853

856854
#### `deno deploy logs --json`
857855

858-
NDJSON, one record per line on stdout:
856+
NDJSON, one record per line on stdout (shown here line-wrapped for readability):
859857

860-
```json
861-
{"timestamp":"2026-05-12T14:40:00.000Z","traceId":"...","spanId":"...","severity":"INFO","severityNumber":9,"body":"hello","scope":"app","revision":"rev_...","attributes":{}}
858+
```text
859+
{"timestamp":"...","traceId":"...","spanId":"...","severity":"INFO","severityNumber":9,"body":"hello","scope":"app","revision":"rev_...","attributes":{}}
862860
```
863861

864862
### Examples
@@ -923,14 +921,14 @@ deno deploy setup-aws --json --non-interactive \
923921
--role-name DenoDeploy-myorg-my-app
924922
```
925923

926-
The fixed `--role-name` makes the operation idempotent: re-running with the
927-
same name surfaces `SLUG_ALREADY_IN_USE` (exit `5`, `CONFLICT`) rather than
928-
silently creating a second resource with a random suffix.
924+
The fixed `--role-name` makes the operation idempotent: re-running with the same
925+
name surfaces `SLUG_ALREADY_IN_USE` (exit `5`, `CONFLICT`) rather than silently
926+
creating a second resource with a random suffix.
929927

930928
### Compatibility
931929

932-
- JSON shapes are additive: new fields may be added but existing fields will
933-
not be removed without a version bump. Agents should ignore unknown fields.
930+
- JSON shapes are additive: new fields may be added but existing fields will not
931+
be removed without a version bump. Agents should ignore unknown fields.
934932
- Exit-code values and `error.code` strings are stable; new values may be
935933
introduced.
936934
- The flag set is stable; new flags may be added but existing ones will not be

runtime/reference/cli/sandbox.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ discovery order is identical to `deno deploy`; see
3636
The standalone `deno sandbox` command does not currently expose the global
3737
`--json` / `--non-interactive` flags that `deno deploy` does, and sandbox
3838
subcommands emit human-formatted output. Structured output and fail-fast
39-
prompting for sandbox operations are tracked as future work; until then,
40-
use `--token` for headless auth and parse stdout as plain text.
39+
prompting for sandbox operations are tracked as future work; until then, use
40+
`--token` for headless auth and parse stdout as plain text.
4141

42-
For background on the exit-code taxonomy and structured error envelope
43-
shared with `deno deploy`, see
42+
For background on the exit-code taxonomy and structured error envelope shared
43+
with `deno deploy`, see
4444
[deno deploy → Agent / CI usage](/runtime/reference/cli/deploy/#agent--ci-usage).
4545

4646
## Subcommands

0 commit comments

Comments
 (0)