Visualize your GitHub Actions dependency tree — the npm ls that Actions never got.
GitHub Actions provides zero visibility into transitive dependencies. Composite actions can include other actions, which include others, creating invisible dependency chains. actions-graph parses your workflow YAML files, recursively resolves composite action dependencies via the GitHub API, and produces a visual dependency tree with risk assessment.
pip install actions-graphOr with uv:
uv tool install actions-graph# Show dependency tree (auto-discovers .github/workflows/*.yml)
actions-graph tree
# Limit tree depth
actions-graph tree --depth 3
# Export as Mermaid diagram
actions-graph export --format mermaid
# Export as DOT (Graphviz)
actions-graph export --format dot | dot -Tpng -o graph.png
# Export as JSON
actions-graph export --format json
# Compare two workflow files
actions-graph diff workflow-a.yml workflow-b.yml
# Audit with risk assessment
actions-graph auditSet the GITHUB_TOKEN environment variable for API access. Without it, you'll be rate-limited to 60 requests/hour.
export GITHUB_TOKEN=ghp_your_token_here
actions-graph treeDisplay the dependency tree in the terminal using Rich. If no files are given, auto-discovers workflows in .github/workflows/.
--depth N— Limit display depth--no-cache— Disable the local SQLite cache
Export the dependency graph in one of three formats:
- mermaid — Mermaid flowchart for GitHub PR comments
- dot — Graphviz DOT format (pipe to
dotfor rendering) - json — JSON adjacency list with full metadata
Compare two workflow files and display added/removed action dependencies. Useful for reviewing PRs.
Display the dependency tree plus a risk summary. Each action is scored based on:
- Mutable tag — uses a tag (e.g.,
v4) instead of a pinned SHA - Unverified creator — action owner is not in the known-good list
- High depth — transitive dependency depth exceeds 3
Risk levels: LOW, MEDIUM, HIGH, CRITICAL (based on number of risk factors).
Print version and exit.
API responses are cached in a SQLite database at ~/.cache/actions-graph/cache.db with a 24-hour TTL. Use --no-cache to bypass.
- Parse — Reads workflow YAML and extracts
uses:references - Resolve — Fetches
action.ymlfrom GitHub API for each action; if composite, recursively resolves child actions - Graph — Builds a NetworkX directed graph of all dependencies
- Assess — Scores each node for risk factors
- Render — Outputs as Rich tree, Mermaid, DOT, or JSON
git clone https://github.com/your-org/actions-graph
cd actions-graph
uv sync
uv run pytest
uv run ruff check .- Fork the repository
- Create a feature branch
- Write tests for your changes
- Ensure
uv run pytestanduv run ruff check .pass - Submit a pull request
MIT — see LICENSE for details.