CLI Overview
teactl is the command-line interface for managing Teabar environments. It provides commands for creating, managing, and monitoring lab environments, plus an interactive TUI for real-time monitoring.
Quick Start
# Install
curl -fsSL https://teabar.dev/install.sh | sh
# Authenticate
teactl auth login
# Create an environment
teactl env create --blueprint gitlab-cicd --name my-workshop
# List environments
teactl env list
# Delete an environment
teactl env delete my-workshop Installation
# Quick install (Linux/macOS)
curl -fsSL https://teabar.dev/install.sh | sh
# Quick install (Windows PowerShell)
iwr https://teabar.dev/install.ps1 -UseBasicParsing | iex Command Groups
auth
Login, logout, API tokens, and authentication.
env
Create, manage, and monitor environments.
blueprint
Validate, render, and manage blueprints.
catalog
Browse and search the blueprint catalog.
access
Kubeconfig, SSH, port-forward, credentials.
participant
Invite and manage environment participants.
checkpoint
Create and restore environment snapshots.
activity
Track and export participant activity.
config
CLI configuration and contexts.
home
local
Run operators locally for development and testing.
Command Structure
teactl [global-flags] <command> <subcommand> [flags] [args] Global Flags
| Flag | Short | Description |
|---|---|---|
--org | -o | Organization context |
--project | -p | Project context |
--output | Output format (table, json, yaml) | |
--quiet | -q | Minimal output |
--verbose | -v | Debug output |
--no-interactive | Disable prompts | |
--no-color | Disable colors | |
--config | Config file path |
Full Command Reference
Authentication
teactl auth login # OIDC device flow login
teactl auth logout # Clear credentials
teactl auth status # Show auth status
teactl auth whoami # Current user info
teactl auth token create # Create API token
teactl auth token list # List API tokens
teactl auth token revoke # Revoke API token Environments
teactl env create # Create environment (wizard)
teactl env list # List environments
teactl env get <name> # Show environment details
teactl env start <name> # Wake sleeping environment
teactl env stop <name> # Put to sleep
teactl env delete <name> # Delete environment
teactl env logs <name> # Stream logs
teactl env exec <name> # Execute command Blueprints
teactl blueprint create # Create blueprint
teactl blueprint list # List blueprints
teactl blueprint get <name> # Show blueprint details
teactl blueprint validate # Validate blueprint
teactl blueprint render # Render with variables
teactl blueprint push # Push to registry
teactl blueprint pull # Pull from registry Catalog
teactl catalog search <query> # Search blueprints
teactl catalog browse # TUI catalog browser
teactl catalog install <name> # Install to project Access
teactl access kubeconfig <env> # Get kubeconfig
teactl access ssh <env> # SSH to VM
teactl access terminal <env> # Open web terminal
teactl access port-forward # Forward ports
teactl access url <env> # List access URLs
teactl access credentials # Show credentials Participants
teactl participant invite # Invite via magic link
teactl participant create # Create with credentials
teactl participant codes # Generate access codes
teactl participant list # List participants
teactl participant revoke # Revoke access Checkpoints
teactl checkpoint create <env> # Create checkpoint
teactl checkpoint list <env> # List checkpoints
teactl checkpoint restore <id> # Restore checkpoint
teactl checkpoint diff <id> # Compare checkpoints
teactl checkpoint delete <id> # Delete checkpoint Activity
teactl activity list <env> # List activity
teactl activity watch <env> # Live activity TUI
teactl activity export <env> # Export to CSV/JSON
teactl activity stats <env> # Activity statistics Organization & Projects
teactl org list # List organizations
teactl org switch <name> # Switch organization
teactl project list # List projects
teactl project switch <name> # Switch project Configuration
teactl config init # Setup wizard
teactl config set <key> <val> # Set config value
teactl config get <key> # Get config value
teactl config list # Show all config Local Execution
teactl local start # Start local operator
teactl local stop # Stop local operator
teactl local status # Show local operator status
teactl local logs # View operator logs
teactl local restart # Restart operator
teactl local config # Configure local providers See Local Execution for detailed usage.
TUI
teactl ui # Launch TUI
teactl ui --view logs # Start on logs view
teactl ui --view catalog # Start on catalog view
teactl ui --view activity # Start on activity view Configuration
Configuration is stored in ~/.teactl/config.yaml:
api:
url: https://api.teabar.dev
timeout: 30s
current_context: default
contexts:
default:
organization: my-company
project: default
work:
organization: acme-corp
project: production
output:
format: table
color: auto
tui:
theme: auto
refresh_interval: 5s Environment Variables
| Variable | Description |
|---|---|
TEABAR_SERVER | API server URL |
TEABAR_TOKEN | API token (for CI/CD) |
TEABAR_ORG | Default organization |
TEABAR_PROJECT | Default project |
TEABAR_OUTPUT | Output format |
TEABAR_NO_INTERACTIVE | Disable prompts |
TEABAR_PROXMOX_URL | Proxmox API URL |
TEABAR_PROXMOX_TOKEN_ID | Proxmox API token ID |
TEABAR_PROXMOX_SECRET | Proxmox API token secret |
TEABAR_PROXMOX_TLS_INSECURE | Skip TLS verification for Proxmox |
TEABAR_HCLOUD_TOKEN | Hetzner Cloud API token |
NO_COLOR | Disable colors |
Shell Completion
Enable tab completion for commands, flags, and resource names:
# Bash
source <(teactl completion bash)
# Zsh
source <(teactl completion zsh)
# Fish
teactl completion fish | source See Shell Completion Guide for permanent setup.
Interactive TUI
Launch the full-screen terminal interface:
teactl ui The TUI provides:
- Environments view - List and manage environments
- Logs view - Stream and search logs
- Catalog view - Browse blueprints with preview
- Activity view - Monitor participant activity
Tip
Press ? in the TUI to see all keyboard shortcuts.
TUI Overview
Learn about the interactive terminal interface.
TUI Navigation
Keyboard shortcuts and navigation guide.
CI/CD Integration
Use API tokens for non-interactive automation:
# Create a token
teactl auth token create --name "CI Pipeline" --scope environment
# Use in CI
export TEABAR_TOKEN="your-token"
export TEABAR_NO_INTERACTIVE=1
teactl env create --blueprint test-env --name "ci-$BUILD_ID" --wait See Authentication for CI/CD examples.