CLI improvements - #98
Merged
Merged
Conversation
ion232
commented
Aug 23, 2026
Owner
- cli: add json output, fix enum handling and error propagation
- cli: add commands for all remaining lib endpoint categories
- chore: fix clippy warnings
- chore: update readme
- Global --json flag with a shared output helper, replacing ad-hoc
println!("{:#?}", ...) everywhere.
- Replace hand-rolled enum matches (PerfType, VariantKey, Color, Room)
with clap::ValueEnum + From impls, matching the existing puzzles.rs
pattern.
- Replace println!+Ok(()) short-circuits on invalid input with real
clap validation/errors so exit codes reflect failure.
- Wrap fallible calls with color-eyre's wrap_err_with for readable
error context instead of raw library error Debug output.
- Add assert_cmd-based CLI tests covering help output, invalid-enum
rejection, and the --json flag.
- Add missing Serialize derives on two external_engine response types
(and their nested structs) needed for the json output path.
Adds account, relations, simuls, tv, openings, tablebase, analysis, messaging, fide, games, studies, bot, teams, arena-tournaments, swiss-tournaments, broadcasts, and bulk-pairings command modules, wired into main.rs alongside the existing board/puzzles/engine/ challenges/users.
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.