Everything you do with Agentuity goes through the CLI: creating projects, running locally, deploying to the cloud, and debugging live agents. The Web App stays synced when you need a visual interface.
Installation
Install the CLI using the universal installer:
curl -sSL https://agentuity.sh | shAlternatively, install via package manager: bun add -g @agentuity/cli
Verify the installation:
agentuity --versionBun 1.3.0 or higher is required to run the CLI.
Upgrading
Upgrade the CLI to the latest version:
agentuity upgradeForce upgrade even if already on the latest version:
agentuity upgrade --forceThe CLI periodically checks for new versions and prompts you to upgrade when one is available.
Authentication
Login to Your Account
Authenticate using a browser-based login flow:
agentuity auth login
# or simply
agentuity loginThis command:
- Generates a one-time password and opens your browser
- Prompts you to authenticate in the web app
- Saves your API credentials locally
Check your authentication status:
agentuity auth whoamiGet Your API Key
Display the API key for your authenticated account:
agentuity auth apikeyCreate a New Account
Sign up for a new Agentuity account directly from the CLI:
agentuity auth signupThis opens your browser to complete account creation, then automatically saves your credentials locally.
Logout
Clear your local credentials:
agentuity auth logout
# or simply
agentuity logoutPreferences
Set default organization and region to avoid specifying them on every command.
Organization Preferences
# Set default organization
agentuity auth org select org_abc123
# Show current default organization
agentuity auth org current
# Clear default organization
agentuity auth org unselectWhen a default organization is set, commands that support --org will use it automatically.
Region Preferences
# Set default region for deployments
agentuity cloud region select usw
# Show current default region
agentuity cloud region current
# Clear default region
agentuity cloud region unselectCreating Projects
Create a New Project
The quickest way to get started is the interactive project creation:
agentuity project create
# or simply
agentuity createCreate a project with a specific name:
agentuity project create --name my-agentCreate a project in a specific directory:
agentuity project create --name my-agent --dir ~/projects/agentsDefault Template
Running agentuity create currently scaffolds a project with:
- Translation agent: Demonstrates AI Gateway, thread state, and structured logging
- API routes: Shows agent integration and state management endpoints
- React frontend: Pre-configured with Tailwind CSS
- Workbench: Local testing UI at
/workbench - Evaluations: Example eval setup for testing agent behavior
The agent uses the OpenAI SDK routed through Agentuity's AI Gateway. This means you don't need a separate OpenAI API key: requests are authenticated with your Agentuity credentials and billed through your Agentuity account.
Project Creation Options
| Option | Description |
|---|---|
--name <name> | Project name |
--dir <path> | Directory to create the project in |
--template <name> | Template to use (optional, defaults to "default") |
--no-install | Skip dependency installation |
--no-build | Skip initial build |
--no-register | Don't register the project with Agentuity Cloud |
--database <value> | Database option: skip, new, or existing database name |
--storage <value> | Storage option: skip, new, or existing bucket name |
--enable-auth | Enable Agentuity Auth for the project |
Example:
agentuity project create \
--name customer-service-bot \
--dir ~/projects \
--no-buildHeadless Project Creation
Create projects non-interactively for CI/CD pipelines and automation:
# Create with new database and storage
agentuity project create \
--name my-agent \
--database new \
--storage new \
--enable-auth
# Skip optional resources
agentuity project create \
--name my-agent \
--database skip \
--storage skip
# Use existing resources
agentuity project create \
--name my-agent \
--database my-existing-db \
--storage my-bucketThe --database and --storage options require authentication. Run agentuity login first or the command will fail.
Managing Projects
List Projects
View all registered projects:
agentuity project listFor machine-readable output (useful for scripts and AI coding agents):
agentuity --json project listShow Project Details
View details for a specific project:
agentuity project show <project-id>Delete a Project
Delete projects interactively:
agentuity project deleteDelete a specific project:
agentuity project delete <project-id>Skip confirmation prompt:
agentuity project delete <project-id> --confirmProject deletion is permanent and cannot be undone. Deployed agents and associated resources will be removed.
Import a Project
Register an existing local Agentuity project with the cloud:
# Import current directory
agentuity project import
# Import from specific directory
agentuity project import --dir ./my-existing-project
# Validate without importing
agentuity project import --validate-onlyThe import command verifies that the directory contains a valid Agentuity project. If an agentuity.json already exists, it validates cloud access. If no agentuity.json exists, it checks for @agentuity/runtime and an agentuity.config.ts file (either in the root or in an agentuity/ subdirectory for parent-project layouts).
When you run agentuity dev or agentuity deploy on an unregistered project while authenticated, the CLI will prompt you to import it automatically.
Command Shortcuts
Several common commands have shortcuts that let you skip the subcommand prefix:
| Full Command | Shortcut | Also Works |
|---|---|---|
agentuity auth login | agentuity login | |
agentuity auth logout | agentuity logout | |
agentuity auth signup | agentuity signup | |
agentuity project create | agentuity create | new, init |
agentuity cloud deploy | agentuity deploy | |
agentuity cloud ssh | agentuity ssh |
All other commands require their full prefix (e.g., agentuity cloud session list, agentuity auth ssh add).
Global Options
The CLI supports several global flags that work with any command:
| Flag | Description | Example |
|---|---|---|
--json | Output in JSON format | agentuity --json project list |
--log-level <level> | Set log verbosity (debug, trace, info, warn, error) | agentuity --log-level=debug auth login |
--quiet | Suppress non-essential output | agentuity --quiet project create |
--no-progress | Disable progress indicators | agentuity --no-progress build |
--color <mode> | Control color output (auto, always, never) | agentuity --color=never project list |
--explain | Show what the command would do without executing | agentuity --explain project delete my-proj |
--dry-run | Simulate command execution | agentuity --dry-run project delete my-proj |
--skip-version-check | Disable automatic version checking | agentuity --skip-version-check dev |
JSON Output
All commands support --json for machine-readable output, useful for shell scripts and AI coding agents:
# Get JSON output for scripting
agentuity --json auth whoami
# Parse with jq (a command-line JSON processor)
agentuity --json project list | jq '.[].name'jq is a lightweight command-line JSON processor. Install via brew install jq (macOS) or apt install jq (Linux).
Log Levels
Control CLI verbosity:
# Detailed debugging output
agentuity --log-level=debug project create
# Only show errors
agentuity --log-level=error buildSSH Key Management
Add SSH keys to your account for secure container access during development and debugging.
List SSH Keys
View all SSH keys on your account:
agentuity auth ssh listAdd an SSH Key
Add a new SSH key interactively (automatically discovers keys in ~/.ssh/):
agentuity auth ssh addAdd a specific key file:
agentuity auth ssh add --file ~/.ssh/id_ed25519.pubPipe a key from stdin:
cat ~/.ssh/id_rsa.pub | agentuity auth ssh addRemove an SSH Key
Remove keys interactively:
agentuity auth ssh deleteRemove a specific key by fingerprint:
agentuity auth ssh delete <fingerprint>SSH keys enable secure access to deployed agent containers for debugging and log inspection. See Debugging Deployments for details.
Next Steps
Now that you have the CLI installed and authenticated:
- Local Development: Run agents locally with hot reload
- Deploying to the Cloud: Deploy agents to Agentuity Cloud
- Managing Cloud Storage: Inspect storage, env vars, and secrets
- OpenCode Plugin: AI-assisted development with specialized agents