Docs / Reference

pql command line

The pql binary manages keysets, seals, opens, signs, verifies, checks audit logs, scans repositories and writes CBOMs.

01Keys

pql keys new --purpose seal|sign|token --out KEYSET [--public-out PUBLIC]
pql keys add KEYSET                    # add an active key, print its kid
pql keys promote KEYSET KID            # make KID the primary key
pql keys public KEYSET [-o PUBLIC]     # write the keyset without secrets

02Seal, open, sign, verify

pql seal   -k KEYSET [--text] [-o OUT] [IN]
pql open   -k KEYSET [-o OUT] [IN]           # accepts binary or "pql1." text
pql sign   -k KEYSET [--text] [-o OUT] [IN]
pql verify -k KEYSET --sig SIG [IN]          # SIG is binary or "pqlg." text

Input defaults to standard input and output to standard output, so commands compose with pipes:

echo -n 'db password' | pql seal -k app.pub --text > secret.pql
pql open -k app.keyset secret.pql

03Audit logs

pql audit verify -k KEYSET [--length N] [--head HEX] [LOG]   # find the first bad entry

04Scan and CBOM

pql scan [--format text|json] [-o OUT] [--exclude NAME]... [--fail-on-vulnerable] [PATH...]
pql cbom [--from SCAN.json] [--name NAME] [-o OUT] [--exclude NAME]... [PATH...]
pql version
FlagMeaning
--format jsonWrite the pql-scan/v1 report, the input to pql cbom
--exclude NAMESkip files and folders with this name (repeatable). .git, node_modules, vendor, .venv and __pycache__ are always skipped
--fail-on-vulnerableExit 3 when any finding is quantum-vulnerable: a CI gate
--from SCAN.jsonBuild the CBOM from a saved scan; - reads standard input

05Exit codes

CodeMeaning
0Success
1Error, including a failed open or verify
2Usage error
3scan --fail-on-vulnerable found quantum-vulnerable crypto
Suites

pql keys new and pql keys add create PQL-DEFAULT keys only in v0.1. Every other command works with keysets of any suite.

pqlock v0.1.0 · unaudited preview · source of truth: spec/