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

@massa-ai/codex-plugin

v1.55.0

Published

massa-ai plugin for Codex — semantic code search, memory, and context compression

Readme

massa-ai — Codex plugin

A native Codex plugin bundle that makes massa-ai feel native in Codex CLI: semantic code search skills, the massa-ai MCP server, and passive lifecycle capture via 6 hook events.

What you get

Skills (invocable via Codex $ mentions):

| Skill | What it does | |-------|--------------| | map | Project map: stats, top central files, symbols by kind, languages, recent indexes | | index | Index the cwd (polls status, reports ETA) | | find | Semantic code search | | def | Go-to-definition (exact then fuzzy fallback) | | graph | Reference graph (who calls / imports / extends) | | status | Workspaces health + search analytics |

Plus 40 generated workflow commands, one per massa-ai workflow ($debug, etc.) — see Workflow Commands in the root feature reference for the full naming table.

MCP server: massa-ai (npx @massa-ai/mcp-client with MASSA_AI_API_URL) — registered into ~/.codex/config.toml by scripts/install-agents.sh, which this installer calls for you. That script is the single writer of host MCP config; the plugin ships no .mcp.json.

Hooks: 6 Codex lifecycle events wired to the shared massa-ai-hook binary (fire-and-forget POSTs to the tools-api):

| Codex event | Binary subcommand | Lifecycle kind | |-------------|-------------------|----------------| | SessionStart | session-start | session-start | | UserPromptSubmit | user-prompt-submit | user-prompt | | PreToolUse | pre-tool-use | pre-tool-use | | PostToolUse | post-tool-use | post-tool-use | | PreCompact | pre-compact | pre-compact (dual-POST: observation + snapshot) | | Stop | stop | session-end |

Install

# user scope (~/.codex), default
apps/codex-plugin/install.sh

# or project scope (./.codex)
apps/codex-plugin/install.sh --project

# uninstall (removes only massa-ai-owned entries; user hooks preserved)
apps/codex-plugin/install.sh --uninstall

The installer copies the plugin bundle to ~/.codex/plugins/massa-ai/ (user) or ./.codex/plugins/massa-ai/ (project), creates the massa-ai-hook symlink to the repo's shared binary, and merges the 6 hook events into ~/.codex/hooks.json (or ./.codex/hooks.json) using an array-append merge that preserves any existing user hooks (a timestamped backup is written before the first write). Re-running is a no-op when massa-ai-owned entries already exist.

Or install as a plugin

This is the route that makes massa-ai appear in /plugins:

codex plugin marketplace add ~/Projects/massa-ai
codex plugin add massa-ai@massa-ai
codex plugin list          # expect: massa-ai@massa-ai  installed, enabled

The marketplace manifest is .agents/plugins/marketplace.json at the repo root; the plugin manifest is .codex-plugin/plugin.json here. Codex copies the bundle to ~/.codex/plugins/cache/massa-ai/massa-ai/<version>/ — a different location from the flat ~/.codex/plugins/massa-ai/ the installer writes, and the only one Codex scans.

The two routes are complementary, not exclusive. A Codex plugin manifest has no hooks key (0 of the 203 manifests across Codex's bundled, curated and runtime marketplaces declares one), so the marketplace route delivers skills and the /plugins entry but no lifecycle capture. Run install.sh as well for hooks.

Hook entry shape

Codex hook entries are matcher-groups whose hooks is an array:

{ "hooks": [ { "type": "command", "command": "<bin> session-start" } ] }

Codex addresses hook state as "<file>:<event>:<group>:<hook>". A flat entry — type and command at the top level, no inner array — has no :<hook> index, so Codex never enumerates it: it does not appear in /hooks, cannot be trusted, and never fires. Releases before 1.2.1 wrote exactly that shape; an install now migrates any owned flat entry to the nested form, leaving user entries untouched.

Trust step (required)

Codex skips non-managed plugin hooks until they are trusted. After install, run:

/hooks

in Codex and trust the massa-ai hooks. Without this step, no observations will be captured.

Prerequisites

  • The massa-ai tools-api running (bun run dev:api from the massa-ai repo) so hook POSTs land at http://localhost:3333.
  • Bun installed (the massa-ai-hook binary is a Bun script).
  • The massa-ai-hook symlink points at apps/claude-plugin/hooks/massa-ai-hook.ts in this repo — keep the repo checkout present, or replace the symlink with a copy of the binary if you relocate.

Local plugin dir discovery

Codex discovers plugins from ~/.codex/plugins/ (user scope) or ./.codex/plugins/ (project scope). The installer places the bundle at ~/.codex/plugins/massa-ai/ (or the project equivalent). Codex reads .codex-plugin/plugin.json for the manifest (skills, hooks pointers), then auto-loads skills/*.md and hooks/hooks.json. MCP is not bundled — it lives in ~/.codex/config.toml.

MCP ownership

scripts/install-agents.sh is the only writer of host MCP config. This installer calls it with --agent codex --yes, so there is exactly one [mcp_servers.massa-ai] table in ~/.codex/config.toml no matter how many times you install.

MCP is always registered at user scope. A --project plugin install still writes ~/.codex/config.toml.

Earlier versions copied a plugin-local .mcp.json into ~/.codex/plugins/massa-ai/. That was never a Codex read path; reinstalling removes the stale file.