npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

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 codeintel

Quick Start

cd your-project
codeintel init      # Initialize analysis environment
codeintel index     # Scan & build the code knowledge graph
codeintel map       # View full architecture map

Commands

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.findById

codeintel 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.js

codeintel flow <function>

Traces the call graph of a specific function.

codeintel flow authController.login
FUNCTION FLOW

authController.login()

 ├ validateInput()
 ├ userService.verifyUser()
 │    └ UserModel.findOne()
 ├ generateJWT()
 └ sendResponse()

codeintel route <path>

Traces a route through controller → service → model → database.

codeintel route /login
ROUTE FLOW

POST /login

Route
 → Controller: authController.login
 → Service: userService.verifyUser
 → Model: UserModel
 → Database: MongoDB

codeintel file <path>

Shows file dependencies — imports, exports, and reverse dependencies.

codeintel file src/controllers/authController.js
FILE DEPENDENCY GRAPH

authController.js

 ├ imports userService.js
 ├ imports jwt.js
 └ imports UserModel.js

Imported by:
 └ authRoutes.js

codeintel db

Lists all detected database operations grouped by model.

DATABASE OPERATIONS

UserModel
 ├ UserModel.findOne
 ├ UserModel.create
 └ UserModel.update

OrderModel
 ├ OrderModel.insert
 └ OrderModel.findMany

codeintel 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

  1. Scans all source files (respects .gitignore)
  2. Detects language and framework from dependencies
  3. Parses code using AST (Acorn for JS/TS, regex for Python)
  4. Classifies files/functions into architectural roles (route, controller, service, model, middleware)
  5. Builds a code knowledge graph stored in SQLite
  6. 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