Installation
Authentication
Connect a Coding Agent Account
To use Codex, Claude Code, or Muse Code inside Replicas workspaces, link the relevant OAuth account. Each command opens a browser to complete the provider OAuth flow and uploads the resulting credentials to Replicas. Cursor uses an API key configured in Organization → Coding Agents. Credentials attach to your personal account by default, which works in every organization you belong to:--org to share one set of credentials with every member instead:
replicas whoami instead prints that workspace’s ID and, when available, its organization ID.
Replica Management
Use a logged-in CLI session to manage workspaces interactively:replicas list prints the IDs used by the other commands. replicas create prompts for any
omitted name, environment, task, or coding agent; pass --environment, --message, and --agent
to provide them directly. Deletion asks for confirmation unless you pass --force.
Use the API or Automations instead of scripting these
interactive commands.
List connected repositories and their IDs with:
Environment Management
Manage Environments from the CLI. Usereplicas environment or the shorter replicas env alias.
List Environments
Get Environment Details
global.
Create an Environment
-d, --description <description>- Environment description-r, --repository <name|id>- Repository to bind to the environment--system-prompt <prompt>- System prompt for agents started in this environment
Edit an Environment
-n, --name <name>- New name-d, --description <description>- New description-r, --repository <name|id>- Repository binding; pass an empty string to unbind--system-prompt <prompt>- System prompt
Delete an Environment
-f, --force- Skip confirmation prompt
Manage Environment Variables
--reveal to show full values.
Manage Environment Files
Manage Warm Hooks
get shows the active hook, save activates it immediately, test runs it without saving, save-test saves only after a passing test, and repository-hooks lists hooks from bound repositories. Every command that accepts --file also accepts inline --content. See Warm Hooks for the execution model.
Manage Start Hooks
get- show the active start hooksave- persist and activate a new version, or clear the active hook with empty contenttest- run a hook in an isolated sandbox without saving (streams output live)repository-hooks- list per-repo start hooks defined in replicas.json / replicas.yaml
Slack Thread Routing
Slack thread commands attach the current Slack thread to a workspace so replies in that thread route to the selected workspace. Agent mode targets only the current workspace. A newer, non-archived workspace can replace an older archived destination in the same organization; subsequent replies route to the newer workspace.REPLICAS_SLACK_CHANNEL_ID and REPLICAS_SLACK_THREAD_TS. Pass --channel <id> and --thread-ts <ts> when attaching a different thread. Selecting a destination other than the current agent workspace, or replacing a non-archived destination, requires user authentication outside agent mode.
Preview Management
Preview commands register ports from a workspace as public URLs. Agent mode commands run inside a workspace and use the local agent configuration. Human mode commands run from your local terminal and target a workspace by ID.Create a Preview
-a, --authenticated- Require Replicas login cookies before the preview can be accessed. Use this for user-facing frontends, not backend APIs called by frontend code.
List Previews
Delete a Preview
Add a Preview
-p, --port <port>- Port number to preview-a, --authenticated- Require Replicas login cookies before the preview can be accessed. Use this for user-facing frontends, not backend APIs called by frontend code.
Remove a Preview
-p, --port <port>- Port number to unregister
Workspace Identity
Workspace identity (OIDC), including the AWS/GCP credential helpers, requires a Team or
Enterprise plan or an active trial.
aud exactly. Available in agent mode only.
Print a Token
replicas:workspace, or for the audience you pass.
Options:
-a, --audience <audience>- Audience (aud) the receiving service verifies, usually its URL--format <text|gcp>- Raw token (default), or JSON for Google’s executable credential source
AWS Credential Helper
credential_process. Credentials are cached and reused while more than 15
minutes remain. Requires the AWS CLI. See the
AWS and
Google Cloud sections for profile and
credential configuration.
Options:
--role-arn <arn>- Required IAM role that trusts the Replicas issuer-a, --audience <audience>- Audience configured on the IAM OIDC provider, defaultsts.amazonaws.com--region <region>- AWS region for the STS exchange--session-name <name>- Role session name, defaultreplicas--source-identity- Record the workspace ID as the AWS source identity in CloudTrail. Off by default; the role’s trust policy must allowsts:SetSourceIdentity
Run a Command With a Token
REPLICAS_WORKSPACE_TOKEN and REPLICAS_WORKSPACE_TOKEN_AUDIENCE set to a fresh token. Quote the script so the variable is expanded by the command, not by the shell that launched it.
Options:
-a, --audience <audience>- Audience (aud) the receiving service verifies
Service Management
Service commands run long-lived processes (dev servers, APIs, daemons) detached from the agent session. Detached services survive the agent’s turn ending and workspace sleep/wake, so a server started for a preview is still running after the workspace wakes. Available in agent mode only.Start a Service
-d, --cwd <dir>- Working directory for the service (defaults to the current directory)
List Services
Service Logs
~/.replicas/services/<name>.log).
Options:
-n, --lines <n>- Number of lines to print (default 50)
Stop a Service
Computer Use
Drives the workspace’s Linux desktop through thereplicas-computer daemon. The live H.264 and Opus stream is automatically published as an authenticated preview on port 6080 at engine startup, so the app’s Desktop tab is always available without any agent action. Available in agent mode only.
Multiple viewers can watch the same desktop concurrently. Input commands from separate agents are serialized as complete gestures so clicks, typing, scrolling, and drags do not interleave.
Get the Viewer URL
https://6080-<hash>.replicas.dev/). Use this when you want to share the stream out-of-band; the app already points at the same authenticated URL.
Session Status
Screenshot
replicas media upload.
Use --raw for a 1:1 desktop capture with no padding or branding. Use --grid for a 1:1 capture with a coordinate grid; the optional value sets grid spacing in pixels and defaults to 100. Prefer --grid when choosing coordinates for click, move, or drag.
Observe
observe waits up to 3s for 600ms of visual stability and saves a 100px coordinate-grid screenshot. Use it after clicks, navigation, typing, or page loads when an agent needs the next reliable screen state.
Browser State
[ref=42] button "Save". The tree includes roles, accessible names, values, states, visible bounds, and same-target iframe content.
The first capture returns the full tree. Later captures for the same target and document return accessibility changes by default; navigation or reload forces a new full tree and invalidates old refs. Use --full to reset the baseline. Prefer this over coordinate planning for Chrome.
Use replicas computer browser [--snapshot] to list Chrome tabs or request the compatibility snapshot format.
Browser Batch
click, fill, key, type, scroll, or wait actions through one Chrome session. The batch stops at the first failure and reports per-action and total execution time. Use refs from one browser-state; after navigation or a document change, capture fresh state before starting another batch.
Browser Click
browser-state. Text matching remains available as a fallback with browser-click <text>.
Browser Fill
browser-fill <field> <value>.
Browser Input
browser-fill when setting a known field value; use browser-key and browser-type for keyboard-driven widgets.
Browser Wait
--mode title|url|text|control|any to narrow where it matches. Prefer this after browser-click or browser-fill when waiting for web app state.
For browser state and actions, pass --target-id <id>, --title <text>, --url <text>, or --page <n> when multiple Chrome tabs are open. Prefer the stable target ID returned by computer launch chrome because titles and URLs can change after an action. The matched tab is brought to the foreground before each action, so driving multiple tabs or recording the screen switches which tab is visible.
Mouse Input
960 540) or percentages (50% 50%). Percentages resolve against the current display size.
Click options: --button <n> (1/2/3), --double, --modifiers <ctrl+shift>
Scroll options: --amount <n> (default 3), --x <x> --y <y> (hover before scrolling)
Keyboard Input
--delay <ms> (default 12, ~80 wpm)
Launch an App
replicas computer launch chrome http://localhost:3000/.
Chrome launches return after the requested page is controllable and print its page ID. Carry that ID with --target-id into browser snapshots and actions so unrelated tabs cannot steal task context.
Screen Recording
--fps <n> (default 60)
Recordings are post-processed from the desktop action log: clicks, typing, drags, and scrolls stay at normal speed, idle gaps are accelerated, click moments get eased camera zoom, and a synthetic cursor animates between logged mouse positions with natural settling before spaced-out clicks.
record start returns after ffmpeg writes the first bytes. record stop waits for ffmpeg to finalize before post-processing; a timeout preserves the recording state so stopping can be retried safely.
End-to-End Example
Canvas vs replicas media upload
Two related surfaces share the workspace VM:
- The Canvas at
~/.replicas/canvas/accepts files up to 25MB, including chat attachments. Inline previews and downloads are capped at 5MB. replicas media uploadis the right place for screenshots, screen recordings, generated videos, audio clips, and anything large enough that base64-inflating it through the engine on every app fetch would be wasteful. Images always get a public link that works in chat and on GitHub. Video and audio return a chat-only embed URL (or a public link with--access public). Every upload also prints an app deep-link, then a reminder to paste the embeds verbatim in the chat reply and to upload the file itself to Slack, Linear, or GitLab.replicas media upload <page.html> --name "<name>" --access organizationprints a stable Forge link for pull requests. It opens in a dedicated sandboxed viewer, requires Replicas sign-in and organization membership, and returns signed-out members to the page after authentication.- Include the printed HTML page link in an agent reply to render the page directly in chat, with Open and Download controls.
- Public links are unguessable, revocable bearer URLs: anyone with the URL can view the file. HTML pages only support organization access.
--shareis an alias for--access public. Rotate a link withreplicas media share <media-id>(this breaks the old link) and revoke it withreplicas media revoke <media-id>. - For inline images in GitHub PRs, copy the printed image embed into the PR body alongside its View in Replicas link. GitHub’s native attachments (
gh --attach) don’t accept Replicas’ GitHub App tokens, and chat-only URLs can’t render on GitHub. - Each upload shows a human-readable display name in the app.
--nameis required, one per file in order (e.g.replicas media upload a.png b.png --name "Before" --name "After"). Names are normalized to hyphen-case (my-screenshot), the backend still addresses media by UUID, and duplicate names get a-1,-2suffix.
replicas media upload for captured media, HTML previews in chat, or HTML pages shared outside the workspace.
Automation Management
Manage Automations directly from the CLI. All commands support both flag-based (scriptable) and interactive input modes. Use the aliasauto for brevity (e.g. replicas auto list).
List Automations
-p, --page <page>- Page number for pagination-l, --limit <limit>- Number of items per page--owner <org|user|all>- Show org automations, your personal automations, or both--trigger-type <type>- Only automations with a trigger of this type:cron,github,gitlab,slack,sentry,custom--enabled <true|false>- Only enabled or only disabled automations--background <true|false>- Only Background or only main-list automations--search <search>- Case-insensitive substring match on the name
Get Automation Details
Create an Automation
--prompt <prompt>- Prompt the agent will receive--environment <name|id>- Environment the automation runs in (see Environments)--trigger-cron <expression>- Cron schedule (e.g."0 9 * * 1-5")--trigger-cron-timezone <tz>- Timezone for cron trigger (default: UTC)--trigger-github <event>- GitHub event trigger (e.g.pull_request.opened)--trigger-github-repos <repos>- Comma-separated repository names to filter GitHub triggers--trigger-github-exclude-users <users>- Comma-separated GitHub usernames whose events should not fire the trigger--trigger-gitlab <event>- GitLab event trigger (e.g.merge_request.opened)--trigger-gitlab-repos <repos>- Comma-separated project names to filter GitLab triggers--trigger-gitlab-exclude-users <users>- Comma-separated GitLab usernames whose events should not fire the trigger--github-checks <names>- Comma-separated GitHub check names to report the run’s verdict on (requires a PR opened/updated trigger)--lifecycle <policy>- Workspace lifecycle:default,archive_when_done, orsleep_when_done--sleep-when-done- Shortcut for--lifecycle sleep_when_done--auto-stop-minutes <minutes>- Inactivity timeout for thedefaultlifecycle policy--pr-followups- Allow follow-up actions on matching PRs--agent-provider <provider>- Coding agent to use:claude,codex,cursor,muse,opencode, orpi(ornoneto inherit org default)--model <model>- Model identifier (must be valid for--agent-provider; passnoneto clear)--thinking-level <level>- Thinking/reasoning level:low,medium,high,xhigh,max, Codex/Museultra, or Claude Code-onlyultracode(ornoneto clear)--plan-mode- Run automation messages in plan mode--goal-mode- Set automation messages as goals--fast-mode- Run automation messages in fast mode--personal- Create a personal automation owned by you--in <duration>- Run once after30m,2h,3d,1w,1d12h, etc. Inside a workspace, runs come back to that workspace unless--workspacesays otherwise--at <datetime>- Run once at an ISO-8601 time with a timezone, e.g.2026-10-08T09:00:00-07:00--max-runs <n>- Delete the automation afternruns (nonefor unlimited)--workspace <target>-new(new workspace each run),reuse(one workspace created on the first run),current(this workspace), or a workspace ID. See Workspace and run limit--background- Keep it in the Background section instead of the main list--disabled- Create the automation disabled
Edit an Automation
--name <name>- New name--prompt <prompt>- New prompt--enabled <true|false>- Enable or disable--trigger-cron <expression>- Replace triggers with a cron trigger--trigger-cron-timezone <tz>- Timezone for the cron trigger--trigger-github <event>- Replace triggers with a GitHub event trigger--trigger-github-repos <repos>- Comma-separated repository names to filter GitHub triggers--trigger-github-exclude-users <users>- Comma-separated GitHub usernames to exclude. Without--trigger-github, updates existing GitHub triggers. Pass an empty string ("") to clear existing GitHub exclusions.--trigger-gitlab <event>- Replace triggers with a GitLab event trigger--trigger-gitlab-repos <repos>- Comma-separated project names to filter GitLab triggers--trigger-gitlab-exclude-users <users>- Comma-separated GitLab usernames to exclude. Without--trigger-gitlab, updates existing GitLab triggers. Pass an empty string ("") to clear existing GitLab exclusions.--github-checks <names>- Comma-separated GitHub check names to report the run’s verdict on. Replaces the current list; pass an empty string ("") to stop creating checks.--add-github-checks <names>- Comma-separated check names to add, keeping the ones already configured. Use this when adding checks across existing automations, so a name someone else configured is never dropped.--environment <name|id>- Move the automation to a different environment--lifecycle <policy>- Workspace lifecycle:default,archive_when_done, orsleep_when_done--sleep-when-done- Shortcut for--lifecycle sleep_when_done--auto-stop-minutes <minutes>- Inactivity timeout for thedefaultlifecycle policy--pr-followups <true|false>- Toggle whether matching PRs can receive follow-up actions--agent-provider <provider>- Coding agent to use:claude,codex,cursor,muse,opencode, orpi(ornoneto inherit org default)--model <model>- Model identifier (must be valid for--agent-provider; passnoneto clear)--thinking-level <level>- Thinking/reasoning level:low,medium,high,xhigh,max, Codex/Museultra, or Claude Code-onlyultracode(ornoneto clear)--plan-mode <true|false>- Enable or disable plan mode--goal-mode <true|false>- Enable or disable goal mode--fast-mode <true|false>- Enable or disable fast mode--in <duration>/--at <datetime>- Replace the triggers with a one-time schedule--max-runs <n>- Total run limit, including runs already used (nonefor unlimited)--workspace <target>-new,reuse,current, or a workspace ID--background <true|false>- Move to or from the Background section
Run an Automation
Delete an Automation
-f, --force- Skip confirmation prompt
Report a GitHub Check
--token <token>- Ownership token for this check, copied from the prompt (required)--conclusion <conclusion>-successorfailure(required)--title <title>- One-line verdict shown on the check (required)--summary <summary>- What was checked and why it passed or failed
Workspace Connection
Connect via SSH
Forward a Port to Localhost
127.0.0.1. Keep the command running while you use the service. To bind a different local port:
Open in VS Code
replicas code to pick a workspace with the arrow keys and Enter, or pass a workspace name or ID directly. Names with spaces work with or without quotes.
Set a different IDE command, such as Cursor, and inspect the current CLI configuration with:
Switch Organization
claude-auth, codex-auth, and muse-auth. The CLI selects it automatically when you belong to only one organization; otherwise, you choose. The selection persists across sign-outs until you change it or lose access.
replicas claude-auth, replicas codex-auth, and replicas muse-auth save to your personal account unless you pass --org, which shares the credentials with every member of the active organization and requires the admin role. These commands show your account, role, credential, and destination for confirmation before opening your browser, and confirm where the credentials landed on success. While an organization is still in onboarding, an admin’s personal connection also becomes the organization default. Pass -y, --yes to skip the confirmation in scripts. Personal credentials take priority over organization defaults.Repository Configuration
Repository-level workspace setup is driven byreplicas.json or replicas.yaml. Both formats use the same schema — YAML is especially useful for multiline system prompts.
Create a starter file in the current repository: