Documentation

40 CLI commands and 41 JSON-RPC methods. Control every aspect of thane — workspaces, terminals, browser panels, sandboxing, and more — from the command line or any language.

Connection

Socket Path
$XDG_RUNTIME_DIR/thane/thane.sock
Protocol

JSON-RPC 2.0 over newline-delimited JSON on a Unix domain socket.

Environment Variables (set in spawned shells)

THANE_WORKSPACE_ID — Current workspace UUID

THANE_SURFACE_ID — Current pane UUID

THANE_SOCKET_PATH — Path to the socket

Example
# Request
{"jsonrpc":"2.0","method":"workspace.create","params":{"title":"My Project"},"id":1}

# Response
{"jsonrpc":"2.0","result":"550e8400-e29b-41d4-a716-446655440000","id":1}

CLI Reference

thane-cli is automatically installed when you launch thane. Use it from any terminal to control your workspaces, queue agent tasks, and more.

Installation

thane automatically symlinks thane-cli into ~/.local/bin/ on first launch. Ensure ~/.local/bin is on your PATH.

Global Options
--socket <PATH>    Socket path (default: auto-detected)
                     env: THANE_SOCKET_PATH

System

ping

Check if thane is running.

thane-cli ping
system version

Show version information.

thane-cli system version
system config

Show current configuration.

thane-cli system config

Workspace

workspace list

List all workspaces.

thane-cli workspace list
workspace create

Create a new workspace.

thane-cli workspace create [--title <TITLE>] [--cwd <CWD>]
workspace select

Switch to a workspace by index.

thane-cli workspace select <INDEX>
workspace close

Close a workspace (active if omitted).

thane-cli workspace close [--id <ID>]
workspace rename

Rename a workspace.

thane-cli workspace rename <TITLE> [--id <ID>]
workspace info

Get detailed workspace info.

thane-cli workspace info [--id <ID>]

Surface / Pane

surface split-right

Split the focused pane vertically.

thane-cli surface split-right
surface split-down

Split the focused pane horizontally.

thane-cli surface split-down
surface close

Close the focused pane.

thane-cli surface close
surface focus-next

Focus the next pane.

thane-cli surface focus-next
surface focus-prev

Focus the previous pane.

thane-cli surface focus-prev
surface focus

Focus a pane by direction.

thane-cli surface focus <up|down|left|right>
surface zoom-toggle

Toggle pane zoom.

thane-cli surface zoom-toggle

Browser

browser open

Open a URL in a new browser panel.

thane-cli browser open <URL> [--workspace-id <ID>]
browser navigate

Navigate an existing browser panel.

thane-cli browser navigate <PANEL_ID> <URL>
browser eval-js

Execute JavaScript in a browser panel.

thane-cli browser eval-js <PANEL_ID> <SCRIPT>
browser click

Click an element by CSS selector.

thane-cli browser click <PANEL_ID> <SELECTOR>
browser type-text

Type text into an element.

thane-cli browser type-text <PANEL_ID> <SELECTOR> <TEXT>
browser screenshot

Capture a screenshot of a browser panel.

thane-cli browser screenshot [--panel-id <ID>] [--full-page]

Agent Queue

queue submit

Submit a task for headless execution. Use "-" to read from stdin.

thane-cli queue submit <FILE> [--priority <N>]
queue list

List all tasks in the queue.

thane-cli queue list
queue status

Get the status of a specific task.

thane-cli queue status <ID>
queue cancel

Cancel a queued or running task.

thane-cli queue cancel <ID>

Sandbox

sandbox status

Get sandbox status for a workspace.

thane-cli sandbox status [--id <ID>]
sandbox enable

Enable sandbox for a workspace.

thane-cli sandbox enable [--id <ID>]
sandbox disable

Disable sandbox for a workspace.

thane-cli sandbox disable [--id <ID>]
sandbox allow

Add a path to the allowlist.

thane-cli sandbox allow <PATH> [--read-only] [--id <ID>]
sandbox deny

Add a path to the denylist.

thane-cli sandbox deny <PATH> [--id <ID>]

Notifications

notification list

List notifications.

thane-cli notification list [--limit <N>]
notification send

Send a notification to a workspace.

thane-cli notification send <TITLE> <BODY> [--workspace-id <ID>]
notification mark-read

Mark all notifications as read.

thane-cli notification mark-read
notification clear

Clear all notifications.

thane-cli notification clear

Audit

audit list

List recent audit events.

thane-cli audit list [--severity <LEVEL>] [--limit <N>]
audit export

Export all audit events as JSON.

thane-cli audit export [--output <PATH>]
audit clear

Clear all audit events.

thane-cli audit clear
audit set-policy

Set the sensitive operation policy.

thane-cli audit set-policy <allow|warn|block> [--id <ID>]

Terminal

terminal screenshot

Capture a screenshot of a terminal panel.

thane-cli terminal screenshot [--panel-id <ID>] [--output <PATH>]

JSON-RPC API Reference

For programmatic access from any language. 41 methods over JSON-RPC 2.0 on a Unix domain socket.

System

Health checks, versioning, and configuration.

Workspace

Create, switch, rename, and close workspaces.

Surface / Pane

Split, close, and navigate terminal panes.

Browser

Control the embedded browser panels.

Notifications

Send and manage per-workspace notifications.

Sidebar

Set status entries and read metadata from the sidebar.

Sandbox

Configure per-workspace Landlock sandboxing.

Agent Queue

Submit, monitor, and cancel headless agent tasks.

Audit

Security audit log and sensitive operation policies.