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

@ai-cortex/daemon

v1.0.1

Published

Transparent API proxy that makes LLM coding agents smarter

Downloads

1,762

Readme

Cortex

Make your AI coding agents smarter — automatically.

Cortex is a local proxy daemon that sits between your coding agent (Claude Code, Cursor, Aider) and the API provider. It watches what you're working on, and when it recognizes a situation it knows about, it injects relevant knowledge directly into the conversation — tips, patterns, debugging guides, fixes — without you lifting a finger.

Your agent gets better answers. You don't change how you work.

What Cortex Does

  • Saves tokens — prunes verbose tool outputs that waste your context window
  • Injects knowledge — matches conversations against 160+ brain entries and injects the right one at the right time
  • Tracks agents — understands main sessions, subagents, and teammates across your workspace
  • Shows live status — optional Claude Code statusline with pipeline phase, context usage, and injection count
  • Stays out of the way — never modifies API responses, never breaks streaming, zero config changes to your agent

Install

npm install -g @ai-cortex/daemon

Setup

cortex setup

The setup wizard walks you through everything: config, model download, Claude Code integration, and API routing. One command, done.

If you use Claude Code, Cortex automatically configures routing and the statusline. Your original settings are backed up and restored when Cortex stops — even on crashes.

Start & Stop

cortex start -d          # Start as background daemon
cortex stop              # Stop and restore original Claude settings
cortex status            # Check if running

Or run in foreground to see live pipeline output:

cortex start

Brain — Your Knowledge Library

The brain is a directory of Markdown files. Each file is a piece of knowledge — a solution, pattern, debugging guide, or best practice — that Cortex can inject when it detects a matching situation.

---
id: node-esm-import
title: "Node.js ESM import resolution"
language: javascript
error_types: [ERR_MODULE_NOT_FOUND, "Cannot find module"]
tags: [debugging, imports, node, esm]
---

When you see ERR_MODULE_NOT_FOUND in an ESM project...

Cortex ships with 160+ entries. Add your own by dropping .md files into your brain directory.

cortex brain list             # See all entries
cortex brain search <query>   # Search by keyword
cortex brain import <dir>     # Import from a directory
cortex brain sources          # Manage knowledge sources

Brain entries can also come from external sources: cheat.sh, tldr pages, and DevDocs.

Claude Code Statusline

Cortex appends a status line below your existing Claude Code statusline (it never replaces what you already have):

◆ Cortex  Snagged a request  [████████░░] 72%  (12.4k saved)  3 injected

Configure which elements to show with cortex config edit in the Statusline panel. If you want to remove Cortex and go back to your original statusline, toggle "Revert to Original Statusline" in the same panel.

CLI Reference

cortex start [-d] [--port N]     # Start daemon
cortex stop                      # Stop daemon
cortex status                    # Show status
cortex setup                     # Interactive setup wizard
cortex config edit               # TUI config editor
cortex config show               # Print current config
cortex brain <subcommand>        # list | search | stats | import | sources
cortex features list             # Show feature toggles
cortex features enable <name>    # Enable a feature
cortex features disable <name>   # Disable a feature
cortex logs [-n N] [--follow]    # View or stream logs
cortex agents topology           # Show agent tree

Configuration

Config lives at ~/.cortex/config.yaml. Edit with cortex config edit (interactive) or cortex config set <key> <value>.

Key settings:

| Setting | Default | What it does | |---------|---------|-------------| | proxyPort | 9090 | Port Cortex listens on | | targetBaseUrl | https://api.anthropic.com | Upstream API endpoint | | dashboardPort | 9091 | Management API / dashboard port | | brainDir | ./brain/entries | Where brain entries live | | injectionConfidenceThreshold | 0.9 | Min match score to inject (0–1) |

Environment overrides: CORTEX_PORT, CORTEX_TARGET_URL, CORTEX_DASHBOARD_PORT.

Dashboard

open http://localhost:9091

Web dashboard with live pipeline stats, brain summary, agent topology, and SSE log streams.

Requirements

  • Node.js 20+
  • First run downloads local AI models (~160MB total) to ~/.cortex/models/

How It Handles Your Settings

Cortex modifies ~/.claude/settings.json to route API traffic and register its statusline. It always backs up your original settings first:

  • API routing — If you had a custom ANTHROPIC_BASE_URL, it's saved and restored on stop. If you had none (the default), it's cleanly removed — your settings go back to exactly how they were.
  • Statusline — If you had an existing statusline, Cortex appends below it rather than replacing. On disable, your original is restored.
  • Crash safety — Backups are restored on graceful stop, SIGTERM, SIGINT, and process exit. A hardcoded fallback to https://api.anthropic.com is used as a last resort if backup data is corrupted.

License

BSL-1.1 (Business Source License)