Commands
Vajra ships 11 commands. Each does one thing. They compose.
Reference Table
| Command | Purpose | Input | Key Output |
|---|---|---|---|
inspect | Full structural analysis | Single document | Paths, types, fingerprints, domain hints |
stats | Statistical summary | Single document | Entropy, frequency, distributions, null rates |
anomalies | Anomaly detection | Single or batch | Outliers, rarity, structural deviations |
fingerprint | Structural fingerprints | Single document | BLAKE3 hashes, MinHash signature |
essence | Concern-oriented reduction | Single document | Compressed, ranked, profile-shaped output |
drift | Schema drift detection | Two documents | Added/removed paths, type changes, JSD |
cluster | Similarity clustering | Multiple documents | Cluster assignments, centroids, outliers |
invariants | Cross-field relationships | Single or batch | Conditional entropy, PMI, dependencies |
query | Path-based query with analysis functions | Single document | Filtered analysis results |
batch | Parallel batch analysis | Directory | Aggregated stats, per-file summaries |
profiles | List available profiles | None | Built-in and custom profile descriptions |
Global Flags
Every command accepts these flags:
--format <text|json|markdown|compact-ai> Output format (default: text)
--profile <name> Concern profile (default: engineer)
--config <path> Path to TOML config with custom profiles
--budget <N> Token budget for essence output
--streaming Force streaming mode (bounded memory)
--input-format <format> Override input format auto-detection
--redact Apply built-in redaction patterns
--quiet Suppress progress output
--explain Include score decomposition in output
Quick Examples
Inspect
vajra inspect claim.json
vajra inspect claim.json --format json
cat payload.json | vajra inspect -
Stats
vajra stats claim.json
vajra stats claim.json --format json
Anomalies
vajra anomalies claim.json
vajra anomalies claims_batch.ndjson --format json
Fingerprint
vajra fingerprint claim.json
vajra fingerprint claim.json --format json
Essence
vajra essence claim.json --profile staff
vajra essence claim.json --profile ai --format compact-ai --budget 500
vajra essence claim.json --profile auditor --format markdown
Drift
vajra drift v1.json v2.json
vajra drift baseline.json candidate.json --format json
Cluster
vajra cluster batch/*.json
vajra cluster file1.json file2.json file3.json --format json
Invariants
vajra invariants claims_batch.ndjson
vajra invariants claims_batch.ndjson --top-k 100
Query
vajra query claim.json 'entropy($.claims[*].status) > 0.5'
vajra query claim.json '$.claims[*].service_lines[*].charge_amount'
Batch
vajra batch ./claims_directory/
vajra batch ./claims_directory/ --format json --profile auditor
Profiles
vajra profiles
vajra profiles --config custom.toml
Input Conventions
All commands that accept <input> understand:
- File path:
claim.json,./data/payload.yaml - Stdin:
-(pipe data in) - Directory:
./batch/(processes all supported files) - Compressed:
.json.gz,.json.zst(auto-decompressed) - HTTP URL:
https://api.example.com/data.json(fetched, then analyzed)
Format is auto-detected from extension and content. Override with --input-format.
See Input Formats for the full list.
Output Conventions
All commands emit to stdout. All commands support --format json for machine-readable output. Diagnostics and errors go to stderr.
The --explain flag adds score decomposition to essence and anomaly output — showing exactly which dimensions contributed to each observation’s ranking.
The --redact flag applies built-in pattern redaction (SSN, email, phone, credit card) before any output is rendered. The essence never sees unredacted values.