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

pi-unify-cmd

v0.2.1

Published

Load slash commands from Claude Code, OpenCode, Codex, and Gemini CLI into pi — adapter pattern with configurable sources and formats

Readme

pi-unify-cmd

npm version license tests

Load slash commands from Claude Code, OpenCode, Codex, and Gemini CLI into pi — using the adapter pattern with configurable sources and formats.

Features

  • Multi-agent discovery — automatically scans .md and .toml command files from Claude Code, OpenCode, Codex, and Gemini CLI
  • Agent-prefixed commands — each command gets a namespaced name (e.g. /claude:review, /codex:opsx-apply, /gemini:change)
  • Full argument interpolation — normalizes $ARGUMENTS, $1, $@, ${@:N:L}, {{args}} across all agents
  • Custom adapters — add your own command sources with configurable formats
  • Global + project config — deep merge of ~/.pi/agent/unify-cmd.json and .unify-cmd.json
  • Management slash commands — list, reload, scan, and config inspection

Installation

For humans

# Add to your pi settings:
pi --add-package pi-unify-cmd

Or manually add to ~/.pi/agent/settings.json:

{
  "packages": ["pi-unify-cmd"]
}

For AI agents

Add "pi-unify-cmd" to the packages array in ~/.pi/agent/settings.json, then run pi install.

Git-sourced

{
  "packages": [
    "github:buihongduc132/pi-unify-cmd"
  ]
}

Usage

Once installed, pi-unify-cmd automatically discovers command files from other CLI agents and registers them as pi slash commands.

Supported Agents

| Agent | Format | Global Dir | Project Dir | |-------|--------|------------|-------------| | Claude Code | YAML frontmatter | ~/.claude/commands/ | .claude/commands/ | | OpenCode | YAML frontmatter | ~/.config/opencode/commands/ | .opencode/commands/ | | Codex | YAML frontmatter | ~/.codex/prompts/ | — | | Gemini | TOML + YAML frontmatter | ~/.gemini/commands/ | — | | Custom | Configurable | Configurable | Configurable |

Argument Interpolation

| Agent | Syntax | Example | |-------|--------|---------| | Claude | $ARGUMENTS | Review: $ARGUMENTS | | Codex | $1, $@, ${@:N:L} | Create $1 with $@ | | Gemini | {{args}} | Run: {{args}} | | Pi | $1, $@, ${@:N:L} | Build $1 ${@:2} |

Management Commands

/unify-cmd:list    — List all discovered commands
/unify-cmd:reload  — Rescan all directories
/unify-cmd:scan    — Show directory discovery details
/unify-cmd:config  — Show current configuration

Configuration

Global: ~/.pi/agent/unify-cmd.json Project: .unify-cmd.json

{
  "agents": {
    "claude": { "enabled": true, "globalDir": "~/.claude/commands", "projectDir": ".claude/commands" },
    "opencode": { "enabled": true, "globalDir": "~/.config/opencode/commands", "projectDir": ".opencode/commands" },
    "codex": { "enabled": true, "globalDir": "~/.codex/prompts" },
    "gemini": { "enabled": true, "globalDir": "~/.gemini/commands" }
  },
  "custom": [
    {
      "name": "my-agent",
      "enabled": true,
      "globalDir": "~/.my-agent/cmds",
      "format": "yaml-frontmatter"
    }
  ],
  "labelFormat": "[{scope}] ({agent}) | {description}",
  "prefixFormat": "{agent}:{name}"
}

| Option | Description | Default | |--------|-------------|---------| | agents.*.enabled | Enable/disable agent | true | | agents.*.globalDir | Global commands directory | agent-specific | | agents.*.projectDir | Project-level commands directory | agent-specific | | custom | Array of custom adapter configs | [] | | labelFormat | Autocomplete description format | [{scope}] ({agent}) \| {description} | | prefixFormat | Command name format | {agent}:{name} |

Tokens: {scope}G/L, {agent} → agent name, {name} → command name, {description} → command description

License

MIT © buihongduc132

Repository: buihongduc132/pi-unify-cmd