Summary
Create apps/traverse-starter/cli-rust/ — a Rust CLI client that invokes traverse-starter.process from the terminal. Phase 1 uses HTTP polling matching web-react. Shares traverse-core-rs crate with the Linux GTK client (see #59). SSE is the phase 2 upgrade path.
Phase 1 scope (HTTP polling — unblocked)
- CLI tool:
traverse-starter run --note "..." → POST execute → poll → print result
- Runtime URL + workspace via CLI flags or env vars (
TRAVERSE_BASE_URL, TRAVERSE_WORKSPACE)
- Health check subcommand:
traverse-starter health
- Structured output: human-readable by default,
--json flag for machine output
- Demonstrates Traverse as a programmable backend — agent/CI-friendly
Stack
| Concern |
Choice |
| Language |
Rust |
| CLI |
clap (derive API) |
| HTTP |
reqwest (blocking or async with Tokio) |
| Output |
colored for human, serde_json for --json |
Directory structure
apps/traverse-starter/cli-rust/
Cargo.toml
src/
main.rs # clap entrypoint
commands/
run.rs # execute + poll loop
health.rs
client.rs # reqwest HTTP client
output.rs # human + JSON formatters
tests/
integration_tests.rs
Commands
traverse-starter run --note "Meeting with Alice about project X"
traverse-starter run --note "..." --json
traverse-starter health
traverse-starter run --base-url http://192.168.1.42:8787 --workspace my-workspace --note "..."
Phase 2 upgrade path (do not implement now)
When Traverse ships #525 / #526 / #527:
Definition of Done
Summary
Create
apps/traverse-starter/cli-rust/— a Rust CLI client that invokestraverse-starter.processfrom the terminal. Phase 1 uses HTTP polling matchingweb-react. Sharestraverse-core-rscrate with the Linux GTK client (see #59). SSE is the phase 2 upgrade path.Phase 1 scope (HTTP polling — unblocked)
traverse-starter run --note "..."→ POST execute → poll → print resultTRAVERSE_BASE_URL,TRAVERSE_WORKSPACE)traverse-starter health--jsonflag for machine outputStack
--jsonDirectory structure
Commands
Phase 2 upgrade path (do not implement now)
When Traverse ships #525 / #526 / #527:
traverse-core-rscrate (see Extract traverse-core-rs: shared Rust HTTP/SSE crate for linux-gtk and cli-rust #59)send-commandsubcommand for manual command dispatchDefinition of Done
cargo buildsucceeds on macOS and Linuxtraverse-starter run --note "..."executes, polls, and prints result--jsonflag outputs machine-readable JSONtraverse-starter healthprints runtime status--base-urland--workspaceflags + env var fallbacks workcli-rust/covering: build, install, usage examplesscripts/ci/repository_checks.shupdated to acknowledgecli-rust/directory