Installation

The teactl command-line interface (CLI) is your primary tool for interacting with Teabar. This guide covers all installation methods for macOS, Linux, and Windows.

System Requirements

Before installing, ensure your system meets these requirements:

RequirementMinimumRecommended
Operating SystemmacOS 10.15+, Linux (glibc 2.17+), Windows 10+Latest stable version
Architecturex86_64 or ARM64Native architecture
Disk Space50 MB100 MB
InternetRequired for installation and operationStable broadband

Additional Requirements

  • Shell: bash, zsh, fish, or PowerShell
  • Permissions: sudo access for system-wide installation (optional)
  • Dependencies: None (statically linked binary)

Quick Install (Recommended)

The fastest way to install teactl on macOS or Linux:

curl -fsSL https://teabar.dev/install.sh | sh

What the Script Does

  1. Detects your system - Identifies OS (macOS/Linux) and architecture (amd64/arm64)
  2. Downloads the binary - Fetches the latest stable release
  3. Verifies integrity - Checks SHA256 checksum
  4. Installs - Places the binary in /usr/local/bin when writable (or ~/.local/bin otherwise)
  5. PATH hint - Prints a one-line PATH export if needed

Install Script Options

# Install specific version
curl -fsSL https://teabar.dev/install.sh | sh -s -- --version v0.0.4

# Install to custom directory
curl -fsSL https://teabar.dev/install.sh | sh -s -- --install-dir ~/.local/bin

# Preview without installing
curl -fsSL https://teabar.dev/install.sh | sh -s -- --dry-run

Windows (PowerShell)

Use the PowerShell installer:

iwr https://teabar.dev/install.ps1 -UseBasicParsing | iex

Manual Installation

If you prefer to download and install manually, or need to verify the binary yourself:

Step 1: Download

Download the appropriate archive for your platform (these URLs redirect to the artifact store):

  • Latest version marker: https://teabar.dev/downloads/teactl/latest/VERSION
  • Checksums: https://teabar.dev/downloads/teactl/<TAG>/SHA256SUMS
PlatformArchitectureFile name
macOSIntel (x86_64)teactl_<TAG>_darwin_amd64.tar.gz
macOSApple Silicon (ARM64)teactl_<TAG>_darwin_arm64.tar.gz
Linuxx86_64teactl_<TAG>_linux_amd64.tar.gz
Windowsx86_64teactl_<TAG>_windows_amd64.zip

Example (Linux amd64)

TAG="$(curl -fsSL https://teabar.dev/downloads/teactl/latest/VERSION)"
FILE="teactl_${TAG}_linux_amd64.tar.gz"

curl -fsSLO "https://teabar.dev/downloads/teactl/${TAG}/${FILE}"
curl -fsSLO "https://teabar.dev/downloads/teactl/${TAG}/SHA256SUMS"

sha256sum -c SHA256SUMS
sudo tar -C /usr/local/bin -xzf "${FILE}" teactl
teactl version

Step 2: Verify Checksum

Always verify the download integrity:

# For macOS/Linux
sha256sum -c teactl-*.sha256

# Expected output:
# teactl-linux-amd64: OK

On macOS without sha256sum:

shasum -a 256 -c teactl-*.sha256

Step 3: Install

# Rename the binary
mv teactl-* teactl

# Make it executable
chmod +x teactl

# Move to a directory in your PATH
sudo mv teactl /usr/local/bin/

# Or install to user directory (no sudo required)
mkdir -p ~/.local/bin
mv teactl ~/.local/bin/

Step 4: Verify PATH

Ensure the installation directory is in your PATH:

# Check if teactl is found
which teactl

# If not found, add to PATH (bash/zsh)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Windows Manual Installation

  1. Resolve the latest tag: https://teabar.dev/downloads/teactl/latest/VERSION
  2. Download teactl_<TAG>_windows_amd64.zip and SHA256SUMS
  3. Verify the checksum
  4. Extract teactl.exe and place it in a directory on your PATH
$Tag = (Invoke-WebRequest -UseBasicParsing -Uri "https://teabar.dev/downloads/teactl/latest/VERSION").Content.Trim()
$File = "teactl_${Tag}_windows_amd64.zip"

Invoke-WebRequest -UseBasicParsing -Uri "https://teabar.dev/downloads/teactl/${Tag}/${File}" -OutFile $File
Invoke-WebRequest -UseBasicParsing -Uri "https://teabar.dev/downloads/teactl/${Tag}/SHA256SUMS" -OutFile "SHA256SUMS"

$Expected = (Select-String -Path "SHA256SUMS" -Pattern ([regex]::Escape($File) + "$") | Select-Object -First 1).Line.Split()[0]
$Actual = (Get-FileHash -Algorithm SHA256 -Path $File).Hash
if ($Expected.ToLower() -ne $Actual.ToLower()) { throw "Checksum mismatch" }

Expand-Archive -Path $File -DestinationPath .	eactl -Force
# Move .	eactl	eactl.exe to a folder on PATH

Docker

Run teactl in a Docker container without local installation:

docker run --rm -it 
  -v ~/.teabar:/root/.teabar 
  teabar/teactl:latest 
  version

Create an Alias

For convenience, add an alias to your shell profile:

# bash/zsh
alias teactl='docker run --rm -it -v ~/.teabar:/root/.teabar teabar/teactl:latest'

# Add to ~/.bashrc or ~/.zshrc for persistence
echo "alias teactl='docker run --rm -it -v ~/.teabar:/root/.teabar teabar/teactl:latest'" >> ~/.bashrc

Docker Compose

For CI/CD pipelines, use in docker-compose.yml:

services:
  teactl:
    image: teabar/teactl:latest
    volumes:
      - ~/.teabar:/root/.teabar
    environment:
      - TEABAR_TOKEN=${TEABAR_TOKEN}

Verify Installation

After installation, verify everything is working:

teactl version
teactl version -o json
{
  "version": "dev",
  "commit": "unknown",
  "buildDate": "unknown",
  "goVersion": "go1.x.x",
  "os": "windows",
  "arch": "amd64"
}

Expected output:

teactl version 1.2.3 Build date: 2024-01-15 Git commit: abc1234def5 Go version: go1.21.5 OS/Arch: darwin/arm64


### Check for Updates

See if a newer version is available:

```bash
teactl version --check
Current version: 1.2.3
Latest version:  1.2.4
Update available! Run 'teactl upgrade' or reinstall.

Shell Completions

Enable tab completion for faster command entry:

Bash

# System-wide (requires sudo)
sudo teactl completion bash > /etc/bash_completion.d/teactl

# User-only
mkdir -p ~/.local/share/bash-completion/completions
teactl completion bash > ~/.local/share/bash-completion/completions/teactl

# Reload your shell
source ~/.bashrc

Zsh

# Add to fpath (Oh My Zsh)
teactl completion zsh > ~/.oh-my-zsh/completions/_teactl

# Or standard zsh
teactl completion zsh > "${fpath[1]}/_teactl"

# Reload completions
autoload -U compinit && compinit

Fish

teactl completion fish > ~/.config/fish/completions/teactl.fish

PowerShell

# Add to your PowerShell profile
teactl completion powershell >> $PROFILE

Configuration

After installation, teactl stores configuration in ~/.teabar/:

~/.teabar/
├── config.yaml      # CLI configuration
├── credentials      # Authentication tokens
├── envs/            # Environment kubeconfigs
└── cache/           # Cached data

Environment Variables

Override configuration with environment variables:

VariableDescriptionExample
TEABAR_CONFIGConfig file path/etc/teabar/config.yaml
TEABAR_TOKENOIDC token (for CI/CD)<keycloak-access-token>
TEABAR_ORGANIZATIONDefault organizationmy-org
TEABAR_API_URLAPI endpoint (self-hosted)https://api.teabar.internal
TEABAR_NO_COLORDisable colored outputtrue
TEABAR_DEBUGEnable debug loggingtrue

Upgrading

To upgrade, re-run the installer (it will replace the existing binary):

curl -fsSL https://teabar.dev/install.sh | sh

Windows (PowerShell):

iwr https://teabar.dev/install.ps1 -UseBasicParsing | iex

Uninstalling

Manual Uninstall

# Remove binary
sudo rm /usr/local/bin/teactl
# or
rm ~/.local/bin/teactl

# Remove configuration (optional)
rm -rf ~/.teabar

# Remove shell completions
rm /etc/bash_completion.d/teactl
rm ~/.oh-my-zsh/completions/_teactl

Troubleshooting

“command not found: teactl”

The binary isn’t in your PATH:

# Find where it's installed
find ~ -name teactl -type f 2>/dev/null
ls /usr/local/bin/teactl

# Add to PATH
export PATH="$HOME/.local/bin:$PATH"

“permission denied”

The binary isn’t executable:

chmod +x $(which teactl)

“cannot execute binary file”

Wrong architecture. Check your system:

uname -m
# x86_64 = amd64
# aarch64/arm64 = arm64

Download the correct binary for your architecture.

“certificate verify failed”

Your system’s CA certificates may be outdated:

# macOS
brew install ca-certificates

# Ubuntu/Debian
sudo apt install ca-certificates
sudo update-ca-certificates

# RHEL/CentOS
sudo yum install ca-certificates
sudo update-ca-trust

Proxy Issues

If you’re behind a corporate proxy:

export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1

# Then run teactl commands
teactl auth login

Next Steps

Now that teactl is installed:

  1. Quick Start Guide - Deploy your first environment
  2. Authentication - Configure authentication methods
  3. CLI Reference - Explore all available commands
  4. First Training Session - Set up environments for participants
ende