Overview
The Tambo CLI provides commands for project initialization, component management, authentication, and more.
Installation
npm install -g tambo
# or use npx for one-off commands
npx tambo [command]
Global Options
Available on all commands:
Show help for the command
Commands
Initialize Tambo in an existing project.
Full documentation β
Options:
--api-key=<key> - Provide API key directly
--project-name=<name> - Create new project
--project-id=<id> - Use existing project
--full-send - Install starter components
--yes - Auto-answer yes to prompts
--skip-agent-docs - Skip AGENTS.md creation
--legacy-peer-deps - Use legacy peer deps
--no-browser - Donβt open browser during auth
Examples:
# Interactive
tambo init
# With API key
tambo init --api-key=sk_...
# Full-send mode
tambo init --full-send
# Non-interactive
tambo init --project-name=my-app --no-browser
Add components to your project.
tambo add <component> [options]
Full documentation β
Options:
--yes - Auto-answer yes to prompts
--dry-run - Preview changes without installing
--prefix=<path> - Custom installation path
--legacy-peer-deps - Use legacy peer deps
--force-update - Force reinstall
Examples:
# Interactive
tambo add message-thread-full
# Non-interactive
tambo add control-bar --yes
# Dry run
tambo add button --dry-run
# Custom path
tambo add card --prefix=src/ui/components
create-app
Create a new Tambo application from templates.
tambo create-app [name] [options]
Full documentation β
Options:
--template=<template> - Template to use (standard, vite, analytics)
--skip-git-init - Skip git initialization
--skip-tambo-init - Skip tambo initialization
--legacy-peer-deps - Use legacy peer deps
Examples:
# Interactive
tambo create-app
# Non-interactive
tambo create-app my-app --template=standard
# Current directory
tambo create-app . --template=vite
# Skip automatic setup
tambo create-app my-app --template=standard --skip-tambo-init
List available components from the registry.
Options:
--yes - Skip confirmation prompts
Output:
Available Tambo Components:
π¨ Layout Components
β’ message-thread-full Full-screen chat interface
β’ message-thread-panel Split-view chat with workspace
β’ message-thread-collapsible Collapsible chat sidebar
β’ control-bar Spotlight-style command palette
π οΈ Building Blocks
β’ message-input Message input with attachments
β’ avatar User avatar component
β’ button Button component
β’ card Card component
β’ input Input component
π¦ Pre-built Agents
β’ agent-toolkit Complete agent with tools
Use 'tambo add <component>' to install a component
Visit https://ui.tambo.co to see components in action
Exit code: 0
Update existing components to the latest versions.
tambo update [component] [options]
Options:
--all - Update all components
--yes - Auto-answer yes to prompts
--dry-run - Preview changes
Examples:
# Update specific component
tambo update message-thread-full
# Update all components
tambo update --all
# Preview updates
tambo update --all --dry-run
Output:
βΉ Checking for updates...
Components to update:
β’ message-thread-full (1.0.0 β 1.1.0)
β’ button (0.9.5 β 1.0.0)
? Do you want to proceed with updates? (Y/n)
β Updated message-thread-full to 1.1.0
β Updated button to 1.0.0
β¨ Updates complete!
upgrade
Upgrade Tambo dependencies in your project.
Options:
--yes - Auto-answer yes to prompts
--dry-run - Preview changes
--legacy-peer-deps - Use legacy peer deps
What it upgrades:
@tambo-ai/react to latest version
@tambo-ai/client to latest version
- Components from registry (via
update --all)
- LLM rules configuration
Examples:
# Interactive
tambo upgrade
# Non-interactive
tambo upgrade --yes
# Preview
tambo upgrade --dry-run
Output:
βΉ Checking for upgrades...
Packages to upgrade:
β’ @tambo-ai/react (1.0.0 β 1.2.0)
β’ @tambo-ai/client (1.0.0 β 1.2.0)
Components to update:
β’ message-thread-full (1.0.0 β 1.1.0)
β’ button (0.9.5 β 1.0.0)
? Do you want to proceed with upgrade? (Y/n)
β Upgraded @tambo-ai/react to 1.2.0
β Upgraded @tambo-ai/client to 1.2.0
β Updated 2 components
β¨ Upgrade complete!
migrate
Migrate components from legacy ui/ location to new tambo/ location.
Options:
--yes - Auto-answer yes to prompts
--dry-run - Preview changes
What it does:
- Moves all components from
components/ui/ to components/tambo/
- Updates all import paths in your codebase
- Updates component registrations in
tambo.ts
Examples:
# Interactive
tambo migrate
# Non-interactive
tambo migrate --yes
# Preview
tambo migrate --dry-run
Output:
βΉ Scanning for components to migrate...
Components found in ui/:
β’ message-thread-full
β’ button
β’ card
Files with imports to update:
β’ app/page.tsx
β’ app/layout.tsx
β’ lib/tambo.ts
? Do you want to proceed with migration? (Y/n)
β Moved 3 components to tambo/
β Updated 3 files with new import paths
β¨ Migration complete!
Manage authentication and sessions.
tambo auth <command> [options]
auth login
Authenticate with Tambo Cloud.
tambo auth login [options]
Options:
--no-browser - Donβt open browser (prints URL instead)
Output:
π Device Authorization Required
Please visit: https://console.tambo.co/auth/device?code=ABCD-1234
Waiting for authorization...
β Authenticated as [email protected]
Exit code: 0
auth logout
Log out and clear session.
Output:
β Logged out successfully
Exit code: 0
auth status
Check current authentication status.
Output:
Authentication Status:
Status: Authenticated
User: [email protected]
Session expires: 2024-12-31 23:59:59
Exit code: 0
Exit Codes
All commands use consistent exit codes:
0 - Success
1 - Error (network failure, invalid arguments, etc.)
2 - User action required (non-interactive mode, missing arguments)
Environment Variables
TAMBO_TELEMETRY_DISABLED
Disable anonymous telemetry.
export TAMBO_TELEMETRY_DISABLED=1
tambo init
TAMBO_TELEMETRY_HOST
Override telemetry host (for testing).
export TAMBO_TELEMETRY_HOST=https://custom-host.com
tambo init
FORCE_INTERACTIVE
Force interactive mode even in non-TTY environments.
export FORCE_INTERACTIVE=1
tambo init
Indicates CI environment (disables interactive prompts).
export CI=true
tambo init --api-key=sk_...
Non-Interactive Mode
The CLI automatically detects non-interactive environments:
- Piped stdin/stdout
- CI systems (CI=true)
- GitHub Actions (GITHUB_ACTIONS=true)
In non-interactive mode:
- Prompts are replaced with error messages
- Exit code
2 indicates user action required
- Guidance is provided for required arguments
Example:
# Interactive environment
tambo init
# β Shows prompts
# Non-interactive environment (e.g., CI)
tambo init
# β Error: API key required in non-interactive mode
# β Exit code: 2
# Correct usage in CI
tambo init --api-key=sk_...
# β Success
# β Exit code: 0
Configuration Files
.env.local (or .env)
Stores API key:
TAMBO_API_KEY=sk_your_api_key_here
# or for Next.js
NEXT_PUBLIC_TAMBO_API_KEY=sk_your_api_key_here
# or for Vite
VITE_TAMBO_API_KEY=sk_your_api_key_here
lib/tambo.ts
Component and tool registry:
import { TamboTool } from "@tambo-ai/react";
import { MessageThreadFull } from "@/components/tambo/message-thread-full";
export const tools: TamboTool[] = [
// Your tools here
];
export const components: Record<string, unknown> = {
MessageThreadFull,
// Other components
};
AGENTS.md
Guidance for AI coding agents (created by tambo init).
Troubleshooting
Command Not Found
npx tambo [command]
# or install globally
npm install -g tambo
Permission Denied
sudo npm install -g tambo
# or use npx (no global install)
npx tambo [command]
Network Errors
# Check internet connection
ping github.com
# Try with verbose logging
DEBUG=* tambo [command]
Dependency Conflicts
tambo add [component] --legacy-peer-deps
Stale Cache
npm cache clean --force
tambo [command]
Getting Help
# General help
tambo --help
# Command-specific help
tambo init --help
tambo add --help
tambo create-app --help
Output:
tambo/1.0.0 linux-x64 node-v20.0.0