You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI polish: help layout, security confirmations, error copy, ID value names, login onboarding (DX-5694) (#31)
* Group -h/--help and -V/--version under Global options (DX-5694)
The auto-generated help/version flags rendered under a lone "Options"
heading on every help screen, separate from the real global flags.
Disable clap's built-ins and re-declare them as global args so they
list with the rest of the globals. Behavior is unchanged: -h prints
the summary, --help the long form, and -V works on subcommands via
propagate_version.
* Gate all endpoint security removes behind confirmation (DX-5694)
Only 'security token delete' asked for confirmation; the other six
remove verbs (referrer, ip, jwt, domain-mask, request-filter,
ip-header) deleted protection rules immediately. All now use the mild
confirmation: --yes skips, a TTY prompts, and non-TTY without --yes
exits 5 before any request is sent. Prompts name the resource and
endpoint.
Adds 12 tests (with/without --yes per command, the latter asserting
zero requests reach the mock).
* Soften the 5xx error message (DX-5694)
"Quicknode API is having issues" assigned blame for what can be a
transient failure. Replace with a neutral message that keeps the HTTP
code for debugging and points at support:
"something went wrong (HTTP {code}). Please try again; if the problem
persists, contact support at https://support.quicknode.com."
* Use resource-specific value names for positional ids (DX-5694)
Bare 'id' positionals rendered as a generic <ID> in usage lines.
Every id positional now declares value_name — <ENDPOINT_ID>,
<STREAM_ID>, <WEBHOOK_ID>, <TEAM_ID> — so 'qn endpoint show --help'
reads 'Usage: qn endpoint show [OPTIONS] <ENDPOINT_ID>'. Multi-word
fields (referrer_id, tag_id, …) already rendered descriptively.
Documents the convention in CLAUDE.md.
* Add onboarding preamble to interactive 'qn auth login' (DX-5694)
The command jumped straight to a hidden key prompt with no context.
Interactive logins now print a short welcome on stderr explaining that
an API key is needed, where it will be stored, and where to get one
(dashboard.quicknode.com/api-keys, quicknode.com/signup). Suppressed
by --quiet; not shown when --api-key is passed.
* Accept true/false for --fix-block-reorgs (DX-5694)
The flag took a raw 0/1 integer. It now parses as a bool via clap's
BoolishValueParser, so the documented form is true/false while 0/1
(and yes/no) keep working. The value still maps to the integer the
streams API expects.
* Reword usage --to help text (DX-5694)
"Omit for now." read as a temporary instruction rather than
"defaults to the current time". Now: "End time. Defaults to now."
* Make 'list' the primary verb for kv listings (DX-5694)
'qn kv set ls' and 'qn kv list ls' were the only listings with 'ls' as
the primary name. Renamed to 'list' with 'ls' as a visible alias,
matching the convention everywhere else in the CLI. Both spellings
keep working; existing tests invoke 'ls' and pass via the alias.
* Apply rustfmt to new security confirmation tests
* Trim README auth and install docs (DX-5694)
Scope the Homebrew install section to macOS, and shorten the
authentication and environment sections: state where the key comes
from and how to log in, without the extended design rationale.
* Strip trailing whitespace in README
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,7 @@ Things to verify for each new endpoint:
70
70
71
71
-**HTTP-noun → CLI-noun-verb**: `admin.get_endpoints` → `qn endpoint list`, `admin.show_endpoint` → `qn endpoint show <ID>`, `admin.update_endpoint_status(id, "paused")` → `qn endpoint pause <ID>` (split the verb out, since the user thinks "pause", not "update status to paused").
72
72
-**Aliases**: every list-style command gets `#[command(visible_alias = "ls")]`. Plural top-level nouns get one too (`#[command(visible_alias = "endpoints")]`).
73
+
-**Positional value names**: a field named `id` renders as an uninformative `<ID>` in help. Give every positional an explicit, resource-specific `#[arg(value_name = "ENDPOINT_ID")]` (uppercase, underscored: `STREAM_ID`, `WEBHOOK_ID`, `TEAM_ID`, …). Multi-word fields like `referrer_id` already render fine as `<REFERRER_ID>`.
73
74
-**Hyphenation**: clap kebab-cases enum variants by default. `RateLimit` → `rate-limit`. Test invocations must use the kebab form (`qn endpoint rate-limit method-create`, not `ratelimit`).
74
75
-**Negative numbers**: any `i64` flag that accepts `-1` (`--end`, etc.) needs `#[arg(long, allow_hyphen_values = true)]` or clap will read it as another flag.
75
76
-**Multi-value flags**: prefer repeatable `--method foo --method bar` (clap `Vec<String>` with `#[arg(long = "method")]`). Optionally also accept `--methods foo,bar` via a second field with `value_delimiter = ','`. The command body extends one into the other.
0 commit comments