tokmd
CLI binary for tokmd: deterministic code receipts, derived analysis, and review artifacts for humans, CI, and LLM workflows.
Overview
This is the Tier 5 entry point that wires together the lower-tier crates into the end-user CLI. It turns a source tree into stable receipts you can summarize, diff, analyze, gate, and pack into bounded LLM context.
Installation
# From crates.io
# From source
# With Nix
Quick Start
# Language summary
# Pack code into an LLM-ready bundle
# Save deterministic artifacts for later comparison
# Risk-oriented analysis
# Effort estimate between refs
# Generate a badge
Commands
| Command | Description |
|---|---|
tokmd / tokmd lang |
Language summary for a repo or path set |
tokmd module |
Module breakdown by directory roots |
tokmd export |
File-level inventory (jsonl, json, csv, cyclonedx) |
tokmd run |
Save receipts to a run directory, optionally with --analysis <preset> |
tokmd analyze |
Derived metrics and enrichments, including the estimate preset |
tokmd badge |
SVG badge generation |
tokmd diff |
Compare two runs, receipts, or refs |
tokmd cockpit |
PR metrics with evidence gates and review plan output |
tokmd baseline |
Capture a complexity baseline for ratchet comparisons |
tokmd handoff |
Build an LLM handoff bundle |
tokmd sensor |
Emit a sensor.report.v1 envelope |
tokmd gate |
Evaluate policy and ratchet rules |
tokmd tools |
Generate tool definitions for OpenAI, Anthropic, and JSON Schema consumers |
tokmd context |
Pack files into an LLM context window under a token budget |
tokmd init |
Generate a .tokeignore template |
tokmd check-ignore |
Explain why files are ignored |
tokmd completions |
Generate shell completions |
Feature Flags
[]
= ["git", "walk", "content", "ui", "fun", "topics", "archetype"]
= [] # Enable the `tok` binary alias
= [] # Git history analysis and PR-oriented commands
= [] # Filesystem traversal helpers
= [] # Content scanning (entropy, imports, etc.)
= [] # Interactive prompts and progress UI
= [] # Novelty outputs
= [] # Semantic topic analysis
= [] # Project archetype detection
Notes
tokmd runnow uses--analysis <preset>when you want saved analysis artifacts.tokmd contextuses--mode <list|bundle|json>for output mode and--output <path>for file output.tokmd analyze --preset estimateis the effort-focused lane introduced in1.8.0.
Documentation
License
MIT OR Apache-2.0