Expand description
linesmith: Rust status line for Claude Code and other AI coding CLIs.
This crate hosts the CLI driver, doctor subcommand, and binary
entry point. The render engine, segment system, themes, layout,
plugin host, and runtime predicates live in linesmith_core
and linesmith_plugin; consumers reach those types from the
originating crates directly per ADR-0020.
End-user binary: cargo install linesmith. Programmatic access
to the render pipeline is via linesmith_core::run and the
run_with_* family — depend on linesmith-core (and
linesmith-plugin if you need plugin-host types) directly.
This crate’s published library surface is intentionally narrow:
cli, doctor, cli_main, and CliEnv are the only items
the binary itself surfaces beyond the entry point.
Modules§
- cli
- Command-line argument parsing via
lexopt. Full flag surface and rationale live indocs/specs/config.md. - doctor
linesmith doctor— diagnostic subcommand. Renders a categorized health report with PASS / WARN / FAIL / SKIP severities, then exits with a contract-defined code (any FAIL → 1; otherwise 0). Spec:docs/specs/doctor.md.
Structs§
- CliEnv
- Process-ambient inputs the CLI reads: env vars consulted by
resolve_config_path, the color-policy env flags, an optional terminal-width override, and an optional color-capability override. Passed throughcli_mainso tests can drive the whole binary without touching the real process env.#[non_exhaustive]leaves room for future env vars (TERM, …) without breaking external construction.
Functions§
- cli_
main - CLI entry point. Returns a
u8exit code so callers convert toExitCodeonly at the outermost layer.