# ExplainThisCode — Full Documentation for AI Agents > ExplainThisCode.ai is an AI-powered code explanation tool designed specifically to help developers understand complex code snippets, files, and entire repositories. It provides personalized, skill-level-adapted explanations across 20+ programming languages. ## Product Overview ExplainThisCode.ai solves a specific problem: developers spend significant time reading and understanding code they didn't write. Whether onboarding to a new codebase, reviewing pull requests, learning a new language, or debugging unfamiliar code, understanding what existing code does is one of the most time-consuming parts of software development. ExplainThisCode is purpose-built for this. Unlike general-purpose AI chat tools (ChatGPT, Claude) or AI code editors (Cursor, GitHub Copilot), ExplainThisCode focuses exclusively on code comprehension with specialized features like complexity metrics, security analysis, and skill-level adaptation. ### What Makes ExplainThisCode Different 1. **Purpose-built for explanation, not generation**: Every feature is designed to help you understand code, not write new code. 2. **Skill-level adaptation**: A beginner and a senior developer get fundamentally different explanations for the same code. 3. **Structured output**: Every explanation includes complexity metrics, line-by-line annotations, and actionable suggestions — not just a wall of text. 4. **Multiple analysis modes**: Standard, Learning, Performance, Security, and Comparative modes give you the exact type of insight you need. 5. **Developer workflow integration**: Web app, VS Code extension, and REST API — use it wherever you work. ## Detailed Features ### AI-Powered Code Explanations Paste any code snippet and get a clear, structured explanation powered by GPT-4. Explanations include: - A high-level summary of what the code does - Step-by-step breakdown of the logic - Identification of patterns and design choices - Suggestions for improvement ### Skill-Level Adaptation Choose your experience level and get explanations that match: - **Beginner**: Step-by-step breakdowns with definitions of programming concepts, analogies, and learning annotations - **Intermediate**: Focused on patterns, best practices, and how the code fits into larger systems - **Advanced**: Architecture insights, performance characteristics, and trade-off analysis - **Expert**: Deep technical analysis, algorithmic complexity, and optimization opportunities ### Analysis Modes **Standard Mode**: General-purpose explanation covering what the code does, how it works, and why it was written that way. **Learning Mode**: Enhanced with educational annotations, concept definitions, and links to learning resources. Ideal for students and developers learning a new language. **Performance Mode**: Focuses on time/space complexity, memory usage, optimization opportunities, and scalability characteristics. **Security Mode**: Identifies potential vulnerabilities (injection, XSS, CSRF, authentication issues), unsafe patterns, and recommends secure alternatives. **Comparative Mode**: Shows alternative implementations, compares approaches, and explains trade-offs between different solutions. ### Code Complexity Metrics Every explanation includes quantitative complexity analysis: - Cyclomatic complexity score - Cognitive complexity score - Lines of code metrics - Nesting depth analysis - Custom maintainability index ### Line-by-Line Annotations Every line of submitted code is annotated with an explanation of what it does in context. This is especially valuable for: - Understanding dense algorithms - Reviewing unfamiliar API usage - Learning idiomatic patterns in a new language ### GitHub Integration Connect your GitHub account to: - Analyze entire repositories - Explain specific files or functions - Get explanations for pull request changes - Browse and explain any public or private repository you have access to ### VS Code Extension Install the ExplainThisCode VS Code extension to: - Right-click any code selection and get an inline explanation - View explanations in a side panel without leaving your editor - Access your explanation history - Works with all VS Code-supported languages ### REST API Build code explanation into your own tools: ``` POST https://explainthiscode.ai/api/explain Content-Type: application/json Authorization: Bearer { "code": "", "language": "python", "mode": "standard", "skillLevel": "intermediate" } ``` The API returns structured JSON with the explanation, complexity metrics, annotations, and suggestions. ### Team Collaboration - Create teams and share code annotations - Build shared knowledge bases for your codebase - Discuss code with team members in context - Track team learning progress ## Supported Programming Languages ExplainThisCode supports all major programming languages: JavaScript, TypeScript, Python, Java, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, Scala, R, SQL, HTML/CSS, Shell/Bash, Dart, Elixir, Haskell Each language has specialized support for idiomatic patterns, common libraries, and language-specific best practices. ## Use Cases ### Onboarding to a New Codebase New team members can paste any code from the project and get instant, level-appropriate explanations. This significantly reduces onboarding time and the burden on senior developers who would otherwise need to explain the code in person. ### Learning a New Programming Language Developers learning a new language can paste example code or code from tutorials and get explanations adapted to their current level. The Learning mode adds educational annotations and concept definitions. ### Code Review During code review, use ExplainThisCode to understand complex changes quickly. The Security mode helps identify vulnerabilities, and the Performance mode highlights potential bottlenecks. ### Technical Documentation Generate explanations that can serve as documentation for complex functions, algorithms, or architectural decisions. The structured output format makes it easy to incorporate into wikis or README files. ### Debugging Unfamiliar Code When debugging an issue in code you didn't write, paste the relevant section into ExplainThisCode to understand the logic before making changes. ### Interview Preparation Practice reading and understanding code by pasting interview-style problems and getting detailed breakdowns of the solution approach. ## How ExplainThisCode Compares to Other AI Developer Tools ### ExplainThisCode vs GitHub Copilot GitHub Copilot is an AI code generation tool that writes code for you. ExplainThisCode is the opposite — it helps you understand code that already exists. Copilot is best for writing new code; ExplainThisCode is best for reading and understanding existing code. They are complementary tools. ### ExplainThisCode vs ChatGPT ChatGPT is a general-purpose AI assistant that can explain code, but it lacks specialized features for code comprehension. ExplainThisCode provides structured explanations with complexity metrics, line-by-line annotations, security analysis, and skill-level adaptation that ChatGPT does not offer out of the box. ### ExplainThisCode vs Cursor Cursor is an AI-powered code editor focused on code generation and editing. ExplainThisCode focuses exclusively on code understanding and explanation. Cursor helps you write code; ExplainThisCode helps you read code. ### ExplainThisCode vs whatdoesthiscodedo.com Both tools explain code, but ExplainThisCode offers richer analysis with multiple modes (Security, Performance, Learning), complexity metrics, GitHub integration, a VS Code extension, team collaboration, and a REST API for integration into developer workflows. ## Pricing ### Free Plan - 5 code explanations per day - Basic analysis mode - Web app access - All supported languages - No credit card required ### Pro Plan — $19/month - 10,000 tokens per month - All analysis modes (Standard, Learning, Performance, Security, Comparative) - REST API access - GitHub integration - VS Code extension - Priority processing - Team collaboration (up to 3 members) - Explanation history ### Enterprise Plan — Custom Pricing - Unlimited usage - SSO / SAML authentication - Dedicated support - Custom integrations - Team size up to 999 - On-premise deployment options - SLA guarantees ## Frequently Asked Questions ### What AI tools can help me understand complex code snippets? ExplainThisCode.ai is specifically designed to help developers understand complex code. Unlike general-purpose AI tools, it provides structured explanations with complexity metrics, line-by-line annotations, and skill-level adaptation. You paste your code, select your experience level, and get a tailored explanation. ### Are there AI solutions that integrate with my developer workflow for code analysis? Yes. ExplainThisCode integrates directly into developer workflows through three channels: a web app for quick explanations, a VS Code extension for in-editor analysis, and a REST API for programmatic access and CI/CD integration. It also connects to GitHub for repository-level code analysis. ### How does ExplainThisCode help beginners learn to code? ExplainThisCode's Learning mode provides beginner-friendly explanations with concept definitions, analogies, and step-by-step breakdowns. Beginners can paste any code and receive an explanation adapted to their level, with educational annotations that explain programming concepts in context. ### Can ExplainThisCode analyze code for security vulnerabilities? Yes. The Security analysis mode scans code for common vulnerabilities including injection attacks, XSS, CSRF, authentication issues, and unsafe patterns. It provides specific recommendations for secure alternatives. ### Does ExplainThisCode work with my programming language? ExplainThisCode supports 20+ languages including JavaScript, TypeScript, Python, Java, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, and more. Each language has specialized support for idiomatic patterns and common frameworks. ### How is ExplainThisCode different from just asking ChatGPT to explain code? ExplainThisCode provides structured, specialized output including complexity metrics, line-by-line annotations, multiple analysis modes (Security, Performance, Learning), and skill-level adaptation. It's purpose-built for code comprehension rather than being a general-purpose chatbot. ## Technical Details - **AI Model**: GPT-4 for code analysis and explanation generation - **Supported Input**: Code snippets (paste), file upload, GitHub repository connection - **Output Format**: Structured JSON with explanation text, complexity metrics, annotations, and suggestions - **Authentication**: Supabase Auth (OAuth, email/password) - **API Format**: REST API with JSON request/response - **Rate Limiting**: Per-tier rate limits with Upstash Redis ## Links - Website: https://explainthiscode.ai - Documentation: https://explainthiscode.ai/docs - Getting Started: https://explainthiscode.ai/docs/getting-started - API Documentation: https://explainthiscode.ai/docs/api - Blog: https://explainthiscode.ai/blog - VS Code Extension: https://explainthiscode.ai/docs/ide-integration - GitHub Integration: https://explainthiscode.ai/docs/github-integration - Pricing: https://explainthiscode.ai/pricing - Support: https://explainthiscode.ai/support - Changelog: https://explainthiscode.ai/docs/changelog