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

a2a-cli

v1.0.1

Published

A simple CLI client for A2A agents

Readme

a2a-cli

A command-line interface for interacting with A2A (Agent-to-Agent) protocol compliant agents. Send messages, manage tasks, and chat interactively with agents from your terminal.

Installation

npm install -g a2a-cli

Quick Start

# Start an interactive chat session
a2a-cli chat

# Send a one-off message
a2a-cli send "Hello, agent"

# Send with custom server
a2a-cli --server http://localhost:8000 send "What is the weather?"

Commands

chat - Interactive Chat Session

Start an interactive conversation with the agent:

a2a-cli chat
a2a-cli --server http://localhost:8000 chat

In-chat commands:

  • /new - Start a fresh session (clears task and context IDs)
  • /exit - Exit the chat session

Example session:

A2A Terminal Client
Agent Base URL: http://localhost:41241
✓ Agent Card Found:
  Name:        Example Agent
  Streaming:   Supported

Example Agent > You: Hello, can you help me?

Example Agent [10:23:45]: ⏳ Status: working
Example Agent [10:23:45]: ✉️ Message:
  📝 Text: Hello! I'd be happy to help you.

Example Agent > You: /exit
Exiting A2A Terminal Client. Goodbye!

send - Send a Message

Send a one-off message to the agent:

# Send a message directly
a2a-cli send "Hello, agent"

# Wait for task completion (streaming mode)
a2a-cli send "Generate a list of 5 movie recommendations" --wait

# Send from stdin
a2a-cli send < prompt-file.txt
cat prompt-file.txt | a2a-cli send

# With custom server
a2a-cli --server http://localhost:8000 send "What's the time?"

Options:

  • -w, --wait - Wait for task completion using streaming mode (default: false)

get - Get Task Details

Retrieve details about a specific task:

a2a-cli get <task-id>

Output includes:

  • Task ID and Context ID
  • Current status
  • Status messages
  • Artifacts (if any)

cancel - Cancel a Task

Cancel a running task:

a2a-cli cancel <task-id>

Global Options

  • -s, --server <url> - Agent server URL (default: http://localhost:41241)
  • -V, --version - Output the version number
  • -h, --help - Display help information

Usage Examples

# Interactive chat with default server
a2a-cli chat

# Interactive chat with custom server
a2a-cli --server http://localhost:8000 chat

# Send a quick message (fire and forget)
a2a-cli send "What is 2+2?"

# Send and wait for completion
a2a-cli send "Write me a poem" --wait

# Send from a file
a2a-cli send < my-prompt.txt

# Get task information
a2a-cli get task-abc-123

# Cancel a long-running task
a2a-cli cancel task-abc-123

# Chain commands
a2a-cli --server http://localhost:8000 send "Generate code" --wait > output.txt

Features

  • 🚀 Multiple command modes: Interactive chat or one-off messages
  • 📡 Streaming support: Real-time agent responses with --wait flag
  • 📝 Task management: Query and cancel tasks
  • 🎨 Rich output: Color-coded status indicators and formatted messages
  • 📄 Artifact support: Display files and data returned by agents
  • 🔄 Context persistence: Maintains conversation context in chat mode
  • 📥 Stdin support: Pipe prompts from files or other commands

Development

# Run in development mode
npm run dev chat
npm run dev send "test message"

# Type checking
npm run typecheck

# Build
npm run build

Color Coding

The CLI uses colors for better readability:

  • 🟦 Blue: Working/In-progress states
  • 🟩 Green: Completed/Success states
  • 🟨 Yellow: Warnings/Input required
  • 🔴 Red: Errors/Failed states
  • Gray: Metadata and timestamps

License

ISC