context-compiler-cli
v0.2.3
Published
Analyze, lint, and deterministically optimize LLM prompt/context files
Maintainers
Readme
context-compiler-cli
CLI package for context-compiler.
Install:
npm install -g context-compiler-cliPrimary command:
ctxc --helpCompatibility alias:
context-compiler --helpStart with deterministic compaction preview:
ctxc compact --text "You are helpful. You are helpful."Command roles:
compact: front door preview of deterministic compaction and resulting textanalyze: inspect structure, token counts, warningslint: detect prompt/context debtoptimize: advanced pipeline controls (--write,--check, transform filtering)
Tokenizer options:
char(default, fast/simple)o200k_base(more realistic for its model family)
Override per command:
ctxc analyze examples/basic-prompt.md --tokenizer o200k_baseSet a persistent default (no JSON editing required):
ctxc config set tokenizer.default o200k_base
ctxc config set tokenizer.default charThis creates or updates context-compiler.config.json in the current directory. Use --config <path> to target a specific config file.
Precedence: --tokenizer flag > tokenizer.default in config > built-in default (char).
For full usage and examples, see the repository README.
