Registries
opensrc resolves packages from multiple registries. The registry is detected automatically from the input format.
For private repositories, see Authentication.
npm
The default registry. Pass a package name directly:
rg "ZodType" $(opensrc path zod)
cat $(opensrc path next)/package.json
opensrc path @vercel/aiPyPI
Use the pypi: prefix for Python packages:
find $(opensrc path pypi:requests) -name "*.py"
cat $(opensrc path pypi:flask)/src/flask/app.py
opensrc path pypi:pydanticcrates.io
Use the crates: prefix for Rust crates:
ls $(opensrc path crates:serde)/src/
rg "derive" $(opensrc path crates:clap)
opensrc path crates:tokioGitHub
Pass owner/repo to fetch from GitHub directly:
rg "Router" $(opensrc path vercel/next.js)/packages/next/src/
cat $(opensrc path facebook/react)/packages/react/src/React.js
opensrc path tokio-rs/tokioGitLab
Use the gitlab: prefix:
opensrc path gitlab:owner/repoBitbucket
Use the bitbucket: prefix:
opensrc path bitbucket:owner/repoSummary
| Registry | Prefix | Example |
|----------|--------|---------|
| npm | (none) | opensrc path zod |
| PyPI | pypi: | opensrc path pypi:requests |
| crates.io | crates: | opensrc path crates:serde |
| GitHub | owner/repo | opensrc path vercel/ai |
| GitLab | gitlab: | opensrc path gitlab:owner/repo |
| Bitbucket | bitbucket: | opensrc path bitbucket:owner/repo |