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

codesense-cli

v0.2.0

Published

AI-powered code documentation and context generation for LLMs

Readme

CodeSense

Automatic context files for your codebase — so LLMs understand your repo without manual documentation.

npm version License: MIT

CodeSense scans your codebase via AST parsing and generates structured context files inside .codesense/. A pre-commit hook keeps them in sync automatically — every commit includes fresh context alongside your code changes. Zero config, zero maintenance.

Why it matters

Without CodeSense, every time you ask an LLM about your codebase it has to search through files, read source code, and piece together the architecture from scratch. That means:

  • More tool calls — the LLM reads file after file to answer a single question
  • More tokens — redundant context gets loaded on every conversation
  • Slower responses — more work before it can actually help you

With CodeSense, the LLM reads one small YAML file and immediately knows what a module does, what it exports, and how it connects to the rest of the codebase. Questions that used to take 10+ file reads now take 1.

In practice: fewer tool calls, lower token usage, faster and more accurate answers.

How it works

codesense init          # scan repo → generate .codesense/ → install pre-commit hook
git commit -m "..."     # hook fires → context auto-updates → included in same commit

Any LLM tool (Claude Code, Cursor, Copilot) reads .codesense/ and immediately understands your repo's structure, modules, and APIs — without searching through files.

Installation

npm install -g codesense-cli

Quick Start

cd your-project
codesense init

That's it. CodeSense will:

  1. Scan all TypeScript and Python files
  2. Generate .codesense/ARCHITECTURE.md, interfaces.yaml, and per-directory context files
  3. Install a pre-commit hook so context stays current
  4. Write CLAUDE.md (and .cursorrules if Cursor is detected)

Commands

codesense init

Full setup. Run once per repo.

codesense init              # scan + generate + install hook
codesense init --no-hook    # skip pre-commit hook
codesense init --force      # re-initialize existing setup

codesense update

Refresh context files. Called automatically by the pre-commit hook.

codesense update            # diff-aware: only re-process changed files
codesense update --full     # force complete re-scan
codesense update --staged   # pre-commit mode (staged files only)

codesense status

See what CodeSense knows about your repo.

codesense status
📊 CodeSense Status

  Files scanned:  47
  Last scan:      2m ago
  Context files:  12

  Pre-commit hook: ✓ installed

  LLM integrations:
    claude   ✓ CLAUDE.md
    cursor   ✓ .cursorrules

codesense integrate

Generate or refresh LLM tool config files.

codesense integrate           # auto-detect and generate all
codesense integrate --claude  # CLAUDE.md only
codesense integrate --cursor  # .cursorrules only
codesense integrate --copilot # .github/copilot-instructions.md only

What gets generated

your-repo/
├── .codesense/
│   ├── ARCHITECTURE.md        # tech stack, entry points, module map
│   ├── interfaces.yaml        # detected REST endpoints and public APIs
│   └── context/
│       ├── src--routes.yaml   # context for src/routes/
│       ├── src--services.yaml # context for src/services/
│       └── src--models.yaml   # context for src/models/
├── CLAUDE.md                  # points LLMs to .codesense/
└── .cursorrules               # same, for Cursor

Context files are 20-50 lines each. Total .codesense/ footprint stays under 100KB even for large repos.

Should I commit .codesense/?

Yes, in most projects. Committing .codesense/ means every developer and every AI tool gets fresh context after git pull. The pre-commit hook keeps it in sync automatically.

If you prefer not to commit it, add .codesense/ to .gitignore. Context files still update on disk on every commit — they just won't be tracked.

Languages supported

  • TypeScript / JavaScript
  • Python

More languages coming.

Existing commands

CodeSense also includes AI-powered documentation tools (require Ollama):

codesense explain auth.ts     # explain a file with AI
codesense scan ./src          # analyze code and show stats
codesense docs ./src          # generate full documentation
codesense readme              # generate a project README
codesense agents              # generate AGENTS.md

License

MIT — Jashan Rahal