codeintel
v1.0.0
Published
Ultra-detailed repository mapping engine — generates architecture maps, trees, flowcharts, decision trees, and execution paths via static code analysis.
Downloads
114
Maintainers
Readme
CodeIntel
Ultra-detailed repository mapping engine — generates architecture maps, trees, flowcharts, decision trees, and execution paths directly in your terminal.
No AI. Pure static code analysis via AST parsing.
npm install -g codeintelQuick Start
cd your-project
codeintel init # Initialize analysis environment
codeintel index # Scan & build the code knowledge graph
codeintel map # View full architecture mapCommands
codeintel init
Creates a .codeintel/ directory with the analysis database.
Initializing CodeIntel...
Creating analysis environment...
Created:
.codeintel/
config.json
graph.db
index.json
Repository ready for mapping.codeintel index
Scans all files, detects language & framework, parses code via AST, and builds a code knowledge graph.
Scanning repository...
Language detected: TypeScript
Framework detected: Express
Files scanned: 187
Functions detected: 412
Routes detected: 22
Services detected: 18
Models detected: 7
Database queries detected: 56
Building architecture graph...
Graph nodes created: 824
Graph edges created: 1432
Repository indexed successfully.codeintel map
Displays the full project architecture — layers, routes, and call chains.
PROJECT ARCHITECTURE
────────────────────────────────
Backend
└ Express API
Routes
├ POST /login
│
│ └ authController.login
│ └ userService.verifyUser
│ └ UserModel.findOne
│ └ MongoDB
├ POST /register
│
│ └ authController.register
│ └ userService.createUser
│ └ UserModel.create
└ GET /profile
└ userController.getProfile
└ userService.getUser
└ UserModel.findByIdcodeintel map --flow
Renders vertical box-and-arrow flowcharts for each route.
┌──────────────┐
│ POST /login │
└──────┬───────┘
▼
┌──────────────┐
│ Controller │
│ login() │
└──────┬───────┘
▼
┌──────────────┐
│ Service │
│ verifyUser() │
└──────┬───────┘
▼
┌──────────────┐
│ Model │
│ UserModel │
└──────┬───────┘
▼
┌──────────────┐
│ MongoDB │
└──────────────┘codeintel map --tree
Shows the repository file tree.
REPOSITORY TREE
────────────────────────
src
├ routes
│ └ authRoutes.js
├ controllers
│ └ authController.js
├ services
│ └ userService.js
├ models
│ └ userModel.js
└ middleware
└ authMiddleware.jscodeintel flow <function>
Traces the call graph of a specific function.
codeintel flow authController.loginFUNCTION FLOW
authController.login()
├ validateInput()
├ userService.verifyUser()
│ └ UserModel.findOne()
├ generateJWT()
└ sendResponse()codeintel route <path>
Traces a route through controller → service → model → database.
codeintel route /loginROUTE FLOW
POST /login
Route
→ Controller: authController.login
→ Service: userService.verifyUser
→ Model: UserModel
→ Database: MongoDBcodeintel file <path>
Shows file dependencies — imports, exports, and reverse dependencies.
codeintel file src/controllers/authController.jsFILE DEPENDENCY GRAPH
authController.js
├ imports userService.js
├ imports jwt.js
└ imports UserModel.js
Imported by:
└ authRoutes.jscodeintel db
Lists all detected database operations grouped by model.
DATABASE OPERATIONS
UserModel
├ UserModel.findOne
├ UserModel.create
└ UserModel.update
OrderModel
├ OrderModel.insert
└ OrderModel.findManycodeintel explore
Interactive terminal explorer — browse architecture, flowcharts, decision trees, routes, and more via a dynamic menu.
CodeIntel Interactive Explorer
──────────────────────────────
1. Architecture Tree
2. Execution Flowcharts
3. Decision Trees
4. Routes
5. Controllers
6. Services
7. Models
8. Database Queries
Select option >Supported Languages
| Language | Parser | | ---------- | ------------- | | JavaScript | Acorn (AST) | | TypeScript | Acorn + strip | | Python | Regex-based |
Detected Frameworks
Node.js: Express, Next.js, NestJS, Fastify, Koa, Hapi
Frontend: React, Vue, Angular, Svelte
Python: Flask, Django, FastAPI
ORMs: Mongoose, Sequelize, TypeORM, Prisma, SQLAlchemy
Code Knowledge Graph
Under the hood, CodeIntel builds a graph database with:
Node types: File, Route, Controller, Service, Function, Model, Database, DecisionNode, ConditionNode
Edge types: calls, imports, routes_to, queries, depends_on, branches, contains
All visualizations query this graph.
How It Works
- Scans all source files (respects
.gitignore) - Detects language and framework from dependencies
- Parses code using AST (Acorn for JS/TS, regex for Python)
- Classifies files/functions into architectural roles (route, controller, service, model, middleware)
- Builds a code knowledge graph stored in SQLite
- Renders trees, flowcharts, decision diagrams, and dependency maps in the terminal
No AI. No cloud. No external APIs. Everything runs locally via static analysis.
License
MIT
