| layout | default |
|---|---|
| title | OpenSrc Tutorial |
| nav_order | 111 |
| has_children | true |
| format_version | v2 |
Learn how to use
vercel-labs/opensrcto fetch package and repository source code so coding agents can reason about implementation details, not only public types and docs.
Coding agents frequently need deeper package internals than API docs provide. OpenSrc automates source acquisition from npm, PyPI, crates.io, and git hosts and wires results into AGENTS.md and opensrc/sources.json.
This track focuses on:
- parsing and resolving package/repo inputs
- multi-registry source fetching workflows
- source indexing and
AGENTS.mdintegration - cleanup, reliability, and governance patterns
- repository:
vercel-labs/opensrc - stars: about 1.2k
flowchart LR
A[Package or Repo Spec] --> B[Input Parser]
B --> C[Registry or Host Resolver]
C --> D[Git Clone and Version Selection]
D --> E[opensrc/sources.json]
E --> F[AGENTS.md Source Reference]
| Chapter | Key Question | Outcome |
|---|---|---|
| 01 - Getting Started | How do I run OpenSrc on my project quickly? | Working baseline |
| 02 - Input Parsing and Resolution Pipeline | How does OpenSrc distinguish package specs and repo specs? | Strong parsing model |
| 03 - Multi-Registry Package Fetching | How are npm, PyPI, and crates sources resolved? | Better dependency coverage |
| 04 - Git Repository Source Imports | How does OpenSrc fetch direct repository inputs? | More flexible source acquisition |
| 05 - AGENTS.md and sources.json Integration | How does OpenSrc expose fetched sources to coding agents? | Durable context registry |
| 06 - Update, Remove, and Clean Lifecycle | How do I maintain and prune local source caches safely? | Lifecycle hygiene |
| 07 - Reliability, Rate Limits, and Version Fallbacks | How should I handle imperfect metadata and network constraints? | Stronger operational resilience |
| 08 - Team Operations and Governance | How do teams standardize OpenSrc usage across repositories? | Governance baseline |
- how to fetch dependency and repo sources as agent-readable context
- how OpenSrc resolves versions and repository mappings across ecosystems
- how to maintain clean, updated source indexes for team workflows
- how to operationalize source context governance in production repositories
Start with Chapter 1: Getting Started.
- Start Here: Chapter 1: Getting Started
- Back to Main Catalog
- Browse A-Z Tutorial Directory
- Search by Intent
- Explore Category Hubs
- Chapter 1: Getting Started
- Chapter 2: Input Parsing and Resolution Pipeline
- Chapter 3: Multi-Registry Package Fetching
- Chapter 4: Git Repository Source Imports
- Chapter 5: AGENTS.md and sources.json Integration
- Chapter 6: Update, Remove, and Clean Lifecycle
- Chapter 7: Reliability, Rate Limits, and Version Fallbacks
- Chapter 8: Team Operations and Governance
Generated by AI Codebase Knowledge Builder