Registry / llm-agents / context-compiler-cli

context-compiler-cli

JSON →
library0.2.3jsnpmunverified

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.

npm install context-compiler-cli
INSTALL
IMPORT
SIG · CONTEXT-COMPILER-C
C
context-compiler-cli
llm-agentsjavascriptv0.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cli
npx ctxc --help
npm install context-compiler-cli --save
Install globally for CLI usage, not as a project dependency.
ctxc
ctxc analyze file.md --tokenizer o200k_base
context-compiler analyze file.md
Primary command is ctxc; context-compiler is a compatibility alias.
context-compiler
context-compiler --help
Alias works for basic commands but prefer ctxc.

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."
context-compiler-cli --version
Debug
Known issues
breakingRequires Node >=18; older versions will fail.
fix
Upgrade Node to 18+ with nvm install 18
affects: >=0.2.0
gotchaToken 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.
affects: >=0.2.0
deprecatedUsing 'context-compiler' command instead of 'ctxc' may be deprecated in future versions.
fix
Use ctxc for all commands.
affects: >=0.2.0
Errors
Common errors & fixes
command not found: ctxc
npm global install not in PATH or not installed globally
fix
Run npm install -g context-compiler-cli or use npx ctxc
Error: Could not resolve tokenizer 'o200k_base'
Tokenizer name misspelled or not available in current version
fix
Use valid tokenizer: char or o200k_base; check spelling.
Upgrade
Version history
0.2.3latest on npm
Audit
Dependencies
context-compilerrequiredcore library providing API and logic
Agent activity
24 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
context-compiler-cli — npm install context-compiler-cli · libregistry