fp & repo
Synopsis
Section titled “Synopsis”canontra fp <FILE> [-l|--language LANG] [--json | --hash | -q]canontra repo <DIR> [--json] [--cache]canontra commit <REVISION> [--json]canontra evolution <REV1> <REV2> [--json]canontra watch [DIR] [--debounce-ms MS] [--poll-ms MS] [-v|--verbose]Aliases: fingerprint for fp, repository for repo, w for watch.
Description
Section titled “Description”fp: Parses one source file (.py,.pyi,.js,.jsx,.mjs,.cjs,.ts,.tsx,.go,.rs) or standard input (-) and prints its 9-tierFingerprintBundle(F0throughF4).repo: Scans an entire repository in parallel, builds compact CSR call and data-flow graphs, and computesF_R,F_WCG,F_WDF, andF_W4.commit: Computes aRepositoryManifestat a Git revision (such asHEAD,HEAD~1, a tag, or a commit SHA) using read-onlygitcommands.evolution: Compares semantic changes between two Git revisions (REV1andREV2) at both file and repository level.watch: Polls a directory and updates the repository Merkle DAG as files change.
| Flag | Short | Applies To | Default | Description |
|---|---|---|---|---|
--language |
-l |
fp - |
python |
Language for stdin input (python, py, typescript, ts, javascript, js, go, rust, rs) |
--json |
- |
fp, repo, commit, evolution |
false |
Print full manifest as JSON |
--hash |
-q |
fp |
false |
Print only the 64-character composite F4 SHA-256 hash |
--cache |
- |
repo, auto-dispatch |
false |
Use the CNTR\x07 incremental cache with FileGraphSummary payloads (.canontra/cache.bin) |
--debounce-ms |
- |
watch |
50 |
Debounce window in milliseconds |
--poll-ms |
- |
watch |
100 |
Directory polling interval in milliseconds |
--verbose |
-v |
watch |
false |
Print verbose watcher logs |
Output Schema & Exit Codes
Section titled “Output Schema & Exit Codes”With --json, fp outputs file, language, engine_version, and fingerprints (source, structural, declaration, dependency, call_graph, control_flow, data_flow, type_contract, composite).
Exit codes: 0 on success, 2 on invalid flags, 3 on parse failure, 4 on missing path, Git failure, or path outside the project root.
Examples
Section titled “Examples”# Fingerprint one filecanontra fp src/auth.py
# Read from standard inputcat src/handler.ts | canontra fp - -l typescript --hash
# Fingerprint a repository using the CNTR\x07 slab cachecanontra repo . --cache --json
# Compare semantic changes across 5 commitscanontra evolution HEAD~5 HEAD --json