Upgrade to New CLI¶
Upgrade from the npm-based CLI to the new golang binary
The Airbase CLI has been updated with a new binary that provides improved performance and simpler installation. This guide will help you migrate from the old npm-based CLI to the new binary.
Why Upgrade?¶
The old npm CLI (@airbase/airbase-cli@containers) is deprecated. The backend API has been upgraded to a new architecture that only works with the new golang CLI.
Benefits of the new CLI: - ✅ Faster performance - ✅ Simpler installation (no Node.js required) - ✅ Smaller download size - ✅ Shorter command syntax (airbase build instead of airbase container build) - ✅ Auto build-and-deploy feature
Quick Check: Do You Need to Upgrade?¶
Run this command to check your current CLI version:
If you see this - you need to migrate:
If you see this - you're already using the new CLI:
Upgrade Steps¶
Step 1: Uninstall Old CLI¶
Remove the old npm-based CLI:
Verify removal:
You should see "command not found" or nothing.
Still See Old Version?
If airbase -v still shows 3.0.0-beta.15, the CLI may be installed via a package manager (mise, homebrew, etc.). See Troubleshooting Multiple Installations.
Step 2: Remove Old Authentication File¶
Remove the old authentication file:
Verify removal:
Should show "No such file or directory".
Step 3: Install New CLI¶
Visit the CLI download page:
The page will detect your system architecture and provide the appropriate installation command.
Example installation command:
Installation Location
The installer will place the binary in one of two locations:
~/.local/bin/airbase(if~/.local/binexists)/usr/local/bin/airbase(if~/.local/bindoesn't exist)
Step 4: Verify Installation¶
Check the new CLI version:
Expected output:
Verify binary location:
Expected output (if installed to ~/.local/bin):
Or (if installed to /usr/local/bin):
Step 5: Authenticate¶
Authenticate with the new CLI:
Authentication flow:
- CLI generates a one-time verification code
- Open the provided URL in your browser
- Verify the code matches on both CLI and browser
- Click "Continue" and "Accept" to authorize
- Name your API token (e.g., "my-laptop")
- CLI receives confirmation
Terminal view:
You'll see a verification code like this:
Browser view:
The browser will show the same code and ask you to confirm.
Authentication Complete
Your credentials are saved in ~/.airbaserc in the new format.
Step 6: Verify Authentication¶
Check that authentication worked:
Expected format (new CLI):
ACCESS_TOKEN=eyJhbGci...
AIRBASE_ENDPOINT=https://console.airbase.tech.gov.sg
EXPIRY=2026-03-06T10:53:31+08:00
REFRESH_TOKEN=eyJhbGci...
Step 7: Test Deployment¶
Before testing, ensure: - You have created a team in Airbase Console - You have created a project within that team - Note down your project handle (format: team-name/project-name)
Navigate to your project directory:
Configure your project:
This command will: - Show a list of your projects - Create an airbase.json file linking your code to the project
Build and deploy:
New Command Syntax
The new CLI supports shorter commands: - airbase build (instead of airbase container build) - airbase deploy (instead of airbase container deploy)
Old commands still work for backwards compatibility.
Command Differences¶
Old CLI vs New CLI¶
| Task | Old Command | New Command |
|---|---|---|
| Build | airbase container build | airbase build |
| Deploy | airbase container deploy --yes | airbase deploy --yes |
| Deploy to env | airbase container deploy --yes staging | airbase deploy --yes staging |
| Destroy | airbase container destroy --yes | airbase destroy --yes |
| Configure | airbase configure | airbase configure (same) |
| Login | airbase login | airbase login (same) |
Note: Old commands still work with the new CLI for backwards compatibility.
New Features¶
1. Auto Build-and-Deploy¶
The new CLI can automatically build before deploying:
To skip building and deploy a specific image:
2. Shorter Commands¶
# New syntax (recommended)
airbase build
airbase deploy --yes
# Old syntax (still works)
airbase container build
airbase container deploy --yes
Troubleshooting¶
Issue: Old CLI Still Present After Uninstall¶
Symptom:
Cause: CLI installed via package manager (mise, homebrew, asdf, etc.) that takes PATH precedence.
Solution:
Find where the old CLI is located:
If it shows a path like:
Remove it:
# For mise users
mise uninstall node # Adjust version as needed
# For homebrew users
brew uninstall airbase-cli
# Or manually remove
sudo rm $(which airbase)
Verify removal:
which airbase
# Should show "not found" or the new CLI location (/Users/username/.local/bin/airbase or /usr/local/bin/airbase)
Issue: Command Not Found After Installation¶
Symptom:
Cause: - Installation directory (~/.local/bin or /usr/local/bin) not in PATH - Installation failed
Solution:
Check if binary exists:
If binary exists in ~/.local/bin:
Add ~/.local/bin to PATH:
# For bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# For zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
If binary exists in /usr/local/bin:
Add /usr/local/bin to PATH:
# For bash
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# For zsh
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
If binary doesn't exist:
Re-run installation from https://go.gov.sg/airbase-cli
Issue: Authentication Fails¶
Symptom: - Browser flow doesn't complete - "Invalid credentials" errors
Solution:
- Check verification codes match:
- Code in terminal should match code in browser
-
If they don't match, restart authentication
-
Clear and re-authenticate:
-
Check internet connectivity:
-
Ensure you're logged into Airbase Console:
- Visit https://go.gov.sg/airbase
- Login with TechPass or gov.sg email
Issue: Massive tRPC Error¶
Symptom:
TRPCClientError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
at TRPCClientError.from (file:///.../TRPCClientError-0de4d231.mjs:37:16)
...
status: 404,
statusText: 'Not Found',
Cause: Using old npm CLI after backend API has migrated.
Solution: You must migrate to the new CLI immediately. The old CLI is no longer functional. Follow all steps in this guide starting from Step 1.
Issue: Wrong Architecture on macOS¶
Symptom:
Cause: Running wrong binary for your Mac's architecture.
Solution:
Check your Mac architecture:
Download the correct binary from https://go.gov.sg/airbase-cli
Issue: macOS Gatekeeper Blocking Binary¶
Only for Manual Downloads
This issue only occurs if you manually downloaded the CLI binary. The install script (recommended method) does not require these steps. Use the install script from https://go.gov.sg/airbase-cli to avoid this issue.
Symptom:
Solution:
Remove quarantine attribute (use the path where your binary is installed):
# If installed to ~/.local/bin
sudo xattr -rd com.apple.quarantine ~/.local/bin/airbase
# If installed to /usr/local/bin
sudo xattr -rd com.apple.quarantine /usr/local/bin/airbase
Or allow in System Preferences: - System Preferences → Security & Privacy → General → "Allow"
Verification Checklist¶
After completing all migration steps, verify your setup:
- Check CLI version:
airbase -vshows version with commit hash - Check binary location:
which airbaseshows/Users/username/.local/bin/airbaseor/usr/local/bin/airbase - Check authentication:
cat ~/.airbasercshows new format (ACCESS_TOKEN, REFRESH_TOKEN) - Test configuration:
airbase configurelists your projects - Test Docker:
docker psworks without error - Test build:
airbase buildcompletes successfully - Test deploy:
airbase deploy --yes stagingworks
Getting Help¶
Additional Resources¶
- Migration Guide: CLI Migration Documentation
- CLI Download: https://go.gov.sg/airbase-cli
- Airbase Console: https://go.gov.sg/airbase
When to Contact Support¶
Contact support if you experience: - SEED laptop certificate issues - Persistent authentication failures after troubleshooting - Installation issues on corporate/restricted machines - Unexpected CLI behavior
What to provide:
# CLI version
airbase -v
# Operating system
uname -a # macOS/Linux
# Architecture
uname -m
# Binary location
which airbase
# Authentication format (redact tokens)
cat ~/.airbaserc | sed 's/=.*/=REDACTED/g'
# Full error message
Summary¶
Key migration steps:
- ✅ Uninstall old npm CLI:
sudo npm uninstall --global @airbase/airbase-cli - ✅ Remove old auth file:
rm ~/.airbaserc - ✅ Install new CLI from https://go.gov.sg/airbase-cli
- ✅ Verify installation:
airbase -vshows detailed version - ✅ Authenticate:
airbase login - ✅ Test deployment:
airbase configure,airbase build,airbase deploy
The new CLI offers: - Faster performance - Simpler installation - Shorter commands - Auto build-and-deploy
You're now ready to use the new Airbase CLI!
See Also¶
- Tutorial: Getting Started with Airbase
- Reference: CLI Commands Reference
- How-To: Build and Deploy Applications