Skip to content

CLI Installation

Requirements

  • Node.js 18 or later
  • npm, yarn, or pnpm

Installation

npm install -g @ubiship/amp
yarn global add @ubiship/amp
pnpm add -g @ubiship/amp

Verify Installation

amp --version
# amp/1.0.0

Authentication

Interactive Login

amp auth login

This opens a browser for authentication. After logging in, your credentials are stored securely.

API Key Authentication

amp auth login --api-key amp_live_xxxxxxxxxxxxx

Or set via environment variable:

export AMP_API_KEY="amp_live_xxxxxxxxxxxxx"

Verify Authentication

amp whoami
User: john@example.com
Tenant: Acme Corp (tnt_xxx)
Role: admin

Configuration

Config File

The CLI stores configuration in ~/.amp/config.json:

{
  "api_key": "amp_live_xxxxxxxxxxxxx",
  "tenant_id": "tnt_xxx",
  "api_url": "https://api.amp.dev",
  "default_output": "table"
}

Environment Variables

Variable Description
AMP_API_KEY API key for authentication
AMP_TENANT_ID Default tenant ID
AMP_API_URL API base URL

Set Configuration

amp config set api_url https://custom.api.url
amp config set default_output json

View Configuration

amp config list

Updating

npm update -g @ubiship/amp

Uninstalling

npm uninstall -g @ubiship/amp
rm -rf ~/.amp