Keyoku
Docs / Bot / Commands

CLI commands.

Every npx @keyoku/bot command and Docker operation for managing your bot. All CLI commands talk to the running Docker stack via the Keyoku API.

CLI

Bot CLI commands.

These commands are available after running npx @keyoku/bot init. They require the Docker stack to be running (except init itself).

npx @keyoku/bot init

Interactive setup wizard.

Scaffolds Docker Compose config, .env file, and personality templates. Optionally starts the stack immediately.

npx @keyoku/bot status

Shows bot health, memory statistics, watcher status, and current config summary.

Displays total memories, active count, entity count, next tick, interval, and configuration overview.

npx @keyoku/bot search <query> [entity_id]

Test memory recall against your bot&apos;s stored memories.

Returns ranked results with similarity scores and memory types. Parameters: <query> (string, required) — Search query. [entity_id] (string, optional) — Entity to search against, defaults to "default".

npx @keyoku/bot memories [entity_id]

List stored memories for an entity.

Displays ID, type, importance score, and content preview. Shows up to 20 results. Parameters: [entity_id] (string, optional) — Entity to list memories for, defaults to "default".

npx @keyoku/bot watcher

Show watcher (heartbeat) status.

Displays running state, adaptive mode, current interval, next tick time, watched entities, adaptive factors, and recent tick history.

Docker

Docker Compose commands.

The bot runs as a Docker Compose stack. These are the standard Docker commands you will use to manage the services.

docker compose up -d

Start all services (OpenClaw gateway + Keyoku engine) in detached mode.

First run pulls images automatically.

docker compose logs -f

Stream logs from all services.

Add a service name (e.g., docker compose logs -f openclaw) to filter. Ctrl+C to stop.

docker compose restart

Restart all services.

Use after editing .env or personality files. Equivalent to stop + start without removing containers.

docker compose down

Stop and remove all containers.

Data persists in mounted volumes. Add -v to also remove volumes (destructive).

Common workflows.

# Check if the bot is healthy
npx @keyoku/bot status

# Test what the bot remembers about a topic
npx @keyoku/bot search "project deadline"

# Search a specific entity's memories
npx @keyoku/bot search "what does the user like?" user_123

# List all stored memories (default entity)
npx @keyoku/bot memories

# Check heartbeat signal history
npx @keyoku/bot watcher

# View live logs after a restart
docker compose restart && docker compose logs -f

Need to customize?

Change your bot's personality, behavior rules, LLM model, or extraction provider.