feat(cli): UX & consistency polish (PR D)#22
Merged
Merged
Conversation
Tier-2/3 polish across the CLI surface: - Auth-aware errors: 401/403 now say "not authenticated — run `orva login`…" instead of a bare "API error (401)" (the #1 first-run stumble). - Destructive-op guards: `dns set` (replaces the whole DNS config) and `system vacuum` (write-blocking lock) now confirm() — refuse on a non-TTY without --yes, like every other destructive command. - Aliases (additive): fn/fns, secret, route, key for the noun groups, and ls / rm,del on every list / delete leaf. - `deploy --watch` → `--follow`/`-f` to match logs/activity/deployments-logs; --watch kept as a hidden, deprecated alias. - JSON output holes: `webhooks inbound test` honors -o json (status/headers/ body envelope); fixtures/cron/webhooks/channels `delete` emit {"deleted":true,...} in JSON mode. - stdout discipline: `firewall resolve` empty-result notes and `fixtures get` body label now go to stderr, keeping stdout pipe-clean. - Help: every `webhooks` and `channels` leaf gains a Long + Example (were Short-only). - Docs: cli/CLAUDE.md refreshed — clientFactories → RegisterClient, and the layout lists backup.go / executions.go and the kv incr/cas + deploy --follow surfaces. Deferred as lower-value follow-ups: list-timestamp formatting unification and positional-placeholder standardization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR D — UX & consistency polish (Tier 2/3)
Last of four back-to-back CLI gap-closure PRs. CLI-only.
Changes
orva login, or pass --endpoint/--api-key (or set ORVA_ENDPOINT/ORVA_API_KEY)" / "not authorized…" instead of a bareAPI error (401)(the AI assistant: in-product agentic chat (merge-ready) #1 first-run stumble).helpers.go checkResponse.dns set(replaces the whole DNS config; omitted flags clear their section) andsystem vacuum(write-blocking lock) nowconfirm()→ refuse on a non-TTY without--yes, matching every other destructive command.fn/fns,secret,route,keyfor the noun groups, andls/rm,delon everylist/deleteleaf (recursive, de-duped, primary names unchanged).deploy --watch→--follow/-fto match logs/activity/deployments-logs;--watchkept as a hidden deprecated alias.webhooks inbound testhonors-o json(status/headers/body envelope, likefixtures test);fixtures/cron/webhooks/channelsdeleteemit{"deleted":true,...}in JSON mode.firewall resolveempty-result notes and thefixtures getbody label now go to stderr, keeping stdout pipe-clean.webhooksandchannelsleaf gains aLong+Example(were Short-only).cli/CLAUDE.mdrefreshed:clientFactories→RegisterClient; layout listsbackup.go/executions.go+ thekv incr/casanddeploy --followsurfaces.Deferred as lower-value follow-ups (noted in the commit): list-timestamp formatting unification and positional-placeholder standardization.
Tests
go vet ./...+go test ./...green; command-tree parity (slim vs server) green;deploy --followadded to required-flags test.Live-verified on the dev instance (:3000)
fn lsalias → "Showing 1 of 5"; bad key → friendly 401;dns set/system vacuumrefuse on non-TTY without--yes;webhooks delete -o json→{"deleted":true,"id":…};secret/route/key/functions rmaliases resolve;webhooks list --helpshows examples;deploy -f/--followpresent.