flash-context
A lightweight, model-agnostic repository explorer that combines deterministic lookup with delegated LLM search to deliver compact, validated source evidence. Available as a Python CLI and Model Context Protocol (MCP) server.
Delegate recursive, repetitive file search and reading to a utility model behind an OpenAI-compatible endpoint. The calling agent receives validated file-line citations and source snippets to use in its main task.
Codebases and repositories are the current focus; the same tools explore
documentation, configuration, and other local text files. CLI and MCP share one
exploration core with read-only tools, path safety, and resource limits.
Scans and regex execution are bounded; partial results report truncation.
Citation validation checks safe paths and existing line coverage, not semantic
relevance or minimal ranges. Citation precision depends on the explorer model.
Implementation queries continue past documentation-only citations within the turn budget; documentation-only
fallbacks carry incomplete-result metadata and warnings. Build outputs such as
dist/ remain excluded; inspect a source checkout for implementation evidence.
Optional metadata-only trajectory logs must stay outside the inspected repository.
Inspired by FastContext, a now-withdrawn paper on separating repository exploration from task solving, using specialized models to return focused file-line evidence while reducing the coding agent's context and token overhead.
Quickstart
Requires Python 3.13+, uv, and an OpenAI-compatible model endpoint with tool
calling support.
uv tool install flash-context
export FLASH_CONTEXT_BASE_URL=http://localhost:1234/v1
export FLASH_CONTEXT_MODEL=your-model
flash-context explore --repo . --query "Find the request validation logic"
Replace the endpoint and model with your settings. Set FLASH_CONTEXT_API_KEY
if authentication is required. Installed commands use environment variables;
source checkouts also support project-root config.yaml and .env.
Default output is repository-relative citations:
src/api/validation.py:42-88
Use --format json for structured results with source snippets, or
--max-turns 6 to set the exploration limit. Exact path and unique symbol
lookups can resolve locally without an endpoint. See the
CLI contract for options,
output schemas, and exit codes.
For example, --query 'httpx/_client.py' returns a bounded file preview, while
--query 'BaseTransport' returns its definition if unique within a complete
Python source/stub scan. Local successes report turns_used: 0 in JSON.
Warnings go to stderr in both output formats. An empty result after scan-budget exhaustion exits 6 while preserving stdout; a complete empty search exits 0. For large repositories, see scan-budget tuning.
MCP
uvx --from 'flash-context[mcp]' flash-context mcp --transport stdio
Exposes explore_repository(query, repo_root?, max_turns?, citation?).
See MCP integration for editor configuration and source launches.
Documentation
- Configuration: endpoint settings, precedence, and limits.
- Architecture and scope: design, status, specs, and references.
- Contributing: development setup, tests, and pull requests.
- Changelog: release history and migration instructions.
- Releasing: package checks and tag-driven TestPyPI/PyPI publishing.
License
Metadata
Release files for flash-context 0.3.1
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 |
|---|---|---|---|---|
| flash_context-0.3.1.tar.gz | 32.5 kB | With provenance | Details for flash_context-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flash_context-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for flash_context-0.3.1-py3-none-any.whl |
Total release size: 67.5 kB
Release files / flash_context-0.3.1.tar.gz
| Download URL | flash_context-0.3.1.tar.gz |
|---|---|
| Size | 32.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3273170e640c2fc4daa9c4b4eff9375e7ff3a3908420fc13fd1d187de44f1367
|
|
BLAKE2b-256 checksum How to use checksums |
1477da88e9dd26a0110c759164f37438ec3926aa62935e5478052f5108a47329
|
| 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 1, 2026.
Transparency logRelease files / flash_context-0.3.1-py3-none-any.whl
| Download URL | flash_context-0.3.1-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00618756bf17f17b5bedd4899b11cbc081eee2a9085a39ca02c44179e11ade6f
|
|
BLAKE2b-256 checksum How to use checksums |
b517d4654d0f039499b6c34bc1c819d36d257c9a2361142dc5018671ff9dfc4c
|
| 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 1, 2026.
Transparency logSecurity for flash-context 0.3.1
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 flash_context-0.3.1.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 1, 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.