Installation Guide
You can install and use ExplainThis in several ways. Pick the method that fits your workflow best.
System Requirements
Before installing, make sure your environment meets these prerequisites:
- Node.js 18+ (for the JavaScript / TypeScript SDK)
- Python 3.9+ (for the Python SDK)
- A package manager such as npm, pnpm, yarn, or pip
- An active internet connection to reach the API
If you only plan to use the web interface, no local installation is necessary — a modern browser is all you need.
Web Interface
The web interface requires no installation. Simply visit ExplainThis.ai to get started.
SDK Installation
Our SDKs let you access the platform's capabilities from your own projects. Pick your preferred language below. Each package ships with full TypeScript declarations or Python type stubs, so you get autocomplete and inline documentation out of the box.
JavaScript/TypeScript
NPM
Yarn
pnpm
Python
pip
poetry
Configuration
After installing the SDK, set up your API key. We suggest using environment variables so credentials stay out of version control:
# .env file
EXPLAINTHIS_API_KEY=your_api_key_hereVerifying Your Installation
After setup, run the short snippet below to confirm everything is working. If the library resolves and returns a response, you're ready to go.
import { ExplainThis } from '@explainthis/sdk';
import dotenv from 'dotenv';
// Load environment variables
dotenv.config();
// Initialize the client
const explainer = new ExplainThis({
apiKey: process.env.EXPLAINTHIS_API_KEY
});
// Example usage
async function explainCode() {
const code = `
function quickSort(arr) {
if (arr.length <= 1) return arr;
const pivot = arr[0];
const left = arr.slice(1).filter(x => x < pivot);
const right = arr.slice(1).filter(x => x >= pivot);
return [...quickSort(left), pivot, ...quickSort(right)];
}
`;
try {
const explanation = await explainer.explain(code, {
mode: 'standard',
language: 'javascript'
});
console.log(explanation);
} catch (error) {
console.error('Error:', error);
}
}
explainCode();Next Steps
- Set up API authentication - Get your API key
- Explore basic examples - Learn through examples
- API endpoints - View all available endpoints
- Changelog - Check the latest updates, new features, and bug fixes