Skip to main content

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 --relation governed_by --relation tested_by ./depmesh/cli/app.py

## governed_by

Specifications that apply to the input.

- @/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 input.

- @/depmesh/cli/tests/test_app.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 a Python file.
  • imported_by — Python files that import a Python file.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

depmesh-0.1.1.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

depmesh-0.1.1-py3-none-any.whl (69.1 kB view details)

Uploaded Python 3

File details

Details for the file depmesh-0.1.1.tar.gz.

File metadata

  • Download URL: depmesh-0.1.1.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for depmesh-0.1.1.tar.gz
Algorithm Hash digest
SHA256 10aa25aef54068b35755af630e77cb81b6a0a48e864220196e8ac0a7bd449388
MD5 cdfbf05835087201f2684c32ae6bc6b4
BLAKE2b-256 c916d8b3d7c2bb1a750555bde3ba41b21f498fff0b9f4204cc0de0a17eed128d

See more details on using hashes here.

Provenance

The following attestation bundles were made for depmesh-0.1.1.tar.gz:

Publisher: release.yaml on Tiendil/depmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file depmesh-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: depmesh-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 69.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for depmesh-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78cdcd107c8b1e00ae0a743d54ac2d6c90162b7458ceb02c33c60d8565dd8a22
MD5 8d53c055b53a54e913e0a498b00d4ed4
BLAKE2b-256 8e5edfa4ef360d015e914e94f621088a95cf1a5b649b21f4029732f04a5f7235

See more details on using hashes here.

Provenance

The following attestation bundles were made for depmesh-0.1.1-py3-none-any.whl:

Publisher: release.yaml on Tiendil/depmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page