env Commands

Commands for creating, managing, and monitoring Teabar environments.

teactl env create

Create a new environment from a blueprint.

teactl env create [flags]

Flags

FlagShortDescription
--blueprint-bBlueprint name or community blueprint
--file-fPath to blueprint YAML file
--name-nEnvironment name (auto-generated if omitted)
--setSet variable values (key=value)
--valuesPath to values YAML file
--wait-wWait for environment to be ready
--timeoutWait timeout (default: 30m)

Examples

# From community blueprint
teactl env create --blueprint kubernetes-basic --name my-cluster

# From local file
teactl env create -f workshop.yaml --name march-training

# With variables
teactl env create -f workshop.yaml 
  --set participants=25 
  --set duration=8h 
  --name march-training

# With values file
teactl env create -f workshop.yaml --values prod-values.yaml --name prod-env

teactl env list

List all environments.

teactl env list [flags]

Flags

FlagShortDescription
--all-aShow all environments (including destroyed)
--output-oOutput format (table, json, yaml)
--filterFilter by label (key=value)

Examples

# List active environments
teactl env list

# Output as JSON
teactl env list -o json

# Filter by label
teactl env list --filter team=devops

Sample output:

NAME             STATUS    AGE     TTL       BLUEPRINT
march-training   Running   2h30m   5h30m     cicd-training
k8s-workshop     Running   45m     7h15m     kubernetes-basic
test-env         Creating  2m      -         custom

teactl env describe

Show detailed information about an environment.

teactl env describe <name> [flags]

Flags

FlagShortDescription
--output-oOutput format (table, json, yaml)

Examples

teactl env describe march-training

Sample output:

Name:           march-training
Status:         Running
Created:        2024-01-15 09:30:00 UTC
TTL:            5h 30m remaining
Blueprint:      cicd-training
Provider:       hetzner (eu-central)

Components:
  NAME      TYPE            STATUS    ENDPOINT
  gitlab    gitlab          Ready     https://gitlab.march-training.env.teabar.dev
  runners   gitlab-runner   Ready     2/2 online

Participants:
  ACTIVE: 18/20

Resources:
  CPU:      24 cores (allocated)
  Memory:   48 Gi (allocated)
  Storage:  200 Gi (allocated)

Cost:
  Current session: $8.50
  Rate: $1.50/hour

teactl env destroy

Destroy an environment and release all resources.

teactl env destroy <name> [flags]

Flags

FlagShortDescription
--force-fSkip confirmation prompt
--wait-wWait for destruction to complete

Examples

# Interactive confirmation
teactl env destroy march-training

# Skip confirmation
teactl env destroy march-training --force

teactl env start

Start (wake) a sleeping environment.

teactl env start <name> [flags]

Flags

FlagShortDescription
--wait-wWait until environment is running
--timeoutWait timeout (default: 10m)

Examples

# Start a sleeping environment
teactl env start march-training

# Start and wait until ready
teactl env start march-training --wait

# Start multiple environments
teactl env start march-training demo-env staging

teactl env stop

Stop (sleep) a running environment to save costs.

teactl env stop <name> [flags]

Flags

FlagShortDescription
--strategy-sSleep strategy (scale-to-zero, vm-stop, hibernate)
--wait-wWait until environment is sleeping

Examples

# Stop with default strategy
teactl env stop march-training

# Stop with specific strategy
teactl env stop march-training --strategy hibernate

# Stop multiple environments
teactl env stop --all-matching "workshop-*"

Sleep Strategies

StrategyResume TimeCost SavingsBest For
scale-to-zero~30s~90%Kubernetes environments
vm-stop~2m~80%VM-based environments
hibernate~5-10m~95%Long-term storage

See Sleep Mode & Scheduling for more details.


teactl env schedule

Configure automatic start/stop schedules for an environment.

teactl env schedule <name> [flags]

Flags

FlagShortDescription
--sleepTime to sleep (HH:MM or cron)
--wakeTime to wake (HH:MM or cron)
--timezoneTimezone (default: UTC)
--weekdays-onlyOnly run schedule on weekdays
--daysSpecific days (mon,tue,wed…)
--clearRemove schedule

Examples

# Business hours schedule (weekdays 9-6)
teactl env schedule march-training 
  --wake "09:00" 
  --sleep "18:00" 
  --timezone "America/New_York" 
  --weekdays-only

# Custom days
teactl env schedule march-training 
  --wake "08:00" 
  --sleep "17:00" 
  --days "tue,wed,thu"

# Clear schedule
teactl env schedule march-training --clear

# View current schedule
teactl env get march-training --show-schedule

See Sleep Mode & Scheduling for more details.


teactl env extend

Extend an environment’s TTL (time-to-live).

teactl env extend <name> [flags]

Flags

FlagShortDescription
--add-aDuration to add (e.g., 2h, 4h, 1d)
--untilSet absolute expiration (datetime)
--no-ttlRemove TTL (run indefinitely)

Examples

# Add 4 hours to TTL
teactl env extend march-training --add 4h

# Add 1 day
teactl env extend march-training -a 1d

# Set absolute expiration
teactl env extend march-training --until "2024-01-20 18:00"

# Remove TTL entirely
teactl env extend march-training --no-ttl

See TTL & Automatic Cleanup for more details.


teactl env checkpoint

Create a checkpoint (snapshot) of an environment.

teactl env checkpoint <name> [flags]

Flags

FlagShortDescription
--checkpoint-name-cName for the checkpoint
--description-dDescription of the checkpoint

Examples

teactl env checkpoint march-training 
  --checkpoint-name end-of-day-1 
  --description "After completing module 3"

teactl env restore

Restore an environment from a checkpoint.

teactl env restore <checkpoint> [flags]

Flags

FlagShortDescription
--name-nName for restored environment
--ttlTTL for restored environment

Examples

teactl env restore end-of-day-1 --name day2-training --ttl 8h

teactl env participants

List participant access links and status.

teactl env participants <name> [flags]

Flags

FlagShortDescription
--output-oOutput format (table, json, yaml, links)
--activeShow only active participants

Examples

# Show all participants
teactl env participants march-training

# Just the links (for sharing)
teactl env participants march-training -o links

teactl env watch

Watch environment activity in real-time.

teactl env watch <name> [flags]

Flags

FlagShortDescription
--events-eEvent types to watch (comma-separated)
--participant-pWatch specific participant

Examples

# Watch all activity
teactl env watch march-training

# Watch specific events
teactl env watch march-training -e git-push,pipeline-run

# Watch specific participant
teactl env watch march-training -p participant-5

teactl env logs

View logs from environment components.

teactl env logs <name> [component] [flags]

Flags

FlagShortDescription
--follow-fFollow log output
--tailNumber of lines to show (default: 100)
--sinceShow logs since duration (e.g., 1h)

Examples

# All logs
teactl env logs march-training

# Specific component
teactl env logs march-training gitlab

# Follow logs
teactl env logs march-training gitlab -f

# Last hour
teactl env logs march-training --since 1h

teactl env creds

Get access credentials for an environment.

teactl env creds <name> [flags]

Flags

FlagShortDescription
--component-cSpecific component credentials
--export-eExport as environment variables

Examples

# Show all credentials
teactl env creds march-training

# Specific component
teactl env creds march-training --component gitlab

# Export kubeconfig
teactl env creds march-training -c cluster --export > kubeconfig

teactl env costs

View cost breakdown for an environment.

teactl env costs <name> [flags]

Examples

teactl env costs march-training

Sample output:

Cost Summary for 'march-training'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duration:       6h 45m
Status:         Running

Components:
  GitLab (4 vCPU, 8Gi):     $3.40
  Runners (2x 2 vCPU):      $1.60
  Workspaces (20x 1 vCPU):  $2.50
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Current Total:              $7.50
Projected (8h):            $8.90
ende