-
Notifications
You must be signed in to change notification settings - Fork 459
feat: improve agent/CI ergonomics — capabilities command, non-interactive mode, JSON error envelopes, exit-code contract #8300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3ad2bca
f6caa7b
1bd8005
e5480ba
8b223e1
16858e8
14b3fdd
94f7132
a5097fc
800ea49
ecc0437
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| title: Netlify CLI capabilities command | ||
| sidebar: | ||
| label: capabilities | ||
| --- | ||
|
|
||
| # `capabilities` | ||
|
|
||
| The `capabilities` command prints a machine-readable JSON manifest describing the CLI itself: every command and its flags, which commands support `--json`, the exit-code dictionary, relevant environment variables, and config file locations. It is intended for scripts and AI agents that need to discover the CLI's surface without scraping `--help` output. | ||
|
Check warning on line 9 in docs/commands/capabilities.md
|
||
|
|
||
| <!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_DOCS) --> | ||
| Print a machine-readable manifest of every command, its flags, exit codes, env vars, and config files | ||
|
Check warning on line 12 in docs/commands/capabilities.md
|
||
| Intended for scripts and AI agents. Output is always JSON on stdout. | ||
|
Check warning on line 13 in docs/commands/capabilities.md
|
||
|
|
||
| **Usage** | ||
|
|
||
| ```bash | ||
| netlify capabilities | ||
| ``` | ||
|
|
||
| **Flags** | ||
|
|
||
| - `json` (*boolean*) - Output capabilities as JSON (the default; this command always outputs JSON) | ||
| - `debug` (*boolean*) - Print debugging information | ||
| - `auth` (*string*) - Netlify auth token - can be used to run this command without logging in | ||
|
|
||
| **Examples** | ||
|
|
||
| ```bash | ||
| netlify capabilities | ||
| netlify capabilities --json | ||
| ``` | ||
|
|
||
|
|
||
| <!-- AUTO-GENERATED-CONTENT:END --> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: netlify/cli
Length of output: 245
🏁 Script executed:
Repository: netlify/cli
Length of output: 98
🏁 Script executed:
Repository: netlify/cli
Length of output: 2933
🏁 Script executed:
Repository: netlify/cli
Length of output: 5169
🏁 Script executed:
Repository: netlify/cli
Length of output: 2267
Guard against unchecked
methodsshape when building the “missing path variable” message@netlify/apitypesmethodsasany[], so the cast to{ operationId: string; parameters: { path?: Record<string, unknown> } }[]is unchecked and can fail at runtime if the element shape differs. Add runtime guards/safe access before readingoperationIdandparameters.path(or extract via a small helper type-guard) so this error-path doesn’t crash.🤖 Prompt for AI Agents