context-compiler-cli

raw JSON →
0.2.3 verified Fri May 01 auth: no javascript

Context-compiler-cli is a CLI tool for analyzing, linting, and deterministically optimizing LLM prompt/context files. Current stable version is 0.2.3, released with active development cadence. It provides commands like compact, analyze, lint, and optimize, with tokenizer options (char, o200k_base). Differentiators include deterministic compaction preview and config persistence without JSON editing. Requires Node >=18.

error command not found: ctxc
cause npm global install not in PATH or not installed globally
fix
Run npm install -g context-compiler-cli or use npx ctxc
error Error: Could not resolve tokenizer 'o200k_base'
cause Tokenizer name misspelled or not available in current version
fix
Use valid tokenizer: char or o200k_base; check spelling.
breaking Requires Node >=18; older versions will fail.
fix Upgrade Node to 18+ with nvm install 18
gotcha Token option 'o200k_base' may produce different results than 'char'; not a bug but intended behavior.
fix Specify desired tokenizer with --tokenizer flag or config set.
deprecated Using 'context-compiler' command instead of 'ctxc' may be deprecated in future versions.
fix Use ctxc for all commands.
npm install context-compiler-cli
yarn add context-compiler-cli
pnpm add context-compiler-cli

Install CLI globally, verify help, then run deterministic compaction preview on sample text.

npm install -g context-compiler-cli
ctxc --help
ctxc compact --text "You are helpful. You are helpful."