Skip to main content
The archil CLI connects your machine to a sandbox without exposing anything to the internet. SSH is real OpenSSH, so scp, rsync, port forwarding, and editor remotes like VS Code and Cursor all work. Private ports can be served on localhost for your browser or local tools.

SSH

Put -- before arguments that start with a dash, so they go to ssh. The connection goes through the Archil API instead of an open port. ssh’s ProxyCommand runs archil sandbox ssh-proxy, which:
  1. resumes the sandbox if it’s paused, or starts it if it’s stopped;
  2. installs openssh-server the first time if the image doesn’t include it (with apt, apk, or dnf);
  3. authorizes the CLI’s own key, ~/.ssh/archil_ed25519, for root;
  4. records the sandbox’s host key, fetched over the API, so you never see a trust-on-first-use prompt;
  5. runs sshd and relays the session over the sandbox’s process API.

scp, rsync, and editors

Add the *.archil hosts to your SSH config once:
This writes ~/.ssh/archil_config and includes it from the top of ~/.ssh/config. After that, any sandbox is reachable as <name>.archil:
In VS Code or Cursor, run Remote-SSH: Connect to Host… and enter dev.archil.
The config runs the CLI by its full path, so install it globally first (npm install -g archil) rather than through npx. Sign in with archil login so the config can use your saved profile. An API key that only exists in ARCHIL_API_KEY is never written to disk, and editors usually don’t have that variable.
rsync must also be installed in the sandbox. Desktops include it.

Forward a port to localhost

archil sandbox forward serves a sandbox port on 127.0.0.1 until you press Ctrl-C:
The port stays private. The forward authenticates with a short-lived port token that it renews automatically, and it keeps the sandbox awake while it runs. It only answers requests addressed to 127.0.0.1 or localhost, so web pages can’t reach the forward through DNS rebinding. Forwarding carries HTTP and WebSocket traffic. For other protocols, such as a database, use ssh -L. From code, use forwardPort from disk/tunnel (Node.js only):
To make a port reachable from anywhere instead, expose it.