← Back to Docs

Getting Started

From zero to structural code intelligence in under 10 minutes.

The "Trust Loop"

SourcePrep runs locally. You don't need to create an account or upload code to the cloud to see it work.

1. Install

Download SourcePrep from sourceprep.io/download and install the desktop app. It's also available on the Mac App Store and Microsoft Store.

See the full Installation Guide for step-by-step instructions.

2. Launch the App

Open SourcePrep from your Applications folder (macOS) or Start Menu (Windows). The app automatically starts the background daemon that manages the Rust indexer and MCP server.

Loading component preview…

Live preview: The SourcePrep daemon processing a project with structural trace and semantic indexing.

Alternatively, power users can run prep serve from a terminal.

3. Add Your Repo

In the SourcePrep dashboard, click the + button in the sidebar and select your project folder. SourcePrep will immediately start indexing (semantics + structure).

Or via CLI: prep add ~/my-project --name "My Project"

You'll see indexing progress in the dashboard. For a 50k file repo, the Rust trace index takes less than a second once semantic indexing wraps up.

4. Connect Your Editor

SourcePrep works best when connected to an AI code editor via MCP.

Both editors use stdio (recommended). The MCP config tells your editor to spawn prep mcp as a subprocess — no URLs to configure.

Advanced: For remote/containerized setups, SourcePrep also supports SSE at http://localhost:8400/mcp/sse. See the MCP reference for details.

5. Verify

Open your editor's AI chat (e.g. Cursor Agent or Windsurf Cascade) and call:

"prep"

The prep tool returns an ambient project baseline: index status, trace coverage, your selected focus areas, and hub files tailored to your codebase. It's the best first step after connecting.

Then try a deeper explicit query:

"Graph the callers of [Function X] and find where it's used."

You should see the agent call prep_search with structural tracing and return an expanded graph analysis.

Free tier note: Graph expansion requires a trace build. On the Free tier, trigger this manually from the dashboard (Graph Status → Build) before trying the graph query above. Paid tiers build the trace automatically on file save.

6. Run a Codebase Audit

Once your index is built, try an architectural audit:

"Audit my codebase"

The prep_audit tool analyzes your trace graph for architectural issues, tech debt, test coverage gaps, and more — using 11 built-in analyzers. No LLM required. Results include severity-tagged findings like ARCH-1, QUAL-3, etc.

To fix a finding, just say "fix ARCH-1" — the AI will call prep_audit with action="refactor" to get trace context and an action plan for the affected files.

See the full Codebase Audit Guide for details on all analyzers and the refactor workflow.


Next Steps