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.
v0.1.0-alpha.1 · Rust CLI & MCP Server · Apache-2.0
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.
cargo binstall miter-cli@0.1.0-alpha.1
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.
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.
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.
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.
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.
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].
| Command | What it does | MCP tool |
|---|---|---|
index <PATH> | Build the workspace index | — |
lookup <SYMBOL> | Hydrate one declaration | miter_lookup |
skeleton <PATH> | Signatures with bodies stripped | miter_skeleton |
references <SYMBOL> | Reverse call sites | miter_references |
impact <SYMBOL> | Blast radius and affected tests | miter_impact |
slice <PATH> | Seam-extraction blueprints | miter_slice |
audit | Line ceiling, hygiene, cycles | miter_audit |
contracts | SQL, Rust and TypeScript drift | — |
clones | SimHash structural clones | — |
verify | Sliced compiler diagnostics | miter_verify |
mcp | JSON-RPC 2.0 stdio server | — |