CLI 代理准备度测量、命令形状推断和 CI 评分卡
CLIARE audits command-line interfaces for agent readiness.
It is like OpenAPI/Swagger for CLIs, but generated from runtime evidence rather than hand-written docs.
Agents increasingly use terminals as their operating surface, but most CLIs were designed for humans reading help text. An agent harness needs a different contract before it spends tokens trying commands:
CLIARE answers those questions by measuring the released CLI binary as a black box. It probes runtime behavior under bounded controls, records evidence, infers the command surface, detects side effects, and emits command indexes, issue ledgers, scorecards, one-command summaries, persona reports, CI artifacts, and agent skills.
CLIARE stands for CLI Agent Readiness Evaluation.
CLIARE is pronounced like "Claire": she cares about whether your CLI can be used reliably by agents, maintainers, and security reviewers.
Agents increasingly use CLIs as their hands: the practical surface for reaching code hosts, cloud systems, payment services, internal platforms, and local developer workflows.
cargo install cliare
cliare metadata --format jsonWhen a CLI evolves quickly, the docs, --help, and the released binary can start telling different stories. Humans can work around that drift. Agents tend to discover it the expensive way.
cliare measure mycli --out .cliare/mycli --profile standard --refreshWithout an evidence-backed command index, an agent harness has to rediscover the surface repeatedly: run help, try a flag, hit a missing operand, back up, and try again. That loop costs tokens, latency, and reliability.
cliare summary --out .cliare/mycliCLIARE exercises the released binary as a black box. You choose the context: clean, repository, authenticated, host, fixture-backed, or CI. CLIARE records evidence instead of relying on stale assumptions.
cliare measure mycli \
--out .cliare/mycli \
--context authenticated \
--auth-state present \
--execution-mode host \
--profile deep \
--refreshFor maintainers, CLIARE turns agent-readiness gaps into a concrete queue: missing help, confusing diagnostics, parseable-output gaps, unsafe discovery side effects, precondition blockers, and command-shape drift.
cliare summary --out .cliare/mycli
cliare report maintainer --out .cliare/mycli --format markdown
cliare issues list --out .cliare/mycli --format markdown
cliare playbook maintainer --target mycliFor agent harnesses, CLIARE builds the map: an evidence-backed command index that describes command paths, flags, operands, preconditions, output contracts, confidence, suitability, and evidence references.
cliare describe .cliare/mycli --write
cliare summary --out .cliare/mycli --format json
cliare report harness --out .cliare/mycli --write
cliare playbook harness --target mycliThe harness can then load:
.cliare/mycli/command-index.json
.cliare/mycli/AGENT_SKILL.md
.cliare/mycli/persona-harness.jsonSkills are useful, but they are not command indexes. A skill can teach intent, workflow, and policy. A command index tells the harness what the CLI actually supports right now. Agents need both: instruction for judgment, evidence for navigation.
cliare summary --out .cliare/mycli
cliare report harness --out .cliare/mycli --format markdown
cliare report security --out .cliare/mycli --format markdown
cliare issues list --out .cliare/mycli --format humanCLIARE helps maintainers keep CLIs aligned, helps security reviewers catch undocumented side effects, and helps agents use CLIs deliberately instead of rediscovering syntax by trial and error.
CLIARE turns vague "is this CLI agent-friendly?" feedback into a concrete implementation queue.
It shows where agents will struggle with command discovery, help coverage, diagnostics, output contracts, preconditions, and unsafe discovery behavior. Instead of guessing what to improve, maintainers get evidence-backed assessments, their meaning for agents and harnesses, associated commands, suggested remedies, and verification commands.
Benefits:
CLIARE catches undocumented runtime behavior in binaries.
It snapshots filesystem state around each probe and reports persistent side effects from safe-looking commands such as help, version, invalid flag, and output-mode probes. This helps security teams find cache/config writes, credential-like paths, and host/auth behavior before a CLI is exposed to autonomous agents.
Benefits:
CLIARE creates a measured command surface that harnesses can query before agents explore.
Harnesses should use cliare surface query, cliare surface explain, and cliare surface list for compact intent-to-command routing answers. command-index.json remains the evidence-backed source of truth when a route needs audit or debugging.
Benefits:
--help, flag-guessing, and error-recovery loops.A measurement writes one artifact directory:
…The key artifact is command-index.json. It records command paths, argv forms, summaries, confidence, runtime state, agent suitability, flags, positionals, preconditions, output contracts, gaps, and evidence references.
Start with the one-command summary:
cliare summary --out .cliare/myclicliare summary reads scorecard.json, issues.json, command-index.json, and evidence.jsonl and prints one concise assessment. Each finding includes:
Use JSON when another tool or harness needs the same interpretation without scraping Markdown:
cliare summary --out .cliare/mycli --format jsonThen drill down with the role-specific commands:
| Command | Use When |
|---|---|
cliare summary --out .cliare/mycli |
You want the shortest human-readable assessment of the run. |
cliare report maintainer --out .cliare/mycli |
You maintain the CLI and need a prioritized implementation queue. |
cliare report harness --out .cliare/mycli --write |
You are preparing command-index and harness artifacts for agents. |
cliare report security --out .cliare/mycli |
You need side-effect, auth, host, and approval context. |
cliare issues list --out .cliare/mycli |
You need the full issue ledger or maintainer dispositions. |
cliare surface query ... --out .cliare/mycli |
A harness needs a compact intent-to-command routing answer. |
cliare surface explain ... --out .cliare/mycli |
A harness or reviewer needs one command's readiness, operands, and output contract. |
cliare surface list --out .cliare/mycli |
You need a filtered list of measured command paths. |
Install from crates.io:
cargo install cliare
cliare metadata --format textOr install the latest prebuilt binary from GitHub Releases:
curl -fsSL https://github.com/modiqo/cliare/releases/latest/download/install.sh | sh
cliare metadata --format textThe installer detects macOS/Linux and x86_64/aarch64, downloads the matching archive, verifies SHA256SUMS, and installs cliare into $HOME/.local/bin by default.
To install somewhere else:
curl -fsSL https://github.com/modiqo/cliare/releases/latest/download/install.sh | CLIARE_INSTALL_DIR=/usr/local/bin shTo install a specific release:
curl -fsSL https://github.com/modiqo/cliare/releases/download/v0.1.9/install.sh | CLIARE_VERSION=v0.1.9 shOr install from source:
git clone https://github.com/modiqo/cliare.git
cd cliare
cargo install --path .
cliare metadata --format jsonThe project provides optional Nix flake outputs for users who already use Nix. The flake wraps the prebuilt release binary.
# Run without installing
nix run github:modiqo/cliare
# Install into your profile
nix profile install github:modiqo/cliareThe flake tracks the default branch and is auto-bumped to the latest release by a
daily workflow, so github:modiqo/cliare
always serves the current release. (Release tags are cut before the bump lands,
so github:modiqo/cliare/vX.Y.Z is not a valid pin — use the
nixpkgs package or a specific commit SHA if you need reproducibility.)
For reproducible development environments, use Devbox:
# Install Devbox first (if not already installed)
curl -fsSL https://get.jetify.dev/devbox | bash
# Initialize the environment
devbox shell
# Build the project
devbox run buildOr install Devbox via Homebrew:
brew install jetify-com/devbox/devboxFor local development:
cargo build --locked --bin cliare
./target/debug/cliare metadata --format jsonThe source package also includes a justfile with optional command shortcuts for common CLIARE workflows. Install just separately if you want to use these recipes; the cliare binary itself does not require it.
List available recipes:
just --listRun the local preflight gate before pushing:
just justdevjust justdev runs formatting, workspace checks, clippy with warnings denied, tests, package file-set checks, and a quick CLIARE-on-CLIARE measurement.
Measure a large local CLI surface in the background:
just measure-detached supabase
just jobs supabaseThis expands to a deep traversal that writes artifacts under .cliare/supabase:
cliare measure supabase --out .cliare/supabase --profile deep --max-depth 12 --max-probes 5000 --concurrency 8 --refresh --detachOverride traversal budget when a CLI needs more or less exploration:
just max_depth=16 max_probes=10000 measure-detached gh
just profile=standard max_depth=5 max_probes=256 measure kubectlFor path-based local binaries, pass a stable artifact id:
just measure-detached ./target/release/mycli mycliReview accumulated artifacts:
just review supabase
just report supabase security
just agent-surface supabaseRelease preparation lives in RELEASE.md. The version h
暂无开放 Issues,或尚未同步最近议题。