Install

Up and running in one command.

Python 3.10+. No vendor SDKs. No API keys for scan, plan, workflow or triage — the model is optional everywhere.

  1. 1

    Install from source

    Editable install puts the deadpath command on your PATH.

    git clone https://github.com/wolfxops/deadpath.git
    cd deadpath
    pip install -e ".[dev]"
  2. 2

    First win: the fixture scan

    Offline, deterministic, exit code 1 because high-confidence dead code exists.

    deadpath scan --mock

    You should see pkg/orphan.py as an orphan_file block (0.92), dead_symbol as an unused_export block (0.88), and maybe_dead as a warn (0.58) because its module is imported whole.

  3. 3

    See the judge table

    Prosecution vs devil's advocate. The fixture's pkg/nightly.py is a cron job, not dead code.

    deadpath judge --mock
  4. 4

    See the guided workflow

    Verify → edit → validate → remember steps, with judge and triage verdicts (heuristic when no key is set).

    deadpath workflow --mock
  5. 5

    Scan your own repository

    Languages and frameworks are detected automatically. Memory is created at .deadpath/memory.json; add it to .gitignore or commit it to share decisions.

    cd ~/code/your-service
    deadpath scan --format md
    deadpath scan --format sarif > deadpath.sarif
  6. 6

    Connect your agent

    One stdio MCP server for Claude Code, Cursor and Codex.

    deadpath mcp

    Tools: deadpath.scan, deadpath.judge, deadpath.workflow, deadpath.triage, deadpath.plan, deadpath.explain, deadpath.remember, deadpath.memory, deadpath.languages. Plugins show a markdown table. See Plugins.

Optional: enable the model

Only explain and triage (stage-four counsel) ever call a model, over plain OpenAI-compatible HTTP. Graph, confidence, and judge stay offline.

export DEADPATH_API_KEY=...          # or OPENAI_API_KEY
export DEADPATH_BASE_URL=https://api.openai.com   # any OpenAI-compatible endpoint
export DEADPATH_MODEL=gpt-4o-mini    # optional
deadpath triage                      # veto-only: remove first, then verify; verdicts cached

Budget guarantee. Keep and note findings are never sent. Remove then verify/warn are sent once, at most --max-items (default 8) per run, as evidence packets without file bodies. The model cannot strengthen a verify into likely_dead. Unchanged findings are never re-asked.

GitHub Action

- uses: wolfxops/deadpath@main
  with:
    path: .
    format: sarif
    only_new: true
    output: deadpath.sarif

Use deadpath scan --only-new in CI to fail only on new high-confidence dead code while a legacy backlog is worked down.

Run the tests

pytest -q