Skip to main content

A universal dependency resolver supporting multiple package ecosystems

Project description

Universal Dependency Resolver

Resolve dependencies across PyPI (pip), npm, Cargo, Go, and more — detect conflicts, check system compatibility, and export to any format.

udr resolve numpy@pypi torch@pypi
  → numpy 1.26.2, torch 2.1.2+cu121 (CUDA 12.1)

Package availability

Source Install Published via
PyPI pip install ud-resolver GitHub Actions on release
GitHub Packages pip install ud-resolver --index-url https://pypi.pkg.github.com/code-with-zeeshan/ GitHub Actions on release
GHCR (Docker) docker pull ghcr.io/code-with-zeeshan/universal-dependency-resolver-backend:latest CI on every push
GitHub Releases Binary downloads from Releases Manual / CI tag

PyPI note: The package is published on PyPI as ud-resolver — install with pip install ud-resolver, not universal-dependency-resolver.


The Problem

You have a project that depends on packages from multiple ecosystems. A Python script calls a Node service. A Docker image needs both pip and apt packages. A CI pipeline must pin every transitive dependency across all of them.

Existing tools only work within one ecosystem (pip-compile, npm ls, bundler). Cross-ecosystem conflicts go undetected until runtime. System compatibility (GPU, CUDA, OS version) is never checked.

This tool solves that.

What It Does

Input:  ["requests>=2.25", "torch==2.0", "express@^4.18"]
                                ↓
               Fetch metadata from PyPI / npm / Conda / ...
               Detect target system (OS, GPU, Python, CUDA)
               Resolve conflicts with SAT solver
                                ↓
Output: Locked dependency tree + export (Dockerfile, requirements.txt, ...)

Quick Example

curl -X POST http://localhost:8000/api/v1/packages/resolve \
  -H "Content-Type: application/json" \
  -d '{
    "packages": [
      {"name": "requests", "ecosystem": "pypi"},
      {"name": "express", "ecosystem": "npm"}
    ],
    "auto_detect_system": true
  }'

Returns a resolved dependency tree with all transitive deps, conflict status, and system compatibility notes.

Feature What it does
Multi-ecosystem PyPI (pip), npm, Cargo, Go, Conda, Maven, NuGet, RubyGems, Linux packages, Homebrew
GPU-aware resolution Scans CUDA, cuDNN, GPU memory — resolves CUDA variants automatically
System scan Detects OS, CPU, GPU, Python, Node.js, GCC, Java
12 export formats Dockerfile, requirements.txt, package.json, docker-compose.yml, install.sh, CMakeLists.txt, pyproject.toml, environment.yml, Cargo.toml, build.gradle, pom.xml, Gemfile
CI/CD ready CLI for pipelines, health check endpoint, structured logging
Desktop app Cross-platform Electron app with integrated Python backend

Quick Start

PyPI (recommended)

pip install ud-resolver

Install with extras for additional features:

pip install "ud-resolver[system]"       # GPU & system scanning
pip install "ud-resolver[monitoring]"   # OpenTelemetry & Sentry
pip install "ud-resolver[security]"     # Auth & JWT support
pip install "ud-resolver[postgres]"     # PostgreSQL + Redis + Celery
pip install "ud-resolver[all]"          # Everything

GitHub Packages

pip install ud-resolver --index-url https://pypi.pkg.github.com/code-with-zeeshan/

This requires GitHub authentication. Create a PAT with read:packages scope and use it in ~/.netrc or PIP_EXTRA_INDEX_URL:

echo "machine pypi.pkg.github.com login $GITHUB_USER password $GITHUB_TOKEN" > ~/.netrc
pip install ud-resolver

From source

git clone https://github.com/code-with-zeeshan/universal-dependency-resolver.git
cd universal-dependency-resolver
pip install -e .

Use as CLI

# Start the API server
udr serve --port 8000

# Check system compatibility
udr check

# Resolve dependencies
udr resolve numpy pandas scikit-learn

# Resolve from other ecosystems
udr resolve react vue -e npm
udr resolve serde tokio -e crates

# Show system info
udr info

# Auto-detect manifests in project dir and lock all deps
udr lock

# Lock with explicit manifest
udr lock --manifest requirements.txt --manifest package.json

# Dry-run lock (no files written)
udr lock --dry-run

# Resolve with JSON output
udr resolve torch torchvision --format json

Desktop app

cd desktop
npm install
npm start

The Electron app spawns the Python backend automatically and opens the Vue.js UI. Binary downloads are available from GitHub Releases.

Web UI

cd frontend && npm install && npm run serve
# → http://localhost:8080

The frontend connects to the backend at http://localhost:8000 (configurable via VUE_APP_API_URL).

Use as Python Library

import asyncio
from backend.core.data_aggregator import DataAggregator
from backend.core.conflict_resolver import ConflictResolver
from backend.core.system_scanner import SystemScanner
from backend.manifest_detector import ManifestDetector

async def main():
    scanner = SystemScanner()
    system_info = await scanner.scan_all()
    print(system_info["platform"]["system"], system_info["cpu"]["brand"])

    aggregator = DataAggregator()
    data = await aggregator.get_package_info("torch", ecosystem="pypi",
                                              include_dependencies=True,
                                              include_versions=True)
    print(data["name"], data["versions"])

    detector = ManifestDetector("./my-project")
    manifests = detector.detect()
    packages = detector.normalize(detector.parse_all(manifests))
    print(f"{len(packages)} packages found")

asyncio.run(main())

Docker (production)

Pre-built images are available on GitHub Container Registry (GHCR):

docker pull ghcr.io/code-with-zeeshan/universal-dependency-resolver-backend:latest
docker pull ghcr.io/code-with-zeeshan/universal-dependency-resolver-frontend:latest

Or build and run locally:

cp .env.example .env
docker compose up -d
docker compose exec backend alembic upgrade head

# Frontend:  http://localhost:8080
# API Docs:  http://localhost:8000/api/v1/docs

Note: The Docker images are published automatically via CI on every push to main and on tags (v*).

How It Works

Your request → Fetch metadata from ecosystem registries
                   ↓
            Scan target system (OS, GPU, Python, CUDA)
                   ↓
            Resolve conflicts with SAT solver
                   ↓
            Export to 12 formats

The system runs as a FastAPI service with optional PostgreSQL, Redis, and a Vue.js frontend.

API Quick Reference

Endpoint Method Purpose
/api/v1/packages/search GET Search across ecosystems
/api/v1/packages/{ecosystem}/{name} GET Get package info
/api/v1/packages/versions GET List versions
/api/v1/packages/resolve POST Resolve dependencies
/api/v1/packages/export POST Export to any format
/api/v1/packages/export-formats GET Available export formats
/api/v1/system/info GET System information
/api/v1/system/check-compatibility POST Check dependency-system fit
/api/v1/scan/github POST Scan a GitHub repo
/api/v1/scan/upload POST Scan an uploaded archive
/api/v1/scan/local POST Scan a local directory
/api/v1/health GET Health check

Full reference in docs/API.md.

Testing

# Unit tests
python -m pytest tests/unit/

# Frontend tests
cd frontend && npm run test:unit

# E2E tests (requires Chromium)
cd frontend && npm run test:e2e

Roadmap

Priority Feature Status
🔴 High Python SDK with async support ✅ Done
🔴 High CLI tool for CI/CD ✅ Done
🟡 Medium JavaScript/TypeScript SDK Planned
🟡 Medium CI/CD integration examples (GitHub Actions, GitLab CI) Planned
🟡 Medium SBOM export (CycloneDX, SPDX) Planned
🟡 Medium Visual dependency graphs Planned
🟢 Low Plugin system for custom ecosystems Researching

See docs/DEPLOYMENT.md for production deployment, CONTRIBUTING.md to contribute, and LICENSE for licensing (MIT).

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

ud_resolver-1.1.0.tar.gz (181.7 kB view details)

Uploaded Source

Built Distribution

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

ud_resolver-1.1.0-py3-none-any.whl (202.8 kB view details)

Uploaded Python 3

File details

Details for the file ud_resolver-1.1.0.tar.gz.

File metadata

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

File hashes

Hashes for ud_resolver-1.1.0.tar.gz
Algorithm Hash digest
SHA256 adf95f62af9e3327e4d082bba88f9c7f601bc48148bc44c986ed771ad1eef85e
MD5 15f58dcffe355ef150fd66e682e485a6
BLAKE2b-256 eebd812f94f5050e156005ab5ab4762596a9d8284b131f78053f466c5c2fe2f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ud_resolver-1.1.0.tar.gz:

Publisher: publish.yml on code-with-zeeshan/universal-dependency-resolver

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

File details

Details for the file ud_resolver-1.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ud_resolver-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f45a55699d6905a95cf0133a83b43862a8a762990389204be1389fcd9e76f5c
MD5 968e2119fa6d74650353c3a9487dd4a1
BLAKE2b-256 52efaa04bf2e1278927afa2e0a98b8103b2e047955ac75e4dd7094d0be28759e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ud_resolver-1.1.0-py3-none-any.whl:

Publisher: publish.yml on code-with-zeeshan/universal-dependency-resolver

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