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

@code-sense/core

v0.3.0

Published

Config-driven code knowledge graph for Vue projects — tree-sitter AST parsing, Living Wiki, MCP server for AI agents, Sigma.js visualization

Readme

CodeSense

中文 | English

面向 Vue 项目的配置驱动代码知识图谱引擎。基于 tree-sitter AST 解析、LadybugDB 图数据库、MCP 协议与 Sigma.js 可视化。

灵感来自 GitNexus,并针对 Vue/Electron 语义做了增强。

快速开始

# 一站式接入:初始化 → 索引 → 医生检查 → Wiki → 总结
npx @code-sense/core analyze

# 或者分步操作
npx @code-sense/core init --interactive
npx @code-sense/core index
npx @code-sense/core view
npx @code-sense/core serve

全局安装:

npm install -g @code-sense/core
code-sense analyze

核心能力

  • .vue 组件、store、路由、Electron IPC 等实体构建为图节点
  • 将 import、store 调用、路由映射、IPC 通道等关系构建为图边
  • 识别 Vue API 调用(如 refcomputedwatch)和 Electron 通信链路
  • Living Wiki:从图谱自动生成 Markdown 项目知识库,含源码证据链接
  • 增量刷新--stale-only 仅刷新因源文件变更而过期的 Wiki 页面
  • Flow Map:追踪路由→组件→store→composable→IPC 的完整业务链路
  • One-Step Analyze:一站式项目入门(配置检测→索引→健康检查→Wiki)
  • 提供 MCP 工具支持影响分析、调用追踪、语义检索等
  • 提供浏览器图谱视图(Sigma.js)用于交互探索

命令

| 命令 | 说明 | | --- | --- | | analyze | 一站式:自动初始化、索引、医生检查、生成 Wiki、输出总结 | | index | 构建知识图谱 | | view | 启动可视化服务(默认端口 3456) | | serve | 启动 MCP 服务供 AI Agent 调用 | | wiki | 生成 Living Wiki(--stale-only 增量刷新) | | init | 生成默认 codesense.yaml | | init --interactive | 生成更完整的项目配置 |

MCP 工具(11 个)

| 工具 | 用途 | | --- | --- | | entity_context | 获取文件/实体的完整上下文 | | function_context | 查看函数调用方、被调用方与同级函数 | | impact_analysis | 分析改动影响范围 | | diff_impact | 基于 Git diff 的影响追踪 | | route_map | 路由与组件映射 | | trace_usage | 符号使用位置与证据 | | find_entrypoints | 识别入口点(路由、页面等) | | semantic_search | 语义检索函数/代码片段 | | flow_map | 追踪实体的分层业务链路(路由/组件/store/IPC) | | project_overview | 项目图谱统计总览 | | cypher | 执行原生 Cypher 调试查询 |

MCP 配置示例(Claude Code / Codex)

{
  "mcpServers": {
    "code-sense": {
      "command": "npx",
      "args": ["@code-sense/core", "serve"]
    }
  }
}

不要在 MCP 配置中写死绝对路径,避免多个项目误连到同一个图谱数据目录。

许可证

MIT