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

amai

v0.0.28

Published

ama cli

Readme

AMAI CLI

A CLI tool that connects to your backend server to execute tool calls locally on your machine.

Installation

Option 1: Install from npm (Recommended)

npm install -g amai

Option 2: Install Globally from Source

# From the cli package directory
cd packages/cli
npm install
npm run build

# Link globally using npm
npm link

# Or use the install script
./install-global.sh

Option 3: Link Locally to Another Project

# In your other project directory
npm link /path/to/ama/packages/cli

Option 4: Install from Local Path

In your project's package.json:

{
  "dependencies": {
    "amai": "file:../path/to/ama/packages/cli"
  }
}

Then run npm install.

Usage

amai [command] [options]

Commands

  • login - Authorize device
  • logout - Log out and remove credentials
  • start - Start background daemon (recommended for better performance)
  • stop - Stop background daemon
  • status - Check daemon status
  • project add <path> - Register a project directory
  • project list - List registered projects

Options

  • --help, -h - Show help message

Environment Variables

  • SERVER_URL - WebSocket server URL to connect to (optional, has a default)
    • Example: ws://localhost:8787 or wss://your-server.com

Examples

# Login first
amai login

# Start in background mode (recommended)
amai start

# Check daemon status
amai status

# Stop daemon
amai stop

# Register a project
amai project add /path/to/your/project

# List registered projects
amai project list

# Show help
amai --help

How It Works

  1. The CLI connects to a WebSocket server
  2. It listens for tool call messages from the server
  3. When tool calls are received, it executes them locally on your machine
  4. Results are sent back to the server via WebSocket
  5. It automatically reconnects if the connection is lost

Development

To build the CLI:

cd packages/cli
npm install
npm run build

The built files will be in the dist/ directory.

Troubleshooting

Connection issues

  • Check that the server is running and accessible
  • Verify the WebSocket URL format (should start with ws:// or wss://)
  • Check firewall/network settings
  • The CLI will automatically attempt to reconnect every 5 seconds if disconnected

Authentication issues

  • Run amai login to authenticate
  • Credentials are stored in ~/.amai/credentials.json
  • Run amai logout to clear credentials and re-authenticate