LogoCua
CLI

Installation

Install the CUA CLI on your system

Quick Install

The fastest way to install the CUA CLI is using our installation scripts:

curl -LsSf https://cua.ai/cli/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex"

These scripts will automatically:

  1. Install Bun (a fast JavaScript runtime)
  2. Install the CUA CLI via bun add -g @trycua/cli

The installation scripts will automatically detect your system and install the appropriate binary to your PATH.

Alternative: Install with Bun

You can also install the CLI directly using Bun:

# Install Bun if you don't have it
curl -fsSL https://bun.sh/install | bash

# Install CUA CLI
bun add -g @trycua/cli

Using Bun provides faster installation and better performance compared to npm. If you don't have Bun installed, the first command will install it for you.

Verify Installation

After installation, verify the CLI is working:

cua --help

You should see the CLI help output with available commands.

First Time Setup

After installation, you'll need to authenticate with your CUA account:

# Login with browser-based OAuth flow
cua auth login

# Or provide your API key directly
cua auth login --api-key sk-your-api-key-here

Updating

To update to the latest version:

Re-run the installation script:

# macOS/Linux
curl -LsSf https://cua.ai/cli/install.sh | sh

# Windows
powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex"
npm update -g @trycua/cli

Uninstalling

Remove the binary from your PATH:

# macOS/Linux
rm $(which cua)

# Windows
# Remove from your PATH or delete the executable
npm uninstall -g @trycua/cli

Troubleshooting

Command Not Found

If you get a "command not found" error after installation:

  1. Check your PATH: Make sure the installation directory is in your PATH
  2. Restart your terminal: Close and reopen your terminal/command prompt
  3. Manual PATH setup: Add the installation directory to your PATH manually

Permission Issues

If you encounter permission issues during installation:

Try running with sudo (not recommended for the curl method):

# If using npm
sudo npm install -g @trycua/cli

Run PowerShell as Administrator:

# Right-click PowerShell and "Run as Administrator"
powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex"

Network Issues

If the installation script fails due to network issues:

  1. Check your internet connection
  2. Try the npm installation method instead
  3. Check if your firewall is blocking the download

Next Steps

Was this page helpful?