Skip to content
Go To Dashboard

Agent Studio CLI, files, and shortcuts

Terminal window
npx @sapiom/agent-studio@latest [dir] [options]

The command-line host requires Node.js 20 or newer and Claude Code available as claude on PATH. It prints the Node, Claude Code, and Git doctor results before startup. Git is reported but is not a launch gate.

Argument or optionDefaultExact behavior
[dir]Current working directoryResolves one folder to an absolute launch directory. A second positional argument is rejected.
--port <n>4100Requests a numeric local-server port. A missing or nonnumeric value is rejected.
--loginOffWhen no cached Sapiom credential exists, completes browser sign-in before server startup. A cached credential is still reused; this does not force reauthentication.
--no-authOffSkips reading the credential cache and skips startup authentication network access for this launch. The local server still requires its boot token, and Connect account remains available after Studio opens.
--no-telemetryOffHard-disables both outbound telemetry tiers for this launch without changing the stored toggle values. The local event log is still written.
--state-root <dir>~/.sapiom/harnessRelocates every Harness-owned path in the table below to one explicit root. It does not relocate shared credentials, analytics identity, Claude history, browser storage, desktop host data, or project files.
--no-openOffKeeps the server running without invoking the operating-system browser opener. Open the complete tokenized URL printed in the terminal.
--no-sessionOffPrevents automatic session creation on a returning launch. A genuine first launch already opens the welcome screen without a session.
--devOffInternal diagnostic mode. Doctor, authentication, and consent still run; if server startup fails, the command reports that failure after verifying the pre-server flow instead of rethrowing it.

Unknown flags and extra positional arguments fail before Studio starts. Press Ctrl+C in the command-line host to close the server and its managed session processes; shutdown is bounded, so a second signal retains the operating system’s ordinary immediate-exit behavior.

Unless --state-root is supplied, all paths in this table are under ~/.sapiom/harness/.

PathOwner and lifetime
machine-idStable anonymous Studio install ID. Created on first use of this state root.
sessions.jsonStudio’s session registry: working directory, coding-agent conversation ID when known, status, title, timestamps, and bound agent-project path. A running PTY itself is not persisted.
workflows.jsonRegistry of agent projects Studio has discovered or connected. It points to projects; it does not contain their source.
settings.jsonDetailed-sharing choice, product-analytics choice, recent folders, project-root preference, first-run notice state, and background-summary choice.
events.ndjsonAppend-only normalized local session events. Always written; newest data is retained within both 30 days and 50 MB. Corrupt lines are kept by the age pass but can fall out under the size cap.
records/<session-id>.jsonCompact History records. Prompts and replies retain up to the collector’s 4,000-character field cap; tool input/result fields are clipped to 512 characters. The target is 64 KB per record, but one indivisible turn can exceed it; the hard store cap is 16 MB, with an age cap of 365 days. Oldest records leave first. Limitations are recorded in each reconstruction.
generated/<session-id>/Per-session Claude Code settings, MCP configuration, hook emitter, system-prompt material, and optional rolling summary.md. Removed when the managed process exits; abandoned plain directories are eligible for a boot-time sweep after seven days. Live directories and symlinks are not swept.
sample-project/Stable output location used only by the repository’s demo seed script. The running Studio neither creates nor reads it; an existing directory is leftover demo data.

Changing --state-root changes all eight paths together, including first-run detection and the consent notice’s printed local-event path. It does not create a privacy boundary around software outside Harness ownership; combine it with --no-telemetry for an outbound-silent disposable Studio run.

Studio writes these inside the directory where a session runs:

PathContract
.sapiom/harness-context.jsonStudio-owned current contract containing the session identity, bound agent, and all agent projects known to this Studio. It is refreshed on session creation, binding, and registry changes. Resume keeps a valid current file byte-for-byte, migrates the valid legacy shape, and reconstructs missing or invalid content before launching Claude.
.sapiom/canvas/renders/<agent-slug>.htmlStudio-owned deterministic render for one bound agent. Coding agents should not edit these files.
.sapiom/canvas/index.htmlSeeded unbound placeholder and optional custom-canvas fallback. Unlike renders/, an existing custom file is not overwritten by the deterministic pipeline.
.sapiom/canvas/_template.htmlPristine seeded Canvas document used as a local reference. Written only when missing.
.sapiom/uploads/Images attached, pasted, or dropped into the composer before their local paths are sent to Claude Code.

The scaffolded .sapiom-dev/stubs.json file is different: it is authored, reviewable local-test input that belongs to the agent project. Do not classify it as removable Studio cache. The same applies to sapiom.json, agent source, package files, and Git history.

LocationOwner
~/.sapiom/credentials.jsonCached Sapiom environments shared by Studio and the local authoring MCP. Standalone @sapiom/tools code does not read it automatically.
~/.sapiom/analytics.jsonAnalytics-core identity used by detailed telemetry clients. A normal Studio boot can migrate its machine ID into this shared identity once; an explicit --state-root boot does not seed the shared file.
~/.claude/projects/<encoded-directory>/*.jsonlClaude Code’s own conversation transcripts. Studio scans the real-path and original-path encodings for History and native Resume; it never edits the global Claude configuration.
Browser local storagesapiom-harness-theme, sapiom-harness-ui-prefs, sapiom-harness-pane-widths, and PostHog’s own identity/retry persistence for that origin.
Desktop operating-system app dataElectron host data plus the app-managed runtime-bin and npm-global directories. The exact parent is platform-specific.
Agent project directoriesYour source and project-local .sapiom/ / .sapiom-dev/ files. Studio never moves them under its global state root.

Use on macOS and Ctrl on Windows/Linux unless a row says otherwise.

ShortcutScopeResult
/Ctrl+K or /Ctrl+PAnywhere in StudioOpens Quick Jump.
, , Enter, EscapeQuick JumpMoves through results, opens the selected result, or closes the palette.
/Ctrl+19Anywhere in StudioSelects that numbered live tab for the currently focused agent/folder. Tabs are numbered oldest first; no action occurs when the position does not exist.
EscapeCanvasClears the selected Canvas node first. Press again to leave expanded Canvas when no node is selected.
/Ctrl+EnterA step’s free-form Ask coding agent fieldSends the current step question.
/ Focused Canvas overview resize handleIncreases or decreases the overview height by 24 pixels.
HomeFocused Canvas overview resize handleResets the overview to automatic content height.

Most dialogs and popovers also close with Escape; when opened from a focusable control, focus returns to that control.