SIGN IN SIGN UP

feat: Rust CLI — crate scaffold + snapshot subcommand (LEO-333) (#22)

* feat: Rust CLI — crate scaffold + snapshot subcommand (LEO-333)

Add the third workspace member rust/sensorwatch-cli (publish = false),
producing a binary named sensorwatch built on the safe wrapper crate.
First subcommand: snapshot — one-shot live readings as a JSON array with
--type/--match/--indent, matching the agent skill's Python helper contract
(key order, Title-case type labels, exit codes 0/1/2).

The full Phase-1 dependency set lands here so MSRV surprises surface in the
smallest PR; toml and clap are capped below their edition-2024 releases
(cargo 1.82 cannot parse edition-2024 manifests), and indexmap/hashbrown are
held back in the committed lockfile for the same reason.

Docs updated in lockstep: SKILL.md Recipe 1 now leads with the Rust binary
(Python helper kept as no-toolchain fallback), README Features/Usage/Rust
binding/Skills, ROADMAP snapshot → shipped + binary-naming note, C_ABI
workspace wording, CONTRIBUTING release-scope note.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018gzyuBbqWrJkUZDQgtjceq

* fix: address round-1 review — version-agnostic test, bounded --indent

Assert --version output against CARGO_PKG_VERSION instead of a hard-coded
0.1.0, and cap --indent at the clap layer (0..=16) so an enormous value is
a clean usage error (exit 2) rather than an attempted huge allocation in
render(). Docs and SKILL.md updated to match; the Python fallback's
unbounded non-negative --indent is noted as a divergence.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018gzyuBbqWrJkUZDQgtjceq

---------

Co-authored-by: Agent for Leonard Janke <leonard.janke.agent@proton.me>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
L
lcj-claude-coder committed
c35f16f821dbc4a297551b309ac33523affbf5e1
Parent: 7c8456d
Committed by GitHub <noreply@github.com> on 7/2/2026, 11:09:33 PM