Scopix
Scopix picks the code an AI model needs for a task. Give it a task and a token budget, and it returns the most useful files, functions and line ranges, with a reason for each one. It runs on your machine with no account or cloud service. Local AI is optional and experimental.
Install
Scopix needs Python 3.11 or later.
pip install scopix
Quick start
cd your-repo
scopix init
scopix select "fix the authentication refresh logic" --budget 6000
scopix export "fix the authentication refresh logic" --budget 6000 --output context.md
init creates .scopix/ and indexes the repository. select prints the context,
and export saves it. Each result looks like this:
### 1. `src/payments/retry-policy.ts` (lines 1-61, ~469 tokens)
**Why:** imported by tests/payment-retry.test.ts (distance 1); defines
`RetryPolicy.shouldRetryResult` which matches the task; matches task terms
`retry`, `payment`, `attempt`
Use with coding agents
Scopix can run as an MCP server, so agents such as Claude Code can ask it for context. See the setup guide for other clients.
pip install "scopix[mcp]"
claude mcp add scopix -- scopix serve --path /path/to/repo
Python API
from scopix import Scopix
with Scopix(".") as engine:
engine.initialize()
engine.index() # only changed files are parsed after the first run
result = engine.select("add retry handling", token_budget=4000)
for item in result.items:
print(item.path, item.start_line, item.end_line, item.tokens)
print(result.to_markdown()) # or to_json(), to_text(), to_xml()
How well it works
On 45 unseen commits from 9 projects, Scopix found 39% of the changed files in 2,000 tokens, while grep needed 16,000 tokens to reach 38%. It still misses about 4 in 10 at 8,000 tokens. See the benchmark.
Commands
| Command | What it does |
|---|---|
scopix init |
Create .scopix/ and build the index |
scopix index |
Update the index |
scopix select "task" |
Print context for a task |
scopix explain "task" |
Show why each item was chosen |
scopix export "task" |
Write context as Markdown, JSON, text or XML |
scopix stats |
Show index statistics |
scopix graph |
Show the dependency graph |
scopix watch |
Re-index when files change |
scopix serve |
Run an MCP server for coding agents |
scopix bench |
Compare results with simple baselines |
scopix feedback |
Mark a file as helpful or not |
scopix profile |
Manage selection profiles |
scopix model |
Set up an optional local AI model |
scopix config |
Show or change settings |
Run scopix COMMAND --help for options, or see the reference.
Languages
Scopix parses TypeScript, JavaScript, Python, Go, Java, Rust, PHP and C#. It indexes other text files with less detail.
Privacy
By default, Scopix sends nothing over the network and never runs your code. It skips
files that match secret patterns such as .env and *.pem. Some optional features
use the network.
License
MIT. See LICENSE.
Metadata
Release files for scopix 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scopix-0.1.0.tar.gz | 219.8 kB | With provenance | Details for scopix-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scopix-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for scopix-0.1.0-py3-none-any.whl |
Total release size: 381.0 kB
Release files / scopix-0.1.0.tar.gz
| Download URL | scopix-0.1.0.tar.gz |
|---|---|
| Size | 219.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19f2ac1bf2c949e6926de4b48da44c27c313faf5443ed9b9b1435a480692b031
|
|
BLAKE2b-256 checksum How to use checksums |
16829dcbb56669561d29f30cb3cc0493381cfb425ad54b0efe7a6142371e4e7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / scopix-0.1.0-py3-none-any.whl
| Download URL | scopix-0.1.0-py3-none-any.whl |
|---|---|
| Size | 161.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f98aa2707327dfa73e3a5d980decf84b83ea101f20cb9203e2bb43f786863b1
|
|
BLAKE2b-256 checksum How to use checksums |
dc74029f52b53dadf612c2327c8f7eb6c65b8ead00cafc0e7bd2062045f48eae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for scopix 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scopix-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.