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

@leanlabsinnov/codegraph

v1.1.11

Published

Live, queryable knowledge graph for your codebase. Indexes JS/TS into an embedded graph DB with embeddings and exposes an MCP server Claude Code and Cursor can call.

Readme

@leanlabsinnov/codegraph

npm version License: MIT Node.js >=20

Live, queryable knowledge graph for your codebase. Indexes JS/TS/Python into an embedded graph database with vector embeddings, then exposes a local MCP server that Claude Code, Cursor, and Windsurf can call to answer structural questions about your code.

Zero infrastructure. The graph lives at ~/.codegraph/. No Docker, no external services.


Install

npm i -g @leanlabsinnov/codegraph

Requires Node.js 20+.


Quickstart

# 1. Pick an LLM provider
codegraph config llm set byo-openai        # also: byo-anthropic, byo-google, local-ollama
export OPENAI_API_KEY=sk-...

# 2. Verify the wire-up (5-token gen + 1 embedding round-trip)
codegraph config llm test

# 3. Index a repo
codegraph index ~/my-project

# 4. Boot the MCP server
codegraph serve
# → http://127.0.0.1:3748/mcp

Point Claude Code / Cursor / Windsurf at http://127.0.0.1:3748/mcp with the bearer token from ~/.codegraph/config.json.

See client setup docs for copy-paste config snippets.


Commands

| Command | Description | |---|---| | codegraph index <path> | Walk, parse, embed every symbol, write to graph | | codegraph index <path> --no-embed | Parse only — faster, semantic search disabled | | codegraph status <path> | Node/edge counts and embedding coverage | | codegraph wipe [path] | Delete a repo's graph rows (--yes skips prompt) | | codegraph serve [--port N] [--host H] | Boot the MCP server (default :3748) | | codegraph doctor | Health check: Node, config, API keys, Kuzu, LLM | | codegraph update | Check npm for a newer release and upgrade the global CLI | | codegraph update --check | Show installed vs latest without installing | | codegraph config show | Print resolved ~/.codegraph/config.json | | codegraph config llm set [preset] | Switch LLM preset (interactive picker if no arg) | | codegraph config llm test | Round-trip the configured provider |


LLM Providers

| Preset | Generation | Embeddings | Required env var | |---|---|---|---| | byo-openai | gpt-4o-mini | text-embedding-3-small | OPENAI_API_KEY | | byo-anthropic | claude-3-5-haiku-latest | text-embedding-3-small | ANTHROPIC_API_KEY + OPENAI_API_KEY | | byo-google | gemini-1.5-flash-latest | text-embedding-004 | GOOGLE_GENERATIVE_AI_API_KEY | | local-ollama | qwen2.5-coder:14b | nomic-embed-text | Ollama running locally |


What you can ask

Once connected, ask your AI assistant:

  • "What calls useAuth?"
  • "Show the component tree rooted at App."
  • "What's the blast radius of renaming formatPrice?"
  • "Find symbols semantically similar to 'JWT auth helper'."
  • "What are the transitive imports of src/lib/db.ts?"

Configuration

Config is stored at ~/.codegraph/config.json (auto-generated on first serve):

{
  "llm": {
    "mode": "byo",
    "generation": { "provider": "openai", "model": "gpt-4o-mini" },
    "embeddings": { "provider": "openai", "model": "text-embedding-3-small", "dimension": 1536 }
  },
  "server": {
    "port": 3748,
    "bearerToken": "<32-hex-chars>"
  }
}

You can also override via environment variables — see .env.example in the repo root.


Troubleshooting

Run codegraph doctor first. For client-specific config issues, see the full docs.


License

MIT