Skip to main content

CLI reference

Requires Node 20+. Install the scoped package (binary is still know-code):

npm i -g @chtnnh/know-code
CommandPurpose
know-code initConfig, git hooks; optional --agents, --workflow
know-code skills [--global]Install Agent Skills (project or user-global)
know-code status [--json]Gate status, hash, range
know-code hash [--json]Print current index hash
know-code checkExit 0 allow / 2 block
know-code pass --level … --hash …Write gate receipt
know-code askBrowser quiz UI
know-code commit -m "…"git commit + Know-Code-Verified trailer
know-code verifyCI trailer check

Useful flags

know-code init --level standard --base-branch main \
--agents claude,cursor,codex --workflow --require-trailer

know-code ask --quiz .know-code/quiz.json --port 3847 --timeout 1800
know-code commit -m "feat: …" # preferred
know-code commit --no-trailer -m "…" # opt out of trailer
know-code verify --require-all

Environment

VariableMeaning
KNOW_CODE_LEVELOverride quiz level
KNOW_CODE_OVERRIDE=1Bypass local gate once (appends .know-code/override.log)
KNOW_CODE_QUIZ_PORTDefault quiz port
KNOW_CODE_QUIZ_TIMEOUTQuiz wait seconds (default 1800)

CI does not honor overrides — only matching trailers pass know-code verify.