Skip to main content

AI-powered dependency update advisor built with LangGraph

Project description

DepAdvisor

AI-powered dependency update advisor — Know what to update, why, and in what order.

CI Python 3.11+ License: MIT


DepAdvisor analyzes your project's dependencies, checks for available updates, fetches vulnerability data and changelogs, then uses an LLM to produce risk-scored, prioritized update recommendations.

Unlike Dependabot or Renovate which tell you that updates exist, DepAdvisor tells you why you should or shouldn't update, what will break, and in what order to proceed.

Features

  • Multi-ecosystem: Python (pip/poetry), Node.js (npm), Java (Maven)
  • Risk scoring: Each update gets a 1-10 risk score with plain English explanation
  • Vulnerability aware: Integrates with OSV.dev for known CVE detection
  • Changelog analysis: Fetches GitHub release notes to identify breaking changes
  • Local-first: Runs entirely locally with Ollama — no API keys needed
  • Cloud LLM support: Optional OpenAI integration for faster analysis
  • Multiple outputs: Terminal (Rich), Markdown, JSON, GitHub comment format
  • CI/CD ready: --fail-on critical exits with code 1 for pipeline gating
  • HTTP API: FastAPI server mode for team dashboards and integrations

Quick Start

Install

pip install depadvisor

Or with UV:

uv tool install depadvisor

Install Ollama (for local LLM)

# macOS
brew install ollama

# Linux
curl -fsSL https://ollama.com/install.sh | sh

# Download the model
ollama pull qwen3:8b

Run

# Analyze current directory
depadvisor analyze .

# Analyze a specific project with options
depadvisor analyze ./my-project --ecosystem python --format markdown

# Analyze a remote git repository (cloned automatically, cleaned up after)
depadvisor analyze https://github.com/pallets/flask.git -v

# Quick vulnerability scan (no LLM needed) — works with local paths and git URLs
depadvisor scan .
depadvisor scan https://github.com/expressjs/express.git

# Use OpenAI instead of local Ollama
depadvisor analyze . --llm openai/gpt-4o-mini

CLI Reference

depadvisor analyze

Run a full dependency analysis with LLM-powered risk assessment. Accepts local paths or git URLs (HTTPS/SSH).

Usage: depadvisor analyze [PATH] [OPTIONS]

Arguments:
  PATH                    Local path or git URL of the project [default: .]

Options:
  -e, --ecosystem TEXT    Force ecosystem: python, node, java (auto-detected)
  -l, --llm TEXT          LLM provider/model (default: ollama/qwen3:8b)
  -f, --format TEXT       Output: terminal, markdown, json, github-comment
  -o, --output TEXT       Write to file instead of stdout
  --fail-on TEXT          Exit code 1 if risk level found: critical, high, medium
  --include-dev           Include dev dependencies
  -v, --verbose           Show detailed progress

depadvisor scan

Quick vulnerability-only scan. No LLM required. Accepts local paths or git URLs.

Usage: depadvisor scan [PATH] [OPTIONS]

Arguments:
  PATH                    Local path or git URL of the project [default: .]

Options:
  -e, --ecosystem TEXT    Force ecosystem: python, node, java

depadvisor serve

Start the HTTP API server.

Usage: depadvisor serve [OPTIONS]

Options:
  -h, --host TEXT         Host to bind to [default: 0.0.0.0]
  -p, --port INT          Port [default: 8888]

Supported Ecosystems

Ecosystem Dependency Files Registry
Python requirements.txt, pyproject.toml (PEP 621 + Poetry) PyPI
Node.js package.json npm
Java pom.xml Maven Central

Architecture

DepAdvisor LangGraph Pipeline

The agent pipeline flows through six nodes with conditional routing:

  • parse_deps — Reads dependency files from the project
  • check_updates — Queries package registries (PyPI, npm, Maven Central)
  • fetch_vulns — Checks OSV.dev for known vulnerabilities
  • fetch_changelogs — Fetches release notes from GitHub
  • analyze_risk — LLM scores each update for risk (with retry on failure)
  • generate_report — LLM generates a prioritized summary

If no updates are found, the pipeline skips directly to report generation.

Built with LangGraph for agent orchestration.

Configuration

Environment Variables

Variable Description Default
DEPADVISOR_LLM_PROVIDER LLM provider ollama
DEPADVISOR_LLM_MODEL LLM model name qwen3:8b
OLLAMA_BASE_URL Ollama server URL (for remote Ollama) http://localhost:11434
OPENAI_API_KEY OpenAI API key (if using OpenAI) -
GITHUB_TOKEN GitHub token for higher API rate limits -
DEPADVISOR_CACHE_DIR Cache directory ~/.cache/depadvisor
LANGSMITH_TRACING Enable LangSmith tracing (optional) -
LANGSMITH_API_KEY LangSmith API key (optional) -
LANGSMITH_PROJECT LangSmith project name (optional) -
LANGSMITH_ENDPOINT LangSmith API endpoint (optional) https://api.smith.langchain.com

LangSmith tracing: If LANGSMITH_TRACING=true and LANGSMITH_API_KEY are set, all LangGraph agent runs are automatically traced in LangSmith. Each run is tagged with the ecosystem, LLM provider, and project name for easy filtering. No code changes needed — just set the environment variables.

CI/CD Integration

# .github/workflows/dependency-review.yml
name: Dependency Review
on:
  schedule:
    - cron: '0 9 * * 1'  # Weekly on Monday 9am

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install depadvisor
      - run: |
          depadvisor analyze . \
            --llm openai/gpt-4o-mini \
            --format github-comment \
            --output report.md \
            --fail-on critical
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

HTTP API

# Start server
depadvisor serve --port 8888

# Analyze a project
curl -X POST http://localhost:8888/api/v1/analyze \
  -H "Content-Type: application/json" \
  -d '{"project_path": "/path/to/project", "ecosystem": "python"}'

# Health check
curl http://localhost:8888/health

Development

git clone https://github.com/chaubes/depadvisor.git
cd depadvisor
uv sync --all-extras

# Run tests
make test-unit
make test-integration

# Lint
make lint

# Run the CLI
make run ARGS="analyze tests/fixtures/python"

See CONTRIBUTING.md for the full development guide.

License

MIT License. See LICENSE.

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

depadvisor-0.1.2.tar.gz (183.9 kB view details)

Uploaded Source

Built Distribution

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

depadvisor-0.1.2-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file depadvisor-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for depadvisor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 248598039de720bceec9301147f211beb277ce200cacfc78b9070e6e47089c3b
MD5 63daf58086b5e37c4420f805de6fb515
BLAKE2b-256 05f3e19275f2a42fbaea144130841d7e36adcd5023980a94fead4403d4e75863

See more details on using hashes here.

Provenance

The following attestation bundles were made for depadvisor-0.1.2.tar.gz:

Publisher: release.yml on chaubes/depadvisor

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

File details

Details for the file depadvisor-0.1.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for depadvisor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee9a8149941ac81a80739da1ac10bd2aed2722b6e7dbeec6b8c230816c5861a
MD5 ecb8fb47a90f92058147f09a205bcaf5
BLAKE2b-256 ad89f8cc7462fea539669a743308863533def8b4264e84b2ca28a94b857b50ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for depadvisor-0.1.2-py3-none-any.whl:

Publisher: release.yml on chaubes/depadvisor

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