# Creview > Creview is an interactive multi-language code visualizer, Abstract Syntax Tree (AST) analyzer, and codebase token footprint estimator for Python, JavaScript, TypeScript, HTML, CSS, and JSON. Creview helps human developers, tech leads, and AI coding agents (such as Claude, Cursor, Devin, ChatGPT, and Copilot) understand complex repositories, inspect Abstract Syntax Trees, calculate cyclomatic complexity, and optimize token budgets before large-scale AI refactoring. ## Core Capabilities - **Interactive AST Visualization**: Renders zoomable, pannable hierarchy trees and sequence execution paths using Tree-sitter parsers without local tooling or compiler setup. - **Codebase Token Counter & Context Window Optimizer**: Calculates exact token counts and McCabe cyclomatic complexity across multi-file projects to prevent context window overflow in LLMs (e.g., Claude 3.5 Sonnet, GPT-4o, Gemini 1.5 Pro). - **Multi-Language Dependency Graphing**: Analyzes imports, circular dependencies, and class hierarchies across full-stack repositories. - **Zero-Storage Privacy Guarantee**: Source code is processed entirely in-memory and discarded upon session close. Never persisted or used for model training. ## Targeted Developer Tools - [Python AST Visualizer](https://creview.io/python-ast-visualizer): Online interactive Abstract Syntax Tree viewer for Python syntax nodes, function definitions, and control flow. - [Codebase Token Counter](https://creview.io/llm-code-token-counter): Measure token counts, estimate AI refactoring costs, and optimize context window budgets for Claude, GPT-4, and Gemini. - [Interactive Code Visualizer App](https://creview.io/app): Full-featured web application for uploading ZIPs or visualizing GitHub repositories. - [Why Token Counts Matter for LLMs](https://creview.io/blog-post-token-count): Technical breakdown of token bloat during AI refactoring. - [Python AST Explained](https://creview.io/blog-post-ast-explained): Complete guide to Abstract Syntax Trees in Python. - [Cyclomatic Complexity Guide](https://creview.io/blog-post-complexity-matters): How to identify high-risk technical debt before refactoring. ## Public APIs for Developers & Agents ### 1. Snippet Analysis (`POST /analyze`) Analyzes a single source code snippet and returns hierarchical syntax nodes, execution sequence, and parse tree token count. - **URL**: `https://creview.io/analyze` - **Method**: `POST` - **Headers**: `Content-Type: application/json` - **Body**: ```json { "code": "def calculate_total(items):\n return sum(item.price for item in items)", "language": "python" } ``` - **Languages Supported**: `python`, `javascript`, `typescript`, `html`, `css`, `json` - **Response**: ```json { "hierarchy": { "id": "0", "name": "module", "type": "module", "children": [...] }, "sequence": [{ "id": 1, "label": "def calculate_total", "group": "Function" }], "token_count": 18 } ``` ### 2. Public GitHub Repository Analysis (`POST /analyze-github-public`) Analyzes a public GitHub repository (up to 20MB) and returns full dependency graphs, maintainability scores, and refactoring candidates. - **URL**: `https://creview.io/analyze-github-public` - **Method**: `POST` - **Headers**: `Content-Type: application/json` - **Body**: ```json { "url": "https://github.com/fastapi/fastapi" } ``` ## Visualized Open-Source Architecture Graphs Explore interactive module dependency graphs, AST complexity, and token counts for popular open-source repositories: - [Django Architecture Graph](https://creview.io/github.com/django/django) - [Flask Architecture Graph](https://creview.io/github.com/pallets/flask) - [FastAPI Architecture Graph](https://creview.io/github.com/tiangolo/fastapi) - [Uvicorn Architecture Graph](https://creview.io/github.com/encode/uvicorn) - [Requests Architecture Graph](https://creview.io/github.com/psf/requests) - [Pydantic Architecture Graph](https://creview.io/github.com/pydantic/pydantic) - [Pytest Architecture Graph](https://creview.io/github.com/pytest-dev/pytest) - [Transformers Architecture Graph](https://creview.io/github.com/huggingface/transformers) - [nanoGPT Architecture Graph](https://creview.io/github.com/karpathy/nanoGPT) - [LangChain Architecture Graph](https://creview.io/github.com/langchain-ai/langchain) - [React Architecture Graph](https://creview.io/github.com/facebook/react) - [Next.js Architecture Graph](https://creview.io/github.com/vercel/next.js) ## Extended Documentation For full API specifications, JSON schemas, and agent integration recipes, see: - [Full LLM Documentation](https://creview.io/llms-full.txt)