CI Automation
Non-interactive deployment with --yes and CI/CD integration.
The --yes flag
The --yes flag runs getbot setup without any interactive prompts. All required values must be provided as flags:
getbot setup --yes \
--host-ip 1.2.3.4 \
--ssh-key ~/.ssh/deploy_key \
--provider anthropic \
--api-key sk-ant-api03-... \
--email alice@acme.com \
--team marketing Required flags in --yes mode:
--host-ip— server IP address--provider— LLM provider (anthropic,openai, orgoogle)--api-key— your LLM API key--email— bot operator email--team— team name for this bot
Optional flags:
--ssh-key— path to SSH private key (default:~/.ssh/getbot)--ssh-user— SSH username (default:root)--org— override organization (useful with personal email domains)
If any required flag is missing, getbot exits with a clear error listing exactly which flags are needed.
Non-TTY detection
If getbot detects that stdin is not a terminal (e.g., in a CI pipeline) and --yes is not provided, it exits with an actionable error:
Error: non-interactive environment detected.
Use: getbot setup --yes --host-ip IP --provider PROVIDER --api-key KEY --email EMAIL --team TEAM This prevents CI jobs from hanging on interactive prompts.
GitHub Actions example
A basic workflow that deploys a bot on push to main:
name: Deploy Bot
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install getbot
run: curl -fsSL https://getbot.run/install.sh | bash
- name: Write SSH key
run: |
echo "$SSH_PRIVATE_KEY" > /tmp/deploy_key
chmod 600 /tmp/deploy_key
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
- name: Deploy
run: |
getbot setup --yes \
--host-ip ${{ secrets.SERVER_IP }} \
--ssh-key /tmp/deploy_key \
--provider anthropic \
--api-key ${{ secrets.ANTHROPIC_API_KEY }} \
--email ${{ secrets.BOT_EMAIL }} \
--team production
Idempotent deploys
Running getbot setup --yes multiple times with the same parameters is safe. getbot handles this gracefully:
- Host registration — reuses the existing host record if one matches the IP
- Incus — skips initialization if already configured
- Container — reuses the existing org container
- Bot — updates the existing bot's configuration
This makes it safe to run in CI on every deploy without special "first-time vs. update" logic.
Exit codes
getbot uses standard exit codes for CI integration:
0— success1— error (missing flags, SSH failure, deploy failure, etc.)
Error messages are written to stderr, so you can capture them separately in CI logs.
Other non-interactive commands
Most getbot commands work non-interactively by default:
# List all bots (JSON for parsing)
getbot bots list --output json
# Describe a specific bot
getbot bots describe BOT_ID --output json
# Upgrade all bots in an org
getbot bots upgrade --org acme
# Uninstall a specific bot
getbot bots uninstall --email alice@acme.com --team marketing See Managing Bots for the full list of management commands.