Contextrie CLI
Indexes project files and composes a short task context into a file so the agent is not buried in noise
- 62 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Project file contents go to an external model provider, and the result is written into `.contextrie` inside the project.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/contextrieDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Project file contents go to an external model provider, and the result is written into `.contextrie` inside the project.
This is third-party code. Review the repository files before installing.
What it does
`Contextrie` is a toolkit for context handling in long-running agent work. The CLI indexes local files, judges their usefulness and writes a task-specific context into `.contextrie/context.md`; source metadata goes to `.contextrie/sources.json`. The task is passed with `--task`. The same code ships as a library: `@contextrie/core` and `@contextrie/parsers` provide indexing, judging and composing agents plus document parsers. It needs an OpenAI or compatible provider key, with the address set through `--openai-base-url`. The project is early and the interface may break.
Who it is for. Developers of agent systems where context piles up over dozens of steps and starts to hurt, with selection run as a separate step.
Good fit when
- A long session loses focus because of surplus files
- A complex task needs a condensed context from dozens of project documents
- A custom agent system is built on an indexing and source-judging library
- Context for a task has to be written to a file and handed to any agent
Not a fit when
- File contents must not go to an external model provider
- You need a stable interface, since the project is early and breaks compatibility
- The task is short and the whole context fits in one prompt
Example request
Index the `docs` directory and compose a context for this task: which files matter for parser source path handling.Limitations
Indexing and composing call a model, so an OpenAI or compatible API key is required and file text goes to that provider. The README warns the project is early and breaking changes are possible. The final context sits in `.contextrie/context.md` as plain text, so keep the directory out of the repository when it holds private material. The README mentions `bun` for working with the repository source.
How to disable. Remove the package with `npm uninstall -g @contextrie/cli` and delete the `.contextrie` directory in the project.
FAQ
How do I install the CLI?
Run `npm install -g @contextrie/cli`. The `contextrie` command appears in the terminal, and a model provider key is then required.
What does indexing create?
A `.contextrie` directory with `sources.json` holding source metadata. The `context.md` file appears after a request with `--task`.
Does it work with compatible APIs?
Yes, add `--openai-base-url` when you use an OpenAI-compatible provider.
How does the library differ from the CLI?
The library (`@contextrie/core`, `@contextrie/parsers`) embeds into your own agent system, while the CLI prepares a context file from local documents.
Is it production ready?
The README calls the status early development and warns of breaking changes. Pin versions.
Discussion
No questions or reviews yet.
Related
CLI toolsA Rust program that shrinks the command output an agent reads: drops build and test noise, folds repeated file reads and redacts credentials
A local context layer for coding agents: it understands the task, routes and compresses context and tracks the cost
ContextLattice: a local context layer for agents
ContextLattice
A local memory and context layer: a session's goal, decisions and evidence are gathered into a compact packet an agent reopens
A CLI and skill that build a reviewed ai_context.md briefing from chosen projects so ChatGPT gets context without any code upload.
A local context store for coding agents that captures project knowledge and reuses it across Codex, Claude Code and OpenCode
agenctx keeps project rules and warnings in the repo, and agents find the relevant ones by search instead of reading everything.
README in short
The README explains dynamic context curation, quick starts for the CLI and the library, the `core`, `parsers` and `cli` package layout, examples and links to the manifesto and demo.