blinkered
Work on one node of a repository while the working tree shows only its dependency closure.
Each node is a directory with a blinkered.toml manifest declaring free-form tags and edges to other nodes. A node's id is its path below nodes_root (e.g. rvbr/pdr), so directories that group nodes act as namespaces; edges may use the full id or, when unique, the last segment. blinkered workspace <node> narrows the working tree, through git's cone-mode sparse checkout, to that node and everything it depends on. The graph can grow arbitrarily large and deep while each piece of work stays small.
Requirements
Python 3.11 or later and git 2.35 or later. Tested with git 2.50.
Installation
pipx install blinkered # or: uv tool install blinkered, pip install blinkered
Usage
# blinkered.toml at the repository root: configuration
nodes_root = "src/nodes"
always = ["lib"]
[plugins]
python_imports = true
# src/nodes/report/blinkered.toml: a node
tags = ["transform"]
[edges]
reads = ["selection"]
joins = ["lookup"]
imports = ["lookup", "selection"] # written by blinkered python-imports --write
blinkered check # validate manifests, graph and layout
blinkered closure report # report and its transitive dependencies
blinkered workspace report # narrow the working tree to that closure
blinkered workspace a b # union of several closures
blinkered workspace --exclude-tag legacy # everything except legacy nodes
blinkered status # compare the view with the closure after pulls or edits
blinkered workspace # resync the stored selection
blinkered workspace --all # restore the full working tree
blinkered graph # nodes and edges as JSON
blinkered python-imports --write # rewrite imports edges from the code (plugin)
See SPEC.md for the model, layout rules and full behaviour.
Example
A repository with six nodes, each a directory with a manifest:
blinkered.toml # root configuration: nodes_root = "nodes"
nodes/
├── utils/ # tags = ["infra"]
├── source/ # uses = ["utils"]
├── cleaned/ # reads = ["source"]
├── lookup/ # reads = ["source"]
├── report/ # reads = ["cleaned"], joins = ["lookup"]
└── sketch/ # reads = ["source"]
report depends on everything except sketch:
$ blinkered closure report
report
cleaned
lookup
source
utils
Focusing on report removes sketch from the working tree; the other nodes and root files stay:
$ blinkered workspace report
focus: report
nodes/cleaned
nodes/lookup
nodes/report
nodes/source
nodes/utils
Uncommitted work never disappears silently. With an edit in sketch, narrowing is refused:
$ blinkered workspace report
refusing: these paths would leave the view
modified: nodes/sketch/sketch.py: would stay on disk outside the view
When an edit or a pull changes the graph, status reports the drift and workspace resyncs. After adding uses = ["sketch"] to report:
$ blinkered status
focus: report
missing: nodes/sketch
→ run `blinkered workspace` to resync
$ blinkered workspace
focus: report
nodes/cleaned
nodes/lookup
nodes/report
nodes/sketch
nodes/source
nodes/utils
Graph
blinkered graph emits the graph as JSON (version, nodes, edges) for any tool to display. Filters on tags and edge kinds come first; a node then restricts it to what it depends on and what depends on it, each to a number of steps:
blinkered graph report --via reads,joins --exclude-tag infra --indent 2 # filtered, around report
blinkered graph subset --dependencies 0 --dependents 1 # direct dependents only
Each edge is flagged implied when another path joins the same nodes. For example, a Mermaid flowchart with jq, without implied edges:
blinkered graph | jq -r '"flowchart LR", (.edges[] | select(.implied | not) |
" \(.source | gsub("/"; "_"))[\(.source)] -- \(.kind) --> \(.target | gsub("/"; "_"))[\(.target)]")'
Scope
blinkered manages what the working tree shows. It does not run tests, install git hooks, use worktrees, cache data or execute nodes.
Caveats
workspace --forcedeletes ignored files inside nodes leaving the view; git removes them and they cannot be recovered. Without--force, blinkered refuses and lists them.- Merge conflicts in files outside the view appear on disk; resolve them with
git add --sparse, commit, thenblinkered workspace. - Package
__init__.pyfiles must not import sibling nodes, or every import fails in a partial tree. - Nodes cannot nest, and directories that group nodes may only hold a
README.mdby default (grouping_allow); other files there would be visible in every view.
Development
pip install -e '.[dev]'
pytest -q
Metadata
Release files for blinkered 0.0.6
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 |
|---|---|---|---|---|
| blinkered-0.0.6.tar.gz | 27.1 kB | With provenance | Details for blinkered-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blinkered-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for blinkered-0.0.6-py3-none-any.whl |
Total release size: 47.4 kB
Release files / blinkered-0.0.6.tar.gz
| Download URL | blinkered-0.0.6.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cede7a7879c46eea824bf55f87c96ade157815afa6a240b1393f88ea506b380
|
|
BLAKE2b-256 checksum How to use checksums |
3e60b9a842119916454f42a48d77ac606c3e3332ae3ab7e2f9c4598676bd35a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 1, 2026.
Transparency logRelease files / blinkered-0.0.6-py3-none-any.whl
| Download URL | blinkered-0.0.6-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b1aea3d16b4052e9fed9bba4ed9037e4152b059e2185e09b7732b5fad230371
|
|
BLAKE2b-256 checksum How to use checksums |
ce657d6a4c78ef168f6024b61b4e2cac2c4f483d6e31c1acbda4e5b3825a0cb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 1, 2026.
Transparency logSecurity for blinkered 0.0.6
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
Both files in this release have been uploaded with provenance metadata.
Attestation for blinkered-0.0.6.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 Oct 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.