Skip to content

Add Chapter 5: CLI Tools#4

Merged
hartsock merged 1 commit into
ch04-content-addressablefrom
ch05-cli-tools
Apr 28, 2026
Merged

Add Chapter 5: CLI Tools#4
hartsock merged 1 commit into
ch04-content-addressablefrom
ch05-cli-tools

Conversation

@hartsock

Copy link
Copy Markdown
Member

Summary

  • Maps Python argparse/click to clap derive macros
  • Covers: declarative CLI definition, subcommands as enums, structured output (text + JSON), store with CRUD + filtering, exhaustive command dispatch
  • 14 passing example tests, 5 exercises building a task manager CLI

Test plan

  • cargo test -p ch05-cli-tools — 14/14 pass
  • cargo clippy --workspace -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • No private repo references

Depends on #3

🤖 Generated with Claude Code

Maps Python's argparse/click to clap derive macros. Covers declarative
argument parsing, subcommands as enums with exhaustive matching, structured
output (text + JSON from the same Serialize type), NoteStore CRUD with
filtering and search, and command dispatch.

14 passing example tests, 5 exercises building a task manager CLI
(CLI definition, data model, store with filtering, structured output,
and exhaustive dispatch).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hartsock hartsock mentioned this pull request Apr 13, 2026
4 tasks
@hartsock
hartsock merged commit da26291 into ch04-content-addressable Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant