v0.1.0-alpha.1 · Rust CLI & MCP Server · Apache-2.0

Give your AI coding agent X-ray vision instead of grep.

Local polyglot AST intelligence across 13 code, config, and infrastructure formats. Cut LLM context tokens by 80%, split large files safely, catch SQL-to-TypeScript drift, and scrub secrets automatically.

GitHub Releases
cargo binstall miter-cli@0.1.0-alpha.1

See it in action

Four real outputs, captured from this repository. No mocks.

$ miter skeleton Containerfile
    1  STAGE builder FROM rust:1.90
    2  ARG CARGO_PROFILE=release
    3  ARG REGISTRY_TOKEN=[REDACTED_SECRET]
    4  ENV DATABASE_URL=[REDACTED_SECRET]
    5  ENV PORT=8080
    6  EXPOSE 8080
    7  CMD ["./miter", "mcp"]

$ miter skeleton docker-compose.yml
    2  SERVICE api (image: miter:0.1.0-alpha.1)
    5  ENV DATABASE_URL=[REDACTED_SECRET]
    6  ENV STRIPE_SECRET_KEY=[REDACTED_SECRET]
    7  ENV LOG_LEVEL=info

$ miter skeleton src/cli/slice.rs
pub enum SliceFormat { Human, Json }

impl SliceFormat {
    pub fn parse(s: &str) -> Self { /* ... */ }
}

pub fn run_slice(path: &Path, target_lines: usize) -> Result<(), CliError> { /* ... */ }
$ miter slice crates/mcp/src/handler/analysis.rs
EXTRACTION BLUEPRINTS: Found 1 cluster(s) targeting ≤250 lines:

=== Cluster #1 -> crates/mcp/src/handler/analysis/handle_audit.rs ===
  Source Lines: 10-181 (172 lines)
  Symbols to Move: handle_audit, handle_slice, handle_skeleton, handle_references, handle_impact
  Parent mod decl: mod handle_audit;
  Suggested Exports: pub(crate) handle_audit, pub(crate) handle_slice, pub(crate) handle_skeleton, pub(crate) handle_references, pub(crate) handle_impact
  Est. Remaining Lines in Parent: 13
$ miter contracts
Polyglot Contract Verification across SQL, Rust, and TypeScript
================================================================================
Verified Multi-Language Entities: 1
Entities with Contract Drift:     1

ENTITY                   FIELD                    DRIFT STATUS
--------------------------------------------------------------------------------
user                     created_at               in [rust, sql] but missing in [typescript]

-- the three declarations, written months apart
CREATE TABLE users (... created_at TEXT NOT NULL);
pub struct User { ... pub created_at: String }
export interface User { ... }          ← never got created_at
$ miter mcp
{
  "mcpServers": {
    "miter": { "command": "miter", "args": ["mcp"] }
  }
}

Claude Code · Cline · Cursor · Windsurf

miter_lookup      symbol, module or crate API surface
miter_skeleton    signatures with bodies stripped
miter_references  reverse call sites
miter_impact      multi-hop blast radius and affected tests
miter_slice       seam-extraction blueprints
miter_audit       line ceiling, dead code, cycles
miter_verify      sliced compiler diagnostics

Every tool call refreshes dirty files before it answers.

Five pillars

Context window savings

An agent reads a whole 800-line file just to see its signatures.

miter skeleton returns signatures and line numbers; miter lookup fetches one symbol plus its neighbours.

Safe modularity slicing

Splitting a bloated file by hand yields circular imports and missing pub modifiers.

miter slice names the seam and the exact pub(crate) elevations; miter audit holds the ceiling.

Cross-stack type contracts

A new SQL column and Rust field, but the TypeScript interface never got it.

miter contracts compares SQL tables, Rust structs and TypeScript interfaces field by field.

Reverse call-graph impact

grep returns noisy comments, unrelated substrings and misses multi-hop callers.

miter impact walks the reverse call graph and lists the tests to run, with their commands.

AST-aware secret redaction

An agent reading .env, a Dockerfile or a manifest pulls raw credentials into the prompt.

Every signature, body and MCP response is scrubbed: keys, sk_live_... tokens and high-entropy strings become [REDACTED_SECRET].

13 supported formats

CLI and MCP reference

CommandWhat it doesMCP tool
index <PATH>Build the workspace index—
lookup <SYMBOL>Hydrate one declarationmiter_lookup
skeleton <PATH>Signatures with bodies strippedmiter_skeleton
references <SYMBOL>Reverse call sitesmiter_references
impact <SYMBOL>Blast radius and affected testsmiter_impact
slice <PATH>Seam-extraction blueprintsmiter_slice
auditLine ceiling, hygiene, cyclesmiter_audit
contractsSQL, Rust and TypeScript drift—
clonesSimHash structural clones—
verifySliced compiler diagnosticsmiter_verify
mcpJSON-RPC 2.0 stdio server—