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 | shpowershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex"These scripts will automatically:
- Install Bun (a fast JavaScript runtime)
- 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/cliUsing 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 --helpYou 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-hereUpdating
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/cliUninstalling
Remove the binary from your PATH:
# macOS/Linux
rm $(which cua)
# Windows
# Remove from your PATH or delete the executablenpm uninstall -g @trycua/cliTroubleshooting
Command Not Found
If you get a "command not found" error after installation:
- Check your PATH: Make sure the installation directory is in your PATH
- Restart your terminal: Close and reopen your terminal/command prompt
- 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/cliRun 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:
- Check your internet connection
- Try the npm installation method instead
- Check if your firewall is blocking the download
Next Steps
Was this page helpful?