> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replicas.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Devices

> Let agents work on your own computers, like a Mac mini or a laptop, over SSH.

Add your own computers to an [environment](https://docs.replicas.dev/features/environments.md) and agents in its workspaces can reach them with `ssh`, `scp`, and `rsync` by name. With a Screen Sharing password, agents can also see and control the screen.

## Add a device

Open an environment's **Devices** settings and click **Add device**. Pick how workspaces reach it:

* **It connects to Replicas**: keep `npx -y replicas-cli device connect` running on the device and paste its token when asked. Needs Node.js 18 or later, and no Tailscale or open ports. Agents can use the device only while the command runs.
* **Workspaces connect to it**: enter its Tailscale name or a public address. For a Tailscale name, add a reusable, ephemeral auth key in **Tailscale** so each workspace joins your tailnet.

Then allow Replicas to sign in by running the command shown on the device, which adds the device's public key to `~/.ssh/authorized_keys`. On a Mac, also turn on **Remote Login** in System Settings → General → Sharing.

New workspaces in the environment, and in its forks, get its devices.

## Screen control

On a Mac, open System Settings → General → Sharing, click (i) next to **Screen Sharing**, and turn on **VNC viewers may control screen with password**. Add that password to the device. Agents then run `replicas computer screen <name>` to show the screen on the workspace desktop and drive it with the other [`replicas computer`](https://docs.replicas.dev/features/cli) commands, which you can watch in the **Desktop** tab.

## Security

* The private key never leaves Replicas and its workspaces.
* Removing a device deletes its key from Replicas, so new workspaces don't get it. Workspaces already running keep it, so also remove its line from `~/.ssh/authorized_keys` on the device to cut off access.
* Agents are told devices are personal machines and to ask before anything destructive.
* If a connect token leaks or the device is reinstalled, click **Reset connection** and run the command again with the new token.

## CLI

```bash theme={null}
replicas env devices list <env>
replicas env devices add <env> <name> --user <user> [--host <host>] [--port <port>] [--screen-password <password>]
replicas env devices remove <env> <name>
replicas env devices reset <env> <name>
replicas device connect
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.