feat(cli): improve ergonomics with output modes, doctor command, and generated docs#91
Merged
electather merged 5 commits intorefactor/internal-seerr-clientfrom Mar 16, 2026
Merged
Conversation
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.
Summary
Closes #85
Stacks on #90. Adds three user-facing ergonomics improvements:
--output/-oflag — commands that return structured data can now render asjson(default),yaml, ortable. Proof-of-concept onmovies getandsearch multi; the pattern is documented for future commands.doctorcommand — runs five checks in order (server configured → reachable → API key configured → API key valid → server version) with short-circuit on failure. Outputs a human-readable table or--output jsonarray.docs generatecommand — generates full CLI reference as Markdown files usingcobra/doc.Also updates
CLAUDE.mdwith output conventions and seerrclient usage guidance.Changes
cmd/apiutil/output.go—OutputMode,AddOutputFlag,GetOutputMode,PrintOutput,PrintRawOutput, table renderercmd/movies/get.go— wired--outputflagcmd/search/multi.go— wired--outputflagcmd/doctor/doctor.go+check.go— doctor command with 5 checks,Run()exported for testscmd/docs/docs.go+generate.go— docs generate commandcmd/root.go— addeddoctoranddocscommands; exempt from server validation inPersistentPreRunEtests/output_mode_test.go— 3 new teststests/doctor_test.go— 4 new testsCLAUDE.md— output conventions sectionTest plan
go test -v ./...passesgo fmt ./...produces no diffgo buildsucceedsManual verification:
Tests (TDD):
Checklist
--help, comments)