Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Using slopctl

slopctl is the command-line tool for delegating tasks, reading logs, and inspecting the daemon.

Identity

SLOPWORLD_SESSION identifies the caller. When unset, slopctl acts as host (the user at the keyboard), which the daemon accepts only from the root token. An agent in a sandbox sets this variable to its session name.

Connection

The environment reference covers connection overrides and their precedence.

Use slopctl --endpoint NAME to select a saved peer. Manage saved client connections with slopworld connect NAME URL and list them with slopworld endpoints. See Saves and profiles for connection setup.

For one command, use slopctl --endpoint tank status. The default --endpoint local can be omitted. --sidecar uses the catalog under <CONFIG>/sidecar/. slopctl peers continues to list live daemon sessions.

Use scoped credentials for agents; see Agent collaboration for permissions and Paths and files for endpoint locations.

Resolved paths

slopctl paths config|data|cache|endpoint|profile|game-log prints a resolved local path without contacting the daemon or creating directories. Add --sidecar for sidecar defaults. With --json, the result is a JSON string.

Configuration

Read or change a setting on the selected running daemon with the root token:

slopctl config get daemon.bind
slopctl config set daemon.bind 192.168.1.10:7717
systemctl --user restart slopd.service

get KEY prints a string as plain text and other values as JSON; --json always prints JSON. Token reads remain redacted. set KEY VALUE preserves other settings and accepts individual values under daemon, defaults, and commands. Strings take literal text; booleans and numbers take JSON, for example slopctl config set daemon.usage_items.claude.poll true. Paths use dots; escape dots in map keys as ~1 and tildes as ~0. Use -- before a literal value that looks like an option.

Changing daemon.bind requires a daemon restart. Changing daemon.token takes effect immediately and invalidates the old token; reconnect saved remote peers with slopworld connect NAME URL and enter the new token. The daemon updates its local endpoint credentials automatically. With --json, set reports saved, restart_required, and token_changed without printing the value.

Task commands

Use task commands to send work, find tasks, update status, and remove tasks. See Agent collaboration for permissions. Keep the returned task ID:

slopctl task delegate AGENT "task description"
slopctl task wait ID

Recipients use this sequence:

  1. Read the task with slopctl task show ID.
  2. Accept it with slopctl task accept --id ID.
  3. Report progress with slopctl task progress --id ID "note".
  4. Report the result with slopctl task finish --id ID "result" or slopctl task fail --id ID "reason".

Task statuses are queued, accepted, working, done, failed, or canceled. A task is terminal when its status is done, failed, or canceled.

Use slopctl task list to find work. Use slopctl task followup --id ID "message" to send a follow-up to a running interactive worker. The parent must have follow-up permission. The request and submission outcome appear in task history without changing its status. It does not start stopped workers or deliver to shells. Use slopctl task cancel ID to cancel a task. Parents with task cancellation permission can cancel their unfinished worker tasks, including working tasks; ordinary recipients can cancel queued or accepted tasks. Cancellation does not stop the worker process. Use slopctl task remove ID to remove a terminal task. Use slopctl task prune to remove multiple terminal tasks. If a disk operation fails, completed removals remain committed. The result reports committed, failed, and unattempted task IDs; the command exits unsuccessfully. Retry to remove the remaining terminal tasks. slopctl task prune --include-active requires the root token. It also removes unfinished tasks. CLI help lists the current filters and options.

For accept, progress, finish, fail, and followup, select the task with --id ID or let SLOPWORLD_TASK_ID supply it. Positional words always become the note. For example, slopctl task progress Reviewing the code updates the injected task, while slopctl task progress --id other-task Reviewing the code updates other-task. Without either source of task identity, the update fails. Read, wait, cancel, and remove commands take a positional ID, which may be omitted when SLOPWORLD_TASK_ID is set.

Put options before task text or notes. Once text starts, all following words are literal, including --json, --endpoint, --sidecar, and --help. Insert -- before text whose first word looks like an option:

slopctl --json task delegate AGENT "Investigate --sidecar behavior"
slopctl task progress --id ID -- --help is now working

slopctl task list shows unfinished tasks that you sent or received, newest first. wait blocks until done, failed, or canceled, then prints the final task. Stdout (including --json) contains only the final task result.

Workers and templates

The following are abbreviated examples; CLI help lists all options.

All --project options default to SLOPWORLD_PROJECT when it is nonempty. An explicit --project overrides that default.

slopctl worker spawn [--one-shot] --project PROJECT --template TEMPLATE "task description" creates the task and child session in one daemon operation. The worker uses the selected template.

The host user can select any template in the catalog. Scoped agents can select only templates that the daemon allows for worker creation.

slopctl template list [--project PROJECT] shows the templates available to the caller. slopctl template show NAME [--project PROJECT] prints one template that the caller can use.

Agent, worker, and worktree value options accept --option=VALUE for values beginning with a dash. A separate value must not be another option.

Insert -- before task text that has an option as its first item. Use --name NAME before the task text to choose an exact worker name. Names must be unused and contain no whitespace, colon, or period. If omitted, host-owned workers use <project>-worker; agent-owned workers use <caller>-worker. Generated project prefixes are normalized for session names, and collisions receive -2, -3, and so on. Names stay fixed after creation; project membership and parent relationships are independent of the name.

For example, slopctl worker spawn --project repo --template review -- --help sends the literal task --help.

To give a worker a separate checkout, create it first and pass the returned ID:

slopctl worktree create --project repo --name review --base HEAD
slopctl worker spawn --project repo --template review --worktree ID "Review the changes"

worktree create owns checkout creation options. worker spawn --worktree ID selects an existing checkout; omitting it uses the project’s main checkout.

The worker receives its exact task ID in SLOPWORLD_TASK_ID, and slopctl uses it when a lifecycle command omits ID. Workers are persistent by default. The daemon removes --one-shot worker sessions on exit. Persistent workers remain as stopped sessions that you can inspect.

A worker exit, stop, removal, or startup failure marks its unfinished task as failed. To retry, create a new task or manually launch the persistent worker.

Create a normal agent with slopctl agent create NAME --project PROJECT --template TEMPLATE. This command uses the same template catalog. It creates the agent but does not start it unless you add --start.

See Project worktrees for independent checkouts, worker worktrees, and manual removal.

Diagnostics

Use slopctl sandbox inspect NAME to view the saved sanitized launch plan and, when available, the live process tree. The saved plan remains available after process exit or daemon restart; it records intended settings, not successful startup. Host shells have no sandbox plan. Live comparison is best-effort and may be unavailable.

slopctl status                                      # caller, endpoint, reachability/version, pending tasks
slopctl peers                                       # sessions visible to this caller

Logs

slopctl logs shows the last 200 lines from the game and daemon. Select game or daemon to limit the source. Use --lines N to set the line count. Use --follow to show new output.

For game logs, slopctl reads Player.log. Set SLOPWORLD_GAME_LOG to use another file. For daemon logs, it reads the slopd.service user journal. Set SLOPWORLD_DAEMON_UNIT to use another unit. With --sidecar, daemon logs come from docker logs for SLOPCAR_CONTAINER (default slopcar), and game logs default to <CACHE>/sidecar/Player.log.

Machine-readable output

Use --json for a JSON result document, such as a task list or status object. Ordinary results are pretty-printed and may span several lines; log output emits one compact JSON object per log line. The result shape varies by command. Help and shell completion scripts remain text.

Shell completions

slopctl, slopworld, and slopcar print shell completion scripts without contacting the daemon, loading a game profile, or discovering Docker:

slopctl completions bash
slopworld completions zsh
slopcar completions fish

SlopWorld distribution packages install Bash, Zsh, and Fish completions for slopctl and slopworld under /usr/share. Source installation with just daemon-install or just sidecar-install installs the corresponding scripts under ${XDG_DATA_HOME:-$HOME/.local/share}. Bash needs bash-completion enabled. For Zsh source installs, put the directory on fpath before compinit in .zshrc:

fpath=("${XDG_DATA_HOME:-$HOME/.local/share}/zsh/site-functions" $fpath)
autoload -Uz compinit
compinit

For a single Bash session, run source <(slopctl completions bash). Completions include command names, flags, enum values, and file/directory hints; they do not query live tasks, templates, or endpoint names. Use -h for concise help and --help for detailed help.