Skip to main content

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:
--help
boolean
Show help for the command
--version
boolean
Show CLI version

Commands

init

Initialize Tambo in an existing project.
tambo init [options]
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

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

List available components from the registry.
tambo list [options]
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

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.
tambo upgrade [options]
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.
tambo migrate [options]
Options:
  • --yes - Auto-answer yes to prompts
  • --dry-run - Preview changes
What it does:
  1. Moves all components from components/ui/ to components/tambo/
  2. Updates all import paths in your codebase
  3. 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!

auth

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.
tambo auth logout
Output:
βœ” Logged out successfully
Exit code: 0

auth status

Check current authentication status.
tambo auth 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

CI

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

Version Information

tambo --version
Output:
tambo/1.0.0 linux-x64 node-v20.0.0

Build docs developers (and LLMs) love