CLI reference

Run python3 codemark.pyz --help and python3 codemark.pyz COMMAND --help for your artifact's parser. The module name remains codemark; source checkouts support python3 -m codemark. On Windows, use py -3 and quoted native paths.

Commands

CommandPurposeMain options
snapshot ROOTPreview or save all-regular-file hashes--apply
sign ROOTSign a reviewed referenceHybrid --pq-key plus --classical-key; optional --passphrase-file; or one legacy backend
verify ROOTCompare the tree with its saved referenceBoth hybrid fingerprint pins for authentication
audit ROOTAuthenticate a snapshot and its attestation chain against the current treeBoth hybrid fingerprint pins; optional expected --checkpoint
bundle ROOTPreview or create a private recipient-encrypted archive--recipient-key, --recipient-fingerprint, --archive, --apply
mark ROOTPreview or apply source comments and update their manifest--owner, --project, --apply
unmark ROOTPreview or remove this project's source comments--apply
compare ROOT SUSPECTFind source-copy candidates--threshold
doctorReport runtime and optional-tool availability--json
self-testExercise temporary fixtures on this host--json
guiOpen the optional legacy source-comment interfaceTkinter and a graphical session

Integrity and authentication modes

When .codemark/integrity.json exists, verify selects the all-regular-file reference. Without hybrid pins it reports unauthenticated integrity. audit requires that snapshot, its attestation history, and both complete trusted fingerprints.

python3 codemark.pyz verify /project --json
python3 codemark.pyz audit /project --pq-fingerprint 'SHA256:YOUR_MLDSA87_FINGERPRINT' --classical-fingerprint 'SHA256:YOUR_ED25519_FINGERPRINT' --checkpoint YOUR_COMPLETE_LOWERCASE_SHA512_CHECKPOINT --json

Replace the three placeholders with complete trusted values. The checkpoint is optional syntactically but required to detect replacement by an older valid chain. Read Traceability.

Legacy OpenSSH/GPG verification options authenticate only the source-comment manifest and are rejected when a full snapshot is selected. Do not combine backends. See Signing.

Reports and exit status

Non-GUI commands support --json and a new external report destination with --output. An archive uses its own --archive destination. Keep reports and archives outside checked trees and do not overwrite earlier evidence.

StatusMeaning
0Operation completed; intact verification; comparison without candidates; or self-test without failures
1Integrity differences, comparison candidates, or self-test failure
2Invalid input, required-tool or authentication error, access failure, or interruption

Check both integrity and authentication fields. A self-test can contain explicit skip results; exit 0 alone does not qualify absent optional tools. Consume reports only after process termination and inspect the exit code.

Separate resource ceilings

ResourceAll-file snapshotSource comments and comparison
Files100,000 regular files5,000 supported sources
One file100 GiB2 MiB
Combined bytes1 TiB64 MiB excluding comment overhead
Directory entries200,00020,000
Metadata64 MiB64 MiB
Candidate comparisonNot applicable2,000,000 pairs and 10,000 candidates

These are acceptance limits, not performance benchmarks. An exceeded limit fails the operation rather than presenting incomplete coverage as complete. Hybrid history has additional ceilings: 1,000 records, 32 MiB per chain, and 32 KiB per canonical record. Key files are bounded to 1 MiB and passphrase input to 32 KiB.

Source comparison defaults to --threshold 0.65. Scores describe Jaccard similarity between bounded token sketches, not a percentage of copied lines. See Formats.