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

@puzzmo/agent-cli-detect

v0.0.8

Published

Detect installed AI coding agent CLI tools across all platforms

Readme

@puzzmo/agent-cli-detect

Detect installed AI coding agent CLI tools on the system. Works cross-platform (macOS, Linux, Windows) without shelling out to which or where.

Install

npm install @puzzmo/agent-cli-detect

Usage

import { detectAgentCLIs, detectAgentCLI } from "@puzzmo/agent-cli-detect"

// Find all installed agent CLIs
const agents = detectAgentCLIs()
for (const agent of agents) {
  console.log(`${agent.displayName}: ${agent.path}`)
}
// => Claude Code: /Users/you/.claude/bin/claude
// => Codex CLI: /usr/local/bin/codex

// Check for a specific agent
const claude = detectAgentCLI("claude")
if (claude) {
  console.log(`Found Claude Code at ${claude.path}`)
}

Supported Agents

| ID | Agent | Binary | Install | | ---------- | ------------------ | ---------- | --------------------------------------- | | aider | Aider | aider | pip install aider-chat | | amp | Amp (Sourcegraph) | amp | npm i -g @sourcegraph/amp | | augment | Augment CLI | auggie | npm i -g @augmentcode/auggie | | claude | Claude Code | claude | npm i -g @anthropic-ai/claude-code | | cline | Cline | cline | npm i -g cline | | codex | Codex CLI | codex | npm i -g @openai/codex | | copilot | GitHub Copilot CLI | copilot | npm i -g @github/copilot | | cursor | Cursor | cursor | Install from cursor.com | | gemini | Gemini CLI | gemini | npm i -g @google/gemini-cli | | goose | Goose (Block) | goose | brew install block-goose-cli | | kiro | Kiro CLI | kiro-cli | Installer from kiro.dev | | opencode | OpenCode | opencode | npm i -g opencode-ai |

How It Works

Instead of shelling out to which (Unix) or where (Windows), this package scans PATH directories directly using Node's fs module. On Windows, it checks all PATHEXT extensions (.exe, .cmd, etc.). It also checks well-known install locations for agents that install outside of PATH (e.g. ~/.claude/bin/claude).

Results are sorted by binary modification time (most recent first), which is a rough proxy for "most actively used."

API

detectAgentCLIs(): DetectedAgentCLI[]

Returns all detected agent CLIs, sorted by most recently modified.

detectAgentCLI(id: string): DetectedAgentCLI | null

Checks for a specific agent by registry ID.

agentRegistry: Record<string, AgentCLIDefinition>

The full registry of known agents. You can extend this at runtime:

import { agentRegistry, detectAgentCLIs } from "@puzzmo/agent-cli-detect"

agentRegistry["my-agent"] = {
  displayName: "My Agent",
  binaries: ["my-agent"],
}

const agents = detectAgentCLIs() // now includes my-agent

Types

type DetectedAgentCLI = {
  id: string           // Registry key
  displayName: string  // Human-readable name
  binary: string       // Binary name found
  path: string         // Full path to binary
  mtime: number        // Last modified timestamp (ms)
}

type AgentCLIDefinition = {
  displayName: string
  binaries: string[]
  npmPackage?: string
  knownPaths?: string[]
}