Skip to content

Latest commit

 

History

History

README.md

layout default
title OpenSrc Tutorial
nav_order 111
has_children true
format_version v2

OpenSrc Tutorial: Deep Source Context for Coding Agents

Learn how to use vercel-labs/opensrc to fetch package and repository source code so coding agents can reason about implementation details, not only public types and docs.

GitHub Repo License npm

Why This Track Matters

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.md integration
  • cleanup, reliability, and governance patterns

Current Snapshot (auto-updated)

Mental Model

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]
Loading

Chapter Guide

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

What You Will Learn

  • 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

Source References

Related Tutorials


Start with Chapter 1: Getting Started.

Navigation & Backlinks

Full Chapter Map

  1. Chapter 1: Getting Started
  2. Chapter 2: Input Parsing and Resolution Pipeline
  3. Chapter 3: Multi-Registry Package Fetching
  4. Chapter 4: Git Repository Source Imports
  5. Chapter 5: AGENTS.md and sources.json Integration
  6. Chapter 6: Update, Remove, and Clean Lifecycle
  7. Chapter 7: Reliability, Rate Limits, and Version Fallbacks
  8. Chapter 8: Team Operations and Governance

Generated by AI Codebase Knowledge Builder