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

@standardbeagle/lci

v0.1.4

Published

Lightning Code Index - Sub-millisecond semantic code search and analysis

Readme

LCI - Lightning Code Index

Lightning-fast code indexing and search for AI assistants.

CI Go Report Card License: MIT

Features

  • Sub-millisecond search: Trigram-based indexing with <5ms search guarantee
  • Multi-language support: Go, TypeScript, JavaScript, Python, Rust, C#, PHP, and more
  • MCP integration: Model Context Protocol server for AI assistant integration
  • Semantic search: Natural language queries with intelligent matching
  • Call graph analysis: Track function calls, references, and dependencies
  • Semantic annotations: @lci: vocabulary for marking up code with metadata

Installation

npm (recommended)

npm install -g @standardbeagle/lci

pip

pip install lightning-code-index

Homebrew (coming soon)

brew install standardbeagle/tap/lci

From Source

go install github.com/standardbeagle/lci/cmd/lci@latest

From Releases

Download pre-built binaries from GitHub Releases.

Quick Start

CLI Usage

# Index and search in current directory
lci search "handleRequest"

# Find symbol definitions
lci def UserService

# Find all references to a symbol
lci refs CreateUser

# Display function call hierarchy
lci tree main

# Fast grep-style search
lci grep "TODO|FIXME"

# List files that would be indexed
lci list

MCP Server

Start the MCP server for AI assistant integration:

lci mcp

Claude Code Integration

Add to your .mcp.json:

{
  "lci": {
    "command": "lci",
    "args": ["mcp"],
    "env": {}
  }
}

Configuration

Create .lci.kdl in your project root:

project {
    name "my-project"
    root "."
}

index {
    include "**/*.go" "**/*.ts" "**/*.py"
    exclude "**/node_modules/**" "**/vendor/**"
}

search {
    max-results 100
    context-lines 3
}

MCP Tools

When running as an MCP server, LCI exposes these tools:

| Tool | Description | |------|-------------| | search | Semantic code search with fuzzy matching | | get_context | Get detailed context for a code symbol | | find_files | Fast file path search with glob patterns | | code_insight | Codebase intelligence and analysis | | context | Save/load code context manifests | | semantic_annotations | Query @lci: semantic labels | | side_effects | Analyze function purity and side effects |

Semantic Annotations

Mark up your code with @lci: annotations for enhanced AI understanding:

// @lci:risk[high] @lci:public-api
// @lci:requires[env:DATABASE_URL]
func HandleUserLogin(w http.ResponseWriter, r *http.Request) {
    // ...
}

// @lci:purpose[Validate user credentials against database]
// @lci:must[Return error for invalid credentials]
func ValidateCredentials(username, password string) error {
    // ...
}

Annotation Categories

  • Risk & Safety: @lci:risk[low|medium|high|critical], @lci:safe-zone, @lci:stability
  • Dependencies: @lci:requires[env:VAR], @lci:requires[db:table], @lci:requires[service:name]
  • Conventions: @lci:convention[pattern], @lci:idiom[name], @lci:template[name]
  • Contracts: @lci:must[behavior], @lci:must-not[behavior], @lci:invariant[condition]
  • Purpose: @lci:purpose[description], @lci:domain[area], @lci:owner[team]

Architecture

lci/
├── cmd/lci/          # CLI entry point
├── internal/
│   ├── core/         # Trigram index, symbol store, reference tracker
│   ├── parser/       # Tree-sitter based multi-language parsing
│   ├── search/       # Search engine and scoring
│   ├── indexing/     # Master index and pipeline
│   ├── mcp/          # MCP server and tools
│   └── analysis/     # Code analysis and metrics
└── pkg/              # Public API

Performance

LCI is designed for speed:

  • Indexing: <5s for typical projects (<10k files)
  • Search: <5ms for most queries
  • Memory: <100MB for typical web projects
  • Startup: Near-instant with persistent index

Development

# Run tests
go test ./...

# Build
go build ./cmd/lci

# Run with race detector
go test -race ./...

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting PRs.