Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands

Vajra ships 11 commands. Each does one thing. They compose.


Reference Table

CommandPurposeInputKey Output
inspectFull structural analysisSingle documentPaths, types, fingerprints, domain hints
statsStatistical summarySingle documentEntropy, frequency, distributions, null rates
anomaliesAnomaly detectionSingle or batchOutliers, rarity, structural deviations
fingerprintStructural fingerprintsSingle documentBLAKE3 hashes, MinHash signature
essenceConcern-oriented reductionSingle documentCompressed, ranked, profile-shaped output
driftSchema drift detectionTwo documentsAdded/removed paths, type changes, JSD
clusterSimilarity clusteringMultiple documentsCluster assignments, centroids, outliers
invariantsCross-field relationshipsSingle or batchConditional entropy, PMI, dependencies
queryPath-based query with analysis functionsSingle documentFiltered analysis results
batchParallel batch analysisDirectoryAggregated stats, per-file summaries
profilesList available profilesNoneBuilt-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.