Sero CLI

sero-cli is Sero's workspace/session command surface. Agents call it as a tool, and operators can use the same syntax in Sero-aware terminal contexts.

Scope and syntax

  • A leading sero token is optional for command resolution, but examples use it for clarity.
  • Commands run in the current workspace and, when invoked during an agent turn, the current session/turn.
  • Invocation sources are tool, bash, and terminal.
  • Session-owned plugin/extension commands only appear for the active scoped session.
  • Blacklisted command roots are not registerable: auth, safeStorage, net, layout, agent, github.
sero help workspace
sero workspace info
sero session info

Batch behavior

sero-cli accepts multiple commands, one per line. Execution stops on the first non-zero exit code or timeout.

sero workspace info
sero vcs status
sero terminal read 50

Non-terminal invocations truncate output at 50KB / 2000 lines. Multi-command batches omit rich image output; rerun screenshot commands alone to receive images. Interactive commands disable normal per-command timeout behavior.

Built-in namespaces

NamespaceSource filePurpose
appcommands/apps/app-control*.tsSwitch apps, screenshot, interact with UI, record, preview dev servers.
appstatecommands/apps/app-state.tsRead/write app state JSON.
artifactscommands/apps/artifacts.tsManage verification artifacts.
browsercommands/browser/browser.tsDrive the visible in-app browser tabs.
devservercommands/container/devserver.tsRegister/list/stop workspace dev servers.
editorcommands/editor/editor.tsRead/list workspace files.
sessioncommands/agent/session.tsShow current agent session state.
set-titlecommands/agent/session.tsRename the current session.
terminalcommands/container/terminal.tsRead recent terminal output.
vcscommands/vcs/vcs.tsStatus, log, diff, checkpoints, remotes, push/fetch.
workspacecommands/workspace/workspace.tsList/create/open/close workspaces and attach plugin folders.

workspace

CommandOutput / side effects
sero workspace listLists known workspaces, path, runtime, and current marker.
sero workspace info [id]Shows path, runtime, description, hints, tags.
sero workspace create <name> [--parent <path>]Creates and registers a workspace; reconciles app runtimes; broadcasts workspace change.
sero workspace add-folder <path> [--name <display-name>]Registers an existing folder; path resolves from current cwd; reconciles app runtimes.
sero workspace open <id>Expands/opens a workspace in Sero.
sero workspace close <id>Closes workspace; re-add with add-folder; cannot close global.
sero workspace mount-plugin <path> [--name <display-name>] [--yes]Attaches a Sero plugin source folder as an Explorer root only; recreates running container.

devserver

See Containers and Dev Servers.

CommandOutput / side effects
sero devserver listLists registered servers for current workspace as id [status] name — url (port n).
sero devserver register --name <name> --port <port> --command <cmd> [--framework <name>]Adds an in-memory registry entry and returns a host-reachable URL.
sero devserver stop <id>Stops the listener in a container runtime. On Host, it terminates a server started by Sero, but it does not kill a process that was only registered.

app

See Browser and Capture. app commands are UI-backed and depend on the renderer app panel being visible.

CommandOutput / side effects
sero app listLists app ids, names, scope, and [no UI] when applicable.
sero app open <appId|name>Switches active Sero app.
sero app activePrints active app id.
sero app info <appId|name>JSON app metadata.
sero app screenshot [--app <id|name>] [--save <path>]Returns PNG image block; optional file save relative to cwd.
sero app screenshot --selector <sel> --fullCaptures a full long scroll container.
sero app screenshot-around --text "text" [--within <sel>] [--save <path>]Scrolls to text, confirms the target, then captures the app.
sero app click <selector>--ref <ref>--x <n> --y <n>Clicks and returns a post-action screenshot.
sero app type "<text>"[--selector <sel>|--ref <ref>]Types into focused/selected input and returns screenshot.
sero app scroll --y <px> [--x <px>][--selector <sel>|--ref <ref>][--at-x <n> --at-y <n>]Scrolls the selected or nearest scroll container and reports the actual target.
sero app scroll-to --selector <sel>--text "text"|--ref <ref>[--within <sel>|--container "text"]Scrolls a target element/text into view and reports visibility/rect.
sero app select <selector|--ref ref>Focuses/selects element, returns screenshot.
sero app hover <selector|--ref ref>Hovers element, returns screenshot.
sero app inspect [<selector>][--x <n> --y <n>|--ref <ref>][--visible-only] [--interactive-only] [--limit <n>]Returns JSON inspection data with temporary refs; no post-action screenshot.
sero app visible --text "text"|--selector <sel>|--ref <ref>Checks whether an element/text is visible.
sero app snapshotReturns visible headings, sections, buttons, links, and inputs as JSON.
sero app scroll-containersLists scrollable containers with refs, dimensions, scrollTop, and max scroll.
sero app get-text [--app <id|name>] [<selector>|--selector <sel>] [--visible-only] [--around "text"]Returns text content, optionally limited to visible or nearby text.
sero app record startStarts 2 FPS capture.
sero app record statusShows recording state/duration.
sero app record stop [--save <path>]Saves MP4 or PNG frame folder. Default: <workspace>/sero-recordings/.
sero app preview <url>Opens a dev-server URL in Explorer's editor preview so app screenshot/record can capture it.

browser

See Browser and Capture. browser controls the visible in-app browser tabs, not arbitrary hidden browser automation.

CommandOutput / side effects
sero browser list [--all]Lists loaded tabs for current workspace or all workspaces.
sero browser open <url>Opens an HTTP(S) tab in the current workspace.
sero browser close <tab-id>Closes a tab owned by the current workspace.
sero browser navigate <tab-id> <url>Navigates a current-workspace tab to HTTP(S) URL.
sero browser get-text [--tab <id>]Returns title, URL, and plain page text; defaults to active tab.
sero browser screenshot [--tab <id>]Returns PNG image block; defaults to active tab.

Tabs are workspace-owned and loaded lazily through the browser panel. Explicit tab ids cannot cross workspace boundaries.

editor

CommandOutput / side effects
sero editor read <path>Reads a file from the container when available, otherwise host workspace.
sero editor list [dir]Lists directory entries, default /workspace.

terminal

CommandOutput / side effects
sero terminal read [lines]Returns recent workspace terminal output. Default 100; maximum 500 with truncation notice.

vcs

CommandOutput / side effects
sero vcs statusShows changed files and conflicts, or clean state.
sero vcs log [--limit N]Recent change ids/descriptions/bookmarks; default 10.
sero vcs diff <from> [to]Diff text between revisions.
sero vcs checkpoint [message]sero vcs checkpoint --message <msg>Creates a manual checkpoint when files changed.
sero vcs push [branch]Pushes to remote.
sero vcs fetch [remote]Fetches remote changes.
sero vcs remote [list]Lists remotes.
sero vcs remote add <name> <url>Adds remote.
sero vcs remote remove <name>Removes remote.
sero vcs bookmarksLists bookmarks.

session andset-title

CommandOutput / side effects
sero session infoWorkspace, session id/name, model/provider, thinking level, tokens, cost, request count, streaming state, active turn.
sero set-title [--if-unnamed] <text>Sets a session title of up to 48 characters. --if-unnamed keeps an existing title.

appstate

CommandOutput / side effects
sero appstate read <path>Reads app state JSON and prints formatted JSON.
sero appstate write <path> --json <json>Parses JSON and writes app state.

appstate is JSON state only; it is not UI automation.

artifacts

CommandOutput / side effects
sero artifacts list [--session <id>]Lists artifacts with id, type, title, timestamp, optional container path.
sero artifacts save --title <t> --type <screenshot|log|video> [--path <p>]Adds registry entry for current session/workspace.
sero artifacts remove <id>Removes artifact registry entry.
sero artifacts summary [--session <id>]Builds PR-style artifact summary.

Plugin-bridged commands

Sero bridges selected extension tools and commands into sero-cli so agents use one command surface.

  • Core tools such as todo, memory, question, cron, git_manager, and others are allowlisted.
  • Plugin packages can opt into bridging with sero.plugin.bridgeTools metadata.
  • research is explicitly not bridged.
  • Admin tooling is intentionally not agent-accessible through this bridge.
  • Session-owned bridged commands are visible only for the matching active session scope.
  • For JSON-heavy bridged commands, run sero help <command> first and follow the reported schema.