tambo-ai

Global Options

All Tambo CLI commands support these global options. You can use them with any command to modify behavior, skip prompts, or handle common scenarios.

Available Options

--version

Shows the current version of the Tambo CLI.

npx tambo --version
# Output: 1.2.3

--yes, -y

Auto-answers "yes" to all confirmation prompts.

Examples:

# Skip all prompts during setup
npx tambo init --yes
 
# Install components without confirmation
npx tambo add form graph --yes
 
# Update all components without asking
npx tambo update installed --yes
 
# Migrate components automatically
npx tambo migrate --yes

Use cases:

  • Automated deployments
  • CI/CD pipelines
  • Batch operations
  • When you're confident about the changes

--legacy-peer-deps

Installs dependencies using npm's --legacy-peer-deps flag. This resolves common dependency conflicts.

Examples:

# Install with legacy peer deps
npx tambo init --legacy-peer-deps
 
# Add components with legacy peer deps
npx tambo add message-thread-full --legacy-peer-deps
 
# Upgrade project with legacy peer deps
npx tambo upgrade --legacy-peer-deps

When to use:

  • Getting peer dependency warnings
  • Working with older React versions
  • Complex dependency trees
  • Corporate environments with strict package policies

Dependency Conflicts

If you see errors like "unable to resolve dependency tree" or peer dependency warnings, try adding --legacy-peer-deps to your command.

--prefix <path>

Specifies a custom directory for components instead of the default components/tambo.

Examples:

# Install components in src/components/ui
npx tambo add form --prefix=src/components/ui
 
# List components in custom directory
npx tambo list --prefix=src/components/ui
 
# Update components in custom location
npx tambo update installed --prefix=src/components/custom
 
# Migrate from custom source to custom destination
npx tambo migrate --prefix=src/components/tambo

Common prefix patterns:

  • src/components/ui - Traditional UI components directory
  • src/components/tambo - Dedicated Tambo directory in src
  • app/components/ui - App router components
  • lib/components - Library-style organization

--dry-run

Preview changes before applying them. Available for commands that modify files.

Examples:

# Preview migration changes
npx tambo migrate --dry-run
 
# Preview component updates
npx tambo update installed --dry-run
 
# Preview upgrade changes
npx tambo upgrade --dry-run

Output example:

🔍 Dry run mode - no changes will be made

The following changes would be applied:
  📁 Move: components/ui/form.tsx → components/tambo/form.tsx
  📁 Move: components/ui/graph.tsx → components/tambo/graph.tsx
  📝 Update: lib/tambo.ts (import paths)

Run without --dry-run to apply these changes.

Combining Options

You can combine multiple options in a single command:

# Install components with custom prefix, skip prompts, and handle conflicts
npx tambo add form graph --prefix=src/components/ui --yes --legacy-peer-deps
 
# Upgrade with all safety options
npx tambo upgrade --dry-run --prefix=src/components/ui
 
# Migrate automatically with custom paths
npx tambo migrate --yes --prefix=src/components/custom

Command-Specific Options

Some commands have additional options beyond these global ones:

create-app specific options

# Initialize git repository
npx tambo create-app my-app --init-git
 
# Use specific template
npx tambo create-app my-app --template=mcp

add specific options

# Preview component before installing
npx tambo add form --preview
 
# Install multiple components
npx tambo add form graph canvas-space

Best Practices

For Development

# Safe exploration - always preview first
npx tambo migrate --dry-run
npx tambo upgrade --dry-run
 
# Quick iterations
npx tambo add form --yes
npx tambo update form --yes

Troubleshooting

Common Issues

Issue: Command not found

# Check CLI version
npx tambo --version
 
# Update to latest
npm install -g @tambo-ai/cli@latest

Issue: Permission errors

# Use npx instead of global install
npx tambo init --yes

Issue: Dependency conflicts

# Use legacy peer deps
npx tambo add form --legacy-peer-deps

Issue: Wrong directory

# Check current components
npx tambo list
 
# Use correct prefix
npx tambo list --prefix=src/components/ui

On this page