Mutually-exclusive scope flags (--all / --data-only / --vector-only / --config-only via clap ArgGroup) plus --yes for non-interactive use. Aborts with exit 2 when stdin is non-interactive and --yes is missing — silent destruction is forbidden. Self-contained 20-line confirm prompt (no new dep; std::io::IsTerminal). Integration tests exercise the bin in a fresh subprocess against tempdir-rooted XDG env to keep the assertions independent of the host config: - --data-only --yes wipes data + cache + state, preserves config. - non-TTY without --yes exits 2 with the documented hint. - --json emits reset_report.v1 schema with snake_case scope. - conflicting --all + --data-only rejected by clap before any wipe. Plan deviation (task 4): the data-only test used to write a stub config.toml containing only `schema_version = 1`, but Config parsing requires every section. Switched to a marker file in the cfg dir + the documented Config::load(None)→defaults fallback. p9-fb-06 task 4. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
1.2 KiB
TOML
36 lines
1.2 KiB
TOML
[package]
|
|
name = "kebab-cli"
|
|
version = { workspace = true }
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
license = { workspace = true }
|
|
repository = { workspace = true }
|
|
description = "kb command-line interface"
|
|
|
|
[[bin]]
|
|
name = "kebab"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
kebab-core = { path = "../kebab-core" }
|
|
kebab-config = { path = "../kebab-config" }
|
|
kebab-app = { path = "../kebab-app" }
|
|
# kb-eval re-exports `compute_aggregate` / `compare_runs` /
|
|
# `render_report_md` (P5-2). The DoD calls for these to be reached
|
|
# "via kb-app", but kb-eval already depends on kb-app (P5-1 runner
|
|
# uses the App facade) — routing the CLI through kb-app would
|
|
# require kb-app → kb-eval, forming a cycle. We therefore wire
|
|
# kb-cli → kb-eval directly; documented in
|
|
# `tasks/p5/p5-2-metrics-compare.md`.
|
|
kebab-eval = { path = "../kebab-eval" }
|
|
# P9-1: Ratatui shell. UI consumes `kebab-app` only — `kebab-tui`
|
|
# enforces the §8 boundary in its own Cargo.toml; kb-cli just
|
|
# launches it.
|
|
kebab-tui = { path = "../kebab-tui" }
|
|
anyhow = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = { workspace = true }
|