Quick Start Guide
Get up and running with ExplainThis in minutes. This guide shows you how to use our web interface. It also covers how to integrate the platform into your workflow.
What You'll Build
By the end of this walkthrough you will be able to paste any snippet into the editor, choose the right explanation mode for your audience, and receive a structured breakdown — complete with key concepts, improvement suggestions, and links to related documentation. If you prefer programmatic access, you'll also see how to call the API from JavaScript or Python in just a few lines.
Using the Web Interface
1. Choose Your Input Method
ExplainThis offers multiple ways to input your code:
- Direct Input: Paste your code directly into the editor
- File Upload: Upload a file from your computer
- GitHub Integration: Import code from a GitHub repository
2. Select Analysis Mode
Choose the type of explanation that best suits your needs:
- Standard: Full code explanation with key patterns and concepts
- Beginner: Simplified explanations with more context and examples
- Performance: Focus on efficiency, complexity, and optimization opportunities
- Security: Identify potential security issues and best practices
3. Get Your Explanation
Click "Explain This Code" to get a detailed breakdown of your code. The explanation covers:
- Line-by-line breakdown
- Key concepts and patterns
- Potential improvements
- Related documentation links
For more hands-on samples, check out the basic usage examples.
API Integration
For programmatic access, use our API with your preferred language. Make sure you've completed the installation steps first.
import { ExplainThis } from '@explainthis/sdk';
// Initialize the client
const explainer = new ExplainThis({
apiKey: process.env.EXPLAINTHIS_API_KEY
});
// Get an explanation
const explanation = await explainer.explain(code, {
mode: 'standard',
language: 'javascript'
});from explainthis import ExplainThis
# Initialize the client
explainer = ExplainThis(api_key="your-api-key")
# Get an explanation
explanation = explainer.explain(
code,
mode="standard",
language="python"
)Troubleshooting Tips
Running into issues? Here are a few common things to check before reaching out to support:
- Empty response: Make sure you selected a language that matches your snippet — auto-detect works for most cases, but explicit selection is more reliable for short fragments.
- API key errors: Double-check that your key is stored in the correct environment variable and that it hasn't expired.
- Timeout: Very large files may exceed the default timeout. Try sending a smaller portion of the source, or increase the timeout in your SDK configuration.