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

@lushly-dev/afd-cli

v0.1.0

Published

Command-line interface for Agent-First Development

Readme

@afd/cli

Command-line interface for Agent-First Development.

Installation

npm install -g @afd/cli
# or
pnpm add -g @afd/cli

Usage

Connect to a Server

# Connect to an MCP server via SSE
afd connect http://localhost:3100/sse

# Connect via HTTP
afd connect http://localhost:3100/message --transport http

# Check connection status
afd status

List Tools

# List all available tools
afd tools

# Filter by category
afd tools --category document

# Output as JSON
afd tools --format json

Call Commands

# Call with JSON arguments
afd call document.create '{"title": "My Document"}'

# Call with key=value pairs
afd call document.get id=doc-123

# Verbose output (shows reasoning, sources, etc.)
afd call document.analyze id=doc-123 --verbose

# Output as JSON
afd call document.list --format json

Validate Commands

# Validate all commands on the connected server
afd validate

# Validate specific category
afd validate --category document

# Strict mode (warnings become errors)
afd validate --strict

# Verbose output
afd validate --verbose

Interactive Shell

# Start interactive mode
afd shell

# Start with auto-connect
afd shell --url http://localhost:3100/sse

In the shell:

afd:connected> tools
afd:connected> document.create {"title": "Test"}
afd:connected> document.get id=doc-123
afd:connected> help
afd:connected> exit

Commands

| Command | Description | |---------|-------------| | connect <url> | Connect to an MCP server | | disconnect | Disconnect from server | | status | Show connection status | | tools | List available tools | | call <name> [args] | Call a tool with arguments | | validate | Validate command results | | shell | Start interactive mode |

Options

Global Options

| Option | Description | |--------|-------------| | -V, --version | Output version number | | -h, --help | Display help |

connect

| Option | Description | |--------|-------------| | -t, --transport <type> | Transport type (sse, http). Default: sse | | --timeout <ms> | Connection timeout. Default: 30000 | | --no-reconnect | Disable auto-reconnection |

tools

| Option | Description | |--------|-------------| | -c, --category <name> | Filter by category | | -f, --format <format> | Output format (json, text). Default: text | | --refresh | Force refresh from server |

call

| Option | Description | |--------|-------------| | -f, --format <format> | Output format (json, text). Default: text | | -v, --verbose | Show detailed output |

validate

| Option | Description | |--------|-------------| | -c, --category <name> | Validate only this category | | --strict | Treat warnings as errors | | -v, --verbose | Show detailed results |

shell

| Option | Description | |--------|-------------| | -u, --url <url> | Server URL to auto-connect |

Configuration

The CLI stores configuration in ~/.config/afd-cli/config.json (Linux/Mac) or %APPDATA%\afd-cli\Config\config.json (Windows).

Stored settings:

  • serverUrl: Last connected server URL
  • timeout: Default timeout
  • format: Default output format
  • debug: Debug mode

Output Formats

Text (Default)

Human-readable output with colors and formatting:

✓ Success

Data:
{
  "id": "doc-123",
  "title": "My Document"
}

Confidence: ████████░░ 80%

Reasoning: Document created with default template

JSON

Machine-readable JSON output:

{
  "success": true,
  "data": {
    "id": "doc-123",
    "title": "My Document"
  },
  "confidence": 0.8,
  "reasoning": "Document created with default template"
}

Error Handling

Errors include helpful suggestions:

✗ Failed

Error: [VALIDATION_ERROR] Title is required

Suggestion: Provide a title in the arguments

Exit Codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | Command failed or error occurred |

Examples

Complete Workflow

# Connect
afd connect http://localhost:3100/sse

# List what's available
afd tools

# Create something
afd call document.create '{"title": "Test Doc"}'

# Validate the server's command implementations
afd validate

# Interactive exploration
afd shell

CI/CD Integration

# JSON output for parsing
afd connect http://localhost:3100/sse
afd call document.list --format json | jq '.data'
afd validate --strict || exit 1

License

MIT