BOTCTL(1)

NAME

botctlManage persistent AI bots with a terminal dashboard, web UI, and declarative configuration.

SYNOPSIS

$go install github.com/montanaflynn/botctl@latest

INFO

86 stars
6 forks
0 views

DESCRIPTION

Manage persistent AI bots with a terminal dashboard, web UI, and declarative configuration.

README

botctl

Process manager for autonomous AI agent bots. Run persistent agents from a single CLI with a terminal dashboard, web UI, and declarative configuration.

Website · Docs · Releases

botctl TUI dashboard

Install

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

Or with Go:

go install github.com/montanaflynn/botctl@latest

Pre-built binaries for macOS, Linux, and Windows are on the releases page.

Quick Start

# Create a bot (interactive)
botctl create my-bot

Start the TUI dashboard

botctl

Or start a specific bot in the background

botctl start my-bot --detach

Send a message to a running bot

botctl start my-bot --message "check the error logs"

Run once and exit

botctl start my-bot --once

View logs

botctl logs my-bot -f

Pause a running bot (preserves session)

botctl pause my-bot

Resume a paused bot

botctl play my-bot --turns 20

Stop (kills process, loses session)

botctl stop my-bot

CLI Commands

CommandDescription
botctlOpen the TUI dashboard (--web-ui for web dashboard, --port to set port)
botctl create [name]Create a new bot via Claude (-d description, -i interval, -m max turns)
botctl start [name]Start a bot (-d detach, -m message, --once single run)
botctl stop [name]Stop a bot (no args = stop all)
botctl pause [name]Pause a running/sleeping bot (preserves session)
botctl play [name]Resume a paused bot (-t turns)
botctl listList bots with status
botctl statusDetailed status of all bots
botctl logs [name]View logs (-n lines, -f follow)
botctl delete <name>Delete a bot and its data (-y skip confirmation)
botctl skills listList discovered skills (--bot to filter by bot)
botctl skills search <query>Search skills.sh for community skills (-n limit)
botctl skills add <owner/repo>Install skills from a GitHub repo (--skill, --bot, --global)
botctl skills view <name>View a skill's SKILL.md and list its files
botctl skills remove <name>Remove an installed skill
botctl updateSelf-update to the latest release

TUI Keybindings

KeyAction
sStart/stop selected bot
pPause/play (pause if running/sleeping, play if paused)
m / enterSend message to bot
nCreate new bot
cClear bot context (restart)
dDelete bot (with confirmation)
oOpen bot directory
f / tabFocus filter bar
j / kNavigate bot list
qQuit

BOT.md Configuration

Each bot is defined by a BOT.md file with YAML frontmatter and a markdown body:

---
name: my-bot
id: my-bot-001
interval_seconds: 300
max_turns: 20
workspace: local
skills_dir: ./skills
log_retention: 30
---

You are an autonomous agent that...

Frontmatter Fields

FieldTypeDefaultDescription
namestringrequiredDisplay name
idstringfolder nameStable database key (survives folder renames)
interval_secondsint60Seconds between runs
max_turnsint0 (unlimited)Turn limit per run
workspacestringlocallocal (per-bot) or shared (~/.botctl/workspace/)
skills_dirstringRelative path to skill directories
log_retentionint30Number of run logs to keep
envmapEnvironment variables (supports ${VAR} references)

The markdown body becomes the bot's system prompt. Claude sees it every run.

How It Works

Bots have four states: running (executing Claude API call), sleeping (waiting between runs), paused (waiting for play/message), and stopped (no process).

┌─────────────────────────────────────────┐
│              Harness Loop               │
│                                         │
│  1. Reload BOT.md config    → running   │
│  2. Check message queue                 │
│  3. Run Claude task (up to max_turns)   │
│  4. Record stats (cost, turns, session) │
│  5. Write log file                      │
│  6. If max_turns hit       → paused     │
│  7. Sleep for interval_seconds          │
│     (woken early by messages/play)      │
│                              → sleeping │
│  8. Repeat                              │
│                                         │
└─────────────────────────────────────────┘

Config changes (including max_turns) take effect on the next run without restarting.

Pause / Play

  • Pause interrupts a running bot or transitions a sleeping bot to paused. The session context is preserved.
  • Play resumes a paused bot with an editable turn count. Use Start to run a stopped bot.
  • Stop kills the process and loses the session. Use pause to preserve context.
  • When a run hits max_turns, the bot automatically enters paused state. Press p in the TUI to play.

Skills

Skills are directories containing a SKILL.md file with YAML frontmatter (name and description) and a markdown body. The harness parses frontmatter from all discovered skills and lists them by name and description in the system prompt. Claude loads full skill content on-demand via the Skill tool.

Skills are discovered from three locations (first occurrence of a name wins):

  1. ~/.agents/skills/ — cross-agent shared skills
  2. ~/.botctl/skills/ — botctl-wide shared skills
  3. Bot's skills_dir — per-bot skills
my-bot/
  BOT.md
  skills/
    api-access/
      SKILL.md
    safety-rules/
      SKILL.md
  workspace/

File Layout

~/.botctl/
  botctl.db              # SQLite database
  workspace/             # Shared workspace
  bots/
    my-bot/
      BOT.md             # Bot config + prompt
      skills/            # Skill directories (optional)
        my-skill/
          SKILL.md
      workspace/         # Local workspace
      logs/              # Per-run log files

Web Dashboard

botctl --web-ui              # default port 4444
botctl --web-ui --port 8080  # custom port

Updates

botctl update

Checks for new releases and replaces the binary in-place.

License

MIT

SEE ALSO

clihub4/10/2026BOTCTL(1)