Quick Start
The fastest way to get structural context into your AI editor.
The 5-Minute Guide
1Launch SourcePrep
Open the SourcePrep desktop app. It automatically starts the background daemon that manages the index and serves requests.
Power users: you can also run prep serve in a terminal.
2Index Your Repo
Click the + button in the sidebar, select your project folder, and SourcePrep will scan and build the Code Graph immediately.
Or via CLI: prep add ~/my-project
3Connect MCP
Configure your editor (Cursor/Windsurf) to use the local server.
4Select Files & Get Ambient Context
In the SourcePrep dashboard, use the Scope panel to select the files and folders you want to work with. Then in your editor's AI chat, simply call:
"prep"
SourcePrep will feed the AI its ambient project baseline: your hub files, module structures, and focus areas. The AI immediately understands the architecture before you ask your first prompt.
AI: I've analyzed the requested context — you've selected 8 design docs and 18 React components. The most connected central hubs are EnhancedHero.tsx and ParallaxController.tsx. Ready when you are.
Now ask your first question — the AI already knows your architectural context:
"How does the authentication middleware interact with the user service? Trace the calls."
5Audit Your Codebase
Once orienting your agent, safely run a structural audit to find architectural issues, tech debt, and quality gaps — no LLM required:
"Audit my codebase"
The agent will call prep_audit, executing 11 deterministic analyzers against the trace graph. You'll get severity-tagged findings like ARCH-1 (circular dependency). To act on a finding, you can ask the agent to fix it, and it will use action="refactor" to generate a plan. See the Codebase Audit Guide for details.
Pro Tips
- Search via CLI: You can test retrieval without an editor using
prep search "query". - Force Rebuild: If you switched branches massively, run
prep buildto ensure the index is fresh (though the watcher handles this mostly). - Check Status: Run
prep statusto see index stats and coverage.
