This guide will walk you through generating a Dependency Graph from a local repository.Documentation Index
Fetch the complete documentation index at: https://docs.supermodeltools.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- API Key: You’ll need a Supermodel API key. Get one from the Dashboard.
- Codebase: A local folder containing the code you want to analyze.
- Tools:
zipandcurlinstalled on your machine.
Step 1: Prepare your code
The Supermodel API accepts code as a zipped archive. Navigate to your project folder and create a zip file, excluding hidden files like.git or node_modules to keep the upload size small.
Step 2: Submit a graph generation job
Use thedependency endpoint to submit a graph generation job. Replace <your-api-key> with your actual key. The Idempotency-Key should be a unique value (like a UUID) for each request.
Step 3: Poll for results
Graph generation is asynchronous. Poll by re-submitting the same request with the same Idempotency-Key until the job completes:result field:
Using the SDK? The
@supermodeltools/sdk package handles polling automatically. See the Async Polling guide for details.Next Steps
Explore other graph types to get different insights into your code:Call Graph
Map function-level calls and execution flow.
Domain Graph
Identify high-level business domains and boundaries.