# DevLens
**Intelligent codebase visualizer.**
Turn any TypeScript, JavaScript, Python, Go, Rust, or Java repository into a living, queryable graph — every node carries a functional summary, a technical summary, and a security assessment.
[](https://www.gnu.org/licenses/agpl-3.0)
[](https://www.npmjs.com/package/@devlensio/cli)
[](https://www.npmjs.com/package/@devlensio/skill)
[](https://bun.sh)
**[Join the DevLens Cloud Waitlist →](https://devlens.io)**
Click the image to watch the demo
--- ## Table of Contents - [What is DevLens?](#what-is-devlens) - [Supported languages](#supported-languages) - [Prerequisites](#prerequisites) - [Quick Start](#quick-start) - [Screenshots](#screenshots) - [Why it's fast & cheaper](#why-its-fast--cheaper) - [Ways to use DevLens](#ways-to-use-devlens) - [Web UI — visual exploration](#web-ui--visual-exploration) - [CLI — terminal power](#cli--terminal-power) - [Agent Skill — AI-powered understanding](#agent-skill--ai-powered-understanding) - [MCP Server — for any MCP-compatible AI agent](#mcp-server--for-any-mcp-compatible-ai-agent) - [How to summarize](#how-to-summarize) - [Configuration](#configuration) - [What DevLens understands](#what-devlens-understands) - [Benchmarks](#benchmarks) - [Who is this for](#who-is-this-for) - [How DevLens compares](#how-devlens-compares) - [Repository layout](#repository-layout) - [DevLens Cloud](#devlens-cloud) --- ## What is DevLens? **DevLens turns a codebase into a pre-built dependency graph.** Instead of reading files one at a time, you (or your AI agent) query the graph: every component, class, function, route, struct, or trait is a **node**, and every connection is a **typed edge** (`CALLS`, `IMPORTS`, `HANDLES`, `IMPLEMENTS`, …). Each node carries: - **Functional summary** — *what business purpose does this serve?* - **Technical summary** — *how does it work?* - **Security assessment** — *severity + explanation* This is the difference between an AI that re-reads your whole repo every session and an AI that already knows the architecture — architecture reviews, impact analysis, security audits, and onboarding take **minutes, not hours**. **Typical use cases:** - **Onboarding** — a developer joining a new team sees the architecture, functional/ technical summaries, modules, and gotchas in minutes, not weeks. - **Impact analysis** — *before* touching a symbol, see its blast radius: what breaks if you change it? - **Security reviews** — every node carries a severity-ranked security assessment with real reach. - **PR review** — a review packet that explains the diff's impact, tests, and security delta. - **AI agents** — give Claude/Cursor/Kilo an MCP server + skill that queries the graph instead of re-reading files. --- ## Supported languages DevLens parses **six languages with native parsers** (no AI, no regex, no tree-sitter) and understands their frameworks: | Language | Frameworks / stacks the graph understands | What gets parsed | | :-- | :-- | :-- | | **TypeScript / JavaScript** | React, Next.js (app & pages router), Express/Hono/Fastify, React Router, TanStack Router, any Node | components, hooks, state stores, classes, methods, functions, routes | | **Python** | FastAPI, Flask, Django (+DRF), SQLAlchemy / Django ORM, Celery, Pydantic | classes, methods, functions, routes, data models | | **Java** | Spring Boot (controllers, JPA, Spring Data repositories) | classes, methods, interfaces, enums, routes | | **Go** | net/http, Gin, Echo, chi, Fiber, GORM, database/sql | structs, interfaces, methods, functions, routes | | **Rust** | axum, actix-web, rocket, utoipa, Diesel | structs, enums, traits, impl blocks, methods, functions, routes | Each repo is analyzed with its language's own parser (Python `ast`, JavaParser, Go `go/ast` + `go/types`, Rust `syn`, TS compiler API), so edges are **real** — type-checked interfaces (`IMPLEMENTS`), framework routes (`HANDLES`), and ORM data layers (`READS_FROM`/`WRITES_TO`). --- ## Prerequisites | Requirement | Needed for | Notes | | :-- | :-- | :-- | | [Bun](https://bun.sh) ≥ 1.x | Build & run from source (`bun install`, `bun run dev`, `bun start`) | macOS/Linux/Windows | | [Node.js](https://nodejs.org) ≥ 18 | `npm install -g @devlensio/cli` (optional path) | not needed for the standalone binary | | `git` | analyzing a repo (DevLens shells out to `git`) | required on all install paths | | A JVM 17+ | Java analysis | only when analyzing Java repos | | `python3` 3.11+ | Python analysis | only when analyzing Python repos | | An LLM provider API key | AI summaries (optional) | needed only for `--summarize`; structure-only analysis works offline | Summaries are **never generated silently** — the CLI and skill ask permission first, and structure-only analysis needs no provider at all. --- ## Quick Start The fastest way to try the **full experience (Web UI + CLI + hot reload)** is to clone and run from source. The one-line installers give you the CLI with zero build time. ### Option A — Clone & develop (Web UI + CLI together, recommended) ```bash git clone https://github.com/devlensio/devlensOSS.git cd devlensOSS bun install # Development (backend on :3000, hot-reloaded frontend on :3001) bun dev # OR production — one command, API + Web UI on a single port (:3000) bun start ``` Production `bun start` builds the frontend **only the first time** (later runs skip the rebuild unless you pass `--rebuild`) and serves the Web UI *and* the backend API on one port. Open the printed URL, paste an absolute repo path, and click **Analyze** (enable the skip summaries checkbox if you don't want summaries). ### Option B — Install the CLI from npm ```bash npm install -g @devlensio/cli ``` ### Option C — Install the standalone binary (no Node.js required) The installers are verbose — they print progress, warnings, errors, and next steps, and **automatically add `devlens` to your `PATH`** (your shell's rc file on macOS/Linux, your user `PATH` on Windows). ```bash # Linux / macOS curl -fsSL https://raw.githubusercontent.com/devlensio/devlensOSS/main/scripts/install.sh | sh # Windows (PowerShell) irm https://raw.githubusercontent.com/devlensio/devlensOSS/main/scripts/install.ps1 | iex ``` Customize with environment variables: `DEVLENS_VERSION` (e.g. `v0.5.1`), `DEVLENS_INSTALL_DIR` (install folder), or `DEVLENS_NO_PATH=1` to skip the automatic PATH setup. ### Using any install — summarize, then explore ```bash cd your-project devlens init # optional — configure your AI provider for summaries devlens analyze . --summarize # build the graph + generate AI summaries devlens overview # language, framework, stats, central nodes devlens find-nodes -t ROUTE # every route in the app devlens architecture # one-command architecture brief devlens security # security flags across the codebase ``` Want it in your AI agent instead? Jump to [Agent Skill](#agent-skill--ai-powered-understanding). --- ## Screenshots