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

agent-open

v0.1.1

Published

Launch coding agents (CLI tools, editors, or web agents) with a prompt

Readme

agent-open

A utility similar to the open npm package, but for launching coding agents (CLI tools, editors, or web agents) with a prompt.

Installation

npm install -g agent-open
# or
npx agent-open <prompt>

Programmatic API

import { agentOpen, api } from 'agent-open';

// Auto-detect and launch the first available agent
await agentOpen('aider', 'Add unit tests');

// Launch Claude Code CLI with files
await agentOpen('claude', 'Explain this code', { files: ['index.ts'] });

// Open a browser-based agent
await agentOpen('browser', 'Write a React hook', { url: 'https://claude.ai/?q={prompt}' });

// With working directory
await agentOpen('aider', 'Refactor this module', { cwd: '/path/to/project' });

// Typed programmatic API via Padrone
await api.claude({ prompt: 'Explain this code', files: ['index.ts'] });
await api.aider({ prompt: 'Add unit tests' });
await api.ls({ all: true });

agentOpen(agent, prompt, options?)

| Parameter | Type | Description | |-----------|------|-------------| | agent | string | Agent identifier (see supported agents below) | | prompt | string | Prompt to send to the agent | | options | AgentOptions | Optional configuration |

AgentOptions

interface AgentOptions {
  cwd?: string;       // Working directory (default: process.cwd())
  files?: string[];   // Files to include (for agents that support it)
  terminal?: boolean; // Reserved for future use
  url?: string;       // URL template for browser agent ({prompt} placeholder)
}

CLI Usage

# Root command — auto-detects the first installed agent (respects configured default)
npx agent-open "Explain this code"

# Interactively pick an agent
npx agent-open -i "Explain this code"

# Launch a specific agent
npx agent-open claude "Explain this code"
npx agent-open aider "Refactor this module"
npx agent-open opencode "Add unit tests"
npx agent-open gemini "Write tests"
npx agent-open interpreter "Write a script to sort files"
npx agent-open cursor "Add type annotations"
npx agent-open windsurf "Review this function"
npx agent-open vscode "Review this PR"
npx agent-open zed "Add documentation"
npx agent-open copilot "Suggest a fix"
npx agent-open cody "Explain this code"
npx agent-open chatgpt "Write a React hook"
npx agent-open browser "Write a React hook" --url "https://claude.ai/?q={prompt}"

# With options
npx agent-open aider "Add tests" --files src/index.ts --cwd /path/to/project

# Generic run command (specify agent by name)
npx agent-open run aider "Add documentation"

# List installed agents
npx agent-open ls

# List all agents (including not installed), with install hints
npx agent-open ls -a

# Configure default agent
npx agent-open config -d aider

# Show current configuration
npx agent-open config

Supported Agents

| Agent | Command / Action | Description | |-------|-----------------|-------------| | claude | claude --prompt <prompt> | Claude Code CLI | | aider | aider --message <prompt> | Aider | | opencode | opencode <prompt> | OpenCode | | gemini | gemini <prompt> | Google Gemini CLI | | interpreter | interpreter -p <prompt> | Open Interpreter | | cursor | Opens Cursor editor | Cursor | | windsurf | Opens Windsurf editor | Windsurf | | vscode | code <cwd> | VS Code with Copilot | | zed | Opens Zed editor | Zed | | copilot | gh copilot suggest <prompt> | GitHub Copilot CLI | | cody | cody chat --message <prompt> | Sourcegraph Cody | | chatgpt | Opens browser | ChatGPT | | perplexity | Opens browser | Perplexity | | browser | Opens configurable URL | Custom browser-based agent |

Configuration

# Set default agent (used when no agent is specified in root command)
agent-open config -d aider

# Show current config
agent-open config

Config is stored at ~/.agent-open/config.json.

Architecture

src/
  index.ts          # Public API exports (agentOpen, api, program, registry)
  openAgent.ts      # Agent registry, agentOpen(), findFirstAvailableAgent()
  program.ts        # Padrone program definition (all CLI commands)
  cli.ts            # CLI entry point — calls program.cli()
  agents/
    aider.ts        # Aider launcher
    browser.ts      # Browser agent launcher
    claude.ts       # Claude Code launcher
    cody.ts         # Cody launcher
    copilot.ts      # GitHub Copilot launcher
    cursor.ts       # Cursor launcher
    gemini.ts       # Gemini CLI launcher
    interpreter.ts  # Open Interpreter launcher
    opencode.ts     # OpenCode launcher
    vscode.ts       # VS Code launcher
    windsurf.ts     # Windsurf launcher
    zed.ts          # Zed launcher
  utils/
    config.ts       # Config file management (~/.agent-open/config.json)
    detectBinary.ts # Binary detection utility
    runCommand.ts   # Command execution utility

License

MIT