CLI tool for fetching and caching source code of packages from npm, PyPI, crates.io, and GitHub/GitLab/Bitbucket repositories. v0.7.2 (active). Resolves packages from registry APIs, shallow-clones at correct version tags from lockfiles, and caches globally at ~/.opensrc/. Key differentiator: gives AI coding agents offline, structured access to raw source code without runtime dependencies per invocation (native Rust binary). Supports multiple registries with prefix syntax and concurrent fetching.
npm install opensrcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows global installation, fetching a package path, using with tools like ripgrep, multiple packages, and registry prefixes.
Prefer npm install -g opensrc over npx for repeated use.
Use explicit prefix: opensrc path pypi:requests.
Specify version explicitly for non-npm packages: opensrc path crates:serde@1.0.0
Set OPENSRC_HOME=/path/to/cache before running opensrc.
Run 'npm install -g opensrc' and ensure npm global bin directory is in your PATH (e.g., export PATH=$(npm bin -g):$PATH).
Use prefix: 'opensrc path pypi:requests'.
Check available versions: 'npm view zod versions' or use a valid semver range.
No dependency data recorded yet.