Unified, deterministic CLI for coding agents to discover relationships between project files and artifacts.
Project description
depmesh
depmesh is a CLI tool that helps agents and developers investigate how project artifacts depend on each other.
Use it to explore a codebase, find related files, inspect the impact of a possible change, locate tests or specifications, and follow project-specific relationships that are hard to remember or discover manually.
depmesh gives one stable interface for navigating dependency relationships, while each project decides how dependencies are discovered exactly: path patterns, fixed lists, filesystem searches, static-analysis commands, or project-specific scripts.
Example
Before changing a CLI module, ask depmesh for the specifications and tests connected to it:
> depmesh -p llm dependencies -r governed_by -r tested_by ./depmesh/cli/application.py
## governed_by
Specifications that apply to the artifact.
- @/specs/architecture/entities.md
- @/specs/architecture/errors.md
- @/specs/architecture/modules_layout.md
- @/specs/architecture/naming.md
- @/specs/architecture/static_analysis.md
- @/specs/architecture/tests.md
- @/specs/behavior/cli.md
- @/specs/behavior/file_paths.md
## tested_by
Tests that verify the artifact.
- @/depmesh/cli/tests/test_application.py
Rationale
Coding agents often need to answer practical questions before editing:
- Which tests should be read before changing this file?
- Which specifications govern this module?
- Which files import this shared helper?
- Which artifacts are affected by this specification change?
depmesh answers those questions through configured relations.
For example, a project can define relations such as:
tested_by— tests that verify an artifact.governed_by— specifications that apply to an artifact.imports— Python files imported by an artifact.imported_by— Python files that import an artifact.
Features
- Unified interface for discovering project dependencies.
- Configurable ways to detect dependencies behind the scenes: path patterns, fixed lists, calling CLI commands, or running project-specific scripts.
Quick Usage
List available relations first:
depmesh relations
Query dependencies for an artifact:
depmesh dependencies ./src/app.py
Query selected relations:
depmesh dependencies --relation governed_by --relation tested_by ./src/app.py
Initialize a starter configuration:
depmesh init
Read detailed agent-oriented usage:
depmesh skill usage
Other built-in docs:
depmesh skill configuration
depmesh skill initialization
Installation
Install depmesh from PyPI in the environment where your agent or tools run:
uv tool install depmesh
# or
pip install depmesh
Then initialize a starter configuration in the project root:
depmesh init
The starter depmesh.toml is valid, but it is only a starting point. Edit it so it describes the dependency relations that matter in your project.
Tell agents to use depmesh by adding a short note to AGENTS.md:
Use `depmesh` to discover dependencies between project artifacts.
Agents MUST use `depmesh` for dependency types supported by its configuration.
At the start of each work session, run `depmesh skill usage`.
You can ask a coding agent to help fill the configuration. A good prompt is:
Inspect this project and update depmesh.toml with useful dependency relations.
Start by reading output of `depmesh skill initialization` and `depmesh skill configuration`.
This repository uses depmesh for its own dependency mapping. See depmesh.toml for a real configuration example.
Configuration
depmesh is useful only when the project has a meaningful depmesh.toml.
The configuration declares:
- relations that can be queried.
- rules that match queried artifacts.
- sources that produce dependency artifacts.
Minimal relation example:
version = 1
[[relations]]
id = "tested_by"
description = "Tests that verify the artifact."
[[rules]]
relation = "tested_by"
input = { type = "glob", pattern = "./src/{*module}.py" }
output = { type = "files", pattern = "./tests/test_{module}.py" }
This defines one relation named tested_by. The rule matches source files like ./src/app.py, captures app as module, and looks for ./tests/test_app.py as the dependency.
Run depmesh skill configuration for the agent-oriented configuration guide.
For the full configuration contract, see the configuration specification.
Specifications
Project behavior and architecture are specified in ./specs. Start with ./specs/intro.md when looking for the source of truth.
Development
Development commands run through Docker:
./bin/dev.sh uv run -- pytest
./bin/dev.sh uv run -- depmesh relations
Build development containers only after approved Docker or dependency changes:
./bin/dev-build-containers.sh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file depmesh-0.1.2.tar.gz.
File metadata
- Download URL: depmesh-0.1.2.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
454fe930ba9236b1f9f7bbcb70fbce20b817ee88b1967ddfe09f79921143459c
|
|
| MD5 |
8d0b20dee1b4ca9b76a16ead1f24f0be
|
|
| BLAKE2b-256 |
09400d6aae9a4dbe875f7af4e9e10617ce21a674b6bbd40c872bafe2a5d25ea8
|
Provenance
The following attestation bundles were made for depmesh-0.1.2.tar.gz:
Publisher:
release.yaml on Tiendil/depmesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
depmesh-0.1.2.tar.gz -
Subject digest:
454fe930ba9236b1f9f7bbcb70fbce20b817ee88b1967ddfe09f79921143459c - Sigstore transparency entry: 1437427611
- Sigstore integration time:
-
Permalink:
Tiendil/depmesh@8d119a9047ddb03843fdf8552f9232baf07af3bc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Tiendil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8d119a9047ddb03843fdf8552f9232baf07af3bc -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file depmesh-0.1.2-py3-none-any.whl.
File metadata
- Download URL: depmesh-0.1.2-py3-none-any.whl
- Upload date:
- Size: 69.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
198a3bae748f8bea7a5159eea1e350df859fcea90b0b8fdeac3a800a730d92bc
|
|
| MD5 |
b5dbe3b52e9826098f529a7ed5432723
|
|
| BLAKE2b-256 |
1cf994f0424aba8cb4c96df60a93994815665312e39cc22b34f639563934a113
|
Provenance
The following attestation bundles were made for depmesh-0.1.2-py3-none-any.whl:
Publisher:
release.yaml on Tiendil/depmesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
depmesh-0.1.2-py3-none-any.whl -
Subject digest:
198a3bae748f8bea7a5159eea1e350df859fcea90b0b8fdeac3a800a730d92bc - Sigstore transparency entry: 1437427617
- Sigstore integration time:
-
Permalink:
Tiendil/depmesh@8d119a9047ddb03843fdf8552f9232baf07af3bc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Tiendil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8d119a9047ddb03843fdf8552f9232baf07af3bc -
Trigger Event:
workflow_dispatch
-
Statement type: