New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

amai

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amai

ama cli

latest
npmnpm
Version
0.0.26
Version published
Maintainers
1
Created
Source

AMAI CLI

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

Installation

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
# 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

  • The CLI connects to a WebSocket server
  • It listens for tool call messages from the server
  • When tool calls are received, it executes them locally on your machine
  • Results are sent back to the server via WebSocket
  • 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

Keywords

ama

FAQs

Package last updated on 23 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts