5-Minute Quickstart
Get up and running with KPRtools in just 5 minutes. This guide will walk you through installation, authentication, and creating your first 3D visualization.
Last updated: 2 days agoIntroduction
KPRtools is a powerful code visualization platform that helps you understand complex codebases through interactive 3D visualizations. Whether you're onboarding new developers, analyzing dependencies, or preparing security audits, KPRtools provides the insights you need.
Prerequisites: This guide assumes you have Node.js 16+ installed. For other environments, see our full installation guide.
Step 1: Install KPRtools
Install the KPRtools package using your preferred package manager:
import { KPRtools } from 'kprtools';
const client = new KPRtools({
apiKey: process.env.KPRTOOLS_API_KEY
});
const visualization = await client.visualize({
repo: 'your-org/your-repo',
type: '3d-dependency-graph'
});Step 2: Authenticate
Set up your API key to authenticate with KPRtools. You can get your API key from the dashboard.
Security Warning: Keep your API key secure. Never commit it to version control or expose it in client-side code.
# Add to your .env file
KPRTOOLS_API_KEY=your_api_key_hereStep 3: Create Your First Visualization
Now you're ready to create your first 3D visualization. The following code will generate an interactive dependency graph for your repository:
const visualization = await client.visualize({
repo: 'your-org/your-repo',
type: '3d-dependency-graph',
options: {
depth: 3,
includeDevDependencies: false,
colorScheme: 'category'
}
});
// Open the visualization in your browser
console.log(visualization.url);Next Steps
Congratulations! You've created your first KPRtools visualization. Here's what you can explore next:
Was this page helpful?