Skip to content

CLI Commands

OSTwin provides the ostwin CLI plus a set of shell scripts in .agents/ for lifecycle management.

ostwin CLI

The main binary lives at .agents/bin/ostwin and delegates to Python subcommands.

ostwin run

Start a plan execution. This is the primary entry point.

Terminal window
ostwin run PLAN.md
ostwin run PLAN.md --max-rooms 4
ostwin run PLAN.md --dry-run
FlagDefaultDescription
--max-rooms50Max concurrent war-rooms
--dry-runfalseParse plan, build DAG, but do not execute
--modelconfig defaultOverride default model for all roles
--timeout2400Global timeout in seconds

ostwin status

Show the current state of all war-rooms.

Terminal window
ostwin status
ostwin status --room room-003
ostwin status --json

Reads status, state_changed_at, and retries from each room directory.

ostwin chat

Interactive chat session with a specified role.

Terminal window
ostwin chat --role engineer
ostwin chat --role architect --model claude-opus-4-6

ostwin skills

Manage skill discovery and installation.

Terminal window
ostwin skills list
ostwin skills search "web-research"
ostwin skills install <skill-name>

Utility Shell Scripts

These scripts live under .agents/ and handle system-level operations.

run.sh

The primary orchestration entry point. Invoked by ostwin run.

Terminal window
.agents/run.sh PLAN.md

Execution chain:

  1. Sources .agents/config.sh for environment
  2. Validates the plan file exists
  3. Calls the PowerShell manager loop (Start-ManagerLoop.ps1)
  4. Monitors child processes

install.sh

First-time setup. Creates directory structure, installs dependencies, and configures the environment.

Terminal window
.agents/install.sh

Actions performed:

  • Creates .agents/war-rooms/, roles/, skills/, logs/, memory/
  • Installs Python dependencies for MCP and dashboard
  • Validates PowerShell 7+ is available
  • Downloads community roles if auto_discover is enabled

init.sh

Initializes a new project for OSTwin. Lighter than install.sh — sets up config files without installing dependencies.

Terminal window
.agents/init.sh

health.sh

Runs health checks against all running components.

Terminal window
.agents/health.sh

Checks:

  • PowerShell engine process
  • Dashboard API (FastAPI on port 8000)
  • Dashboard frontend (Next.js on port 3000)
  • Memory daemon (MCP server)
  • Active war-room states

dashboard.sh

Start or stop the dashboard stack.

Terminal window
.agents/dashboard.sh start
.agents/dashboard.sh stop

Manages both the FastAPI backend and Next.js frontend. Writes PID to .agents/dashboard.pid.

logs.sh

Tail or search log files.

Terminal window
.agents/logs.sh tail
.agents/logs.sh tail --room room-003
.agents/logs.sh search "error"

sync-skills.sh

Synchronize skills from ClawhHub or a Git repository.

Terminal window
.agents/sync-skills.sh
.agents/sync-skills.sh --source github

uninstall.sh

Remove OSTwin from the project. Cleans up .agents/ artifacts but preserves config.json by default.

Terminal window
.agents/uninstall.sh
.agents/uninstall.sh --purge # removes config.json too

Memory Scripts

Located under .agents/memory/:

ScriptPurpose
start-memory-daemon.shLaunch the MCP memory server
switch-memory-transport.shToggle between stdio and SSE transport

Daemon Scripts

Located under .agents/daemons/macos-host/:

ScriptPurpose
install.shRegister launchd daemon
uninstall.shRemove launchd daemon
host-daemon.shMain daemon process
mcp-server.shMCP server wrapper