Skip to main content

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"]
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

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. Restrict it to a node's closure, edge kinds or tags:

blinkered graph report --via reads,joins --exclude-tag infra --indent 2

For example, a Mermaid flowchart with jq:

blinkered graph | jq -r '"flowchart LR", (.edges[] |
  "  \(.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 --force deletes 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, then blinkered workspace.
  • Package __init__.py files 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.md by 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.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blinkered 0.0.5
File Size Uploaded Provenance Actions
blinkered-0.0.5.tar.gz 22.8 kB With provenance Details for blinkered-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blinkered 0.0.5
File Interpreter ABI Platform Actions
blinkered-0.0.5-py3-none-any.whl Python 3 none any Details for blinkered-0.0.5-py3-none-any.whl

Total release size: 40.0 kB

Release files / blinkered-0.0.5.tar.gz

Download URL blinkered-0.0.5.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
498ecd06e47bd02e1cb624d375705d6f0f23bff91929c92c46991c82450a1219
BLAKE2b-256 checksum
How to use checksums
dab1493c67740b3fea8fc8ed71d29912b881ca9eb3957db23b610560d8ba5049
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 Sep 27, 2026.

Transparency log

Release files / blinkered-0.0.5-py3-none-any.whl

Download URL blinkered-0.0.5-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af316752378c2e984ad65fb274f384563060a802cf6c3ba106cfd956f2bff112
BLAKE2b-256 checksum
How to use checksums
3f66217a3d6d6c7e9381174370faebcc9d8b8a84d9a3eab3a6989500084e119e
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 Sep 27, 2026.

Transparency log

Security for blinkered 0.0.5

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.

Select from 2 files

Attestation for blinkered-0.0.5.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 Sep 27, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page