About Opensrc
opensrc is a command line tool that gives coding agents and developers access to the source code of any package. The command opensrc path resolves a package from its registry, clones the matching repository at the correct version tag with a shallow clone, caches it globally, and prints the local path. That path can be used inside other commands, so a search such as rg parse followed by the path of the zod package runs against the real implementation rather than only type definitions.
It works with npm packages by default and with other registries through prefixes, such as pypi for Python packages and crates for Rust crates, and it also accepts GitHub repositories directly. For npm projects it detects the version actually in use by checking node_modules, package lock files, pnpm and yarn lock files, and falls back to the latest tag. Progress messages go to stderr and the path goes to stdout, so the command works inside shell substitutions. Cached sources live under a folder in the user's home directory, which an environment variable can relocate, and a metadata file tracks what has been fetched.
It is aimed at developers who use AI coding agents and want those agents to read dependency source for deeper context. It installs with npm and requires Node.js 18 or later and Git.
The site publishes no pricing, and the tool is presented as a free utility.