CLI and daemon prototype for a background task runner using JSON IPC.
bun installStart the CLI, ensure the daemon is running, and open the TUI:
bun run devRun the daemon directly:
bun run dev:daemonBuild TypeScript to dist/:
bun run buildRun the CLI with Node:
node dist/cli/index.js
node dist/cli/index.js ping
node dist/cli/index.js run demo-task --duration 1500
node dist/cli/index.js status
node dist/cli/index.js stop
node dist/cli/index.js session listRun the daemon directly (optional):
node dist/daemon/index.jscli-agent
cli-agent ping
cli-agent run <name> [--duration <ms>] [--session <name>]
cli-agent chat <text> [--model <id>] [--session <name>]
cli-agent status [taskId] [--session <name>]
cli-agent stop [taskId] [--session <name>]
cli-agent session list
cli-agent --json <command>Start the OpenTUI interface via the CLI (daemon auto-starts if needed):
bun run devOr from Node after building:
node dist/cli/index.jsThe TUI subscribes to daemon events and updates in real time (task state changes and new sessions).
Set your API key in the environment:
export OPENAI_API_KEY="..."CLI chat:
cli-agent chat "hello"
cli-agent chat "summarize this" --model gpt-4o-miniTUI chat:
chat hello
chat write a haiku --model gpt-4o-mini
- The runtime target is Node.js; no Bun-specific APIs are used.
- The CLI starts the daemon automatically if it is not running.
- Use
CLI_AGENT_DAEMON_CMDto override how the daemon is started in development. - Use
CLI_AGENT_TUI_CMDto override how the TUI process is launched.