Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ An ADE fits InstaADE when it has a desktop app on macOS or Windows, or runs in a
| Link | Opens a link from InstaADE and connects to the sandbox over SSH | cmux |
| SSH host | Reaches the sandbox through a host in `~/.ssh/config`, which it imports or you add by its address | Orca, Paseo, Rex |
| Host | Runs the sandbox as one of its hosts, set up in the ADE | Paradev |
| Terminal | Runs on the sandbox, and InstaADE opens it in your terminal over SSH | Herdr, Amp |
| Terminal | Runs on the sandbox, and InstaADE opens it in your terminal over SSH | Herdr, Amp, Codync |

1. Read [How InstaADE works with each ADE](docs/ades.md) to see how the ADEs differ.
2. Follow [Adding an ADE](DEVELOPMENT.md#adding-an-ade) for the files to change.
Expand Down
6 changes: 3 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Read this before you change the code, open a pull request, build a preview or cu
- `api/`: the instabox API client. `auth.rs`: device sign-in and token storage.
- `sandbox/`: create, connect, sync and lifecycle of sandboxes.
- `ade/`: the ADE registry (`mod.rs`) and one module per ADE (`t3.rs`, `cmux.rs`, `orca.rs`, `paradev.rs`, `paseo.rs`, `herdr.rs`, `amp.rs`, `rex.rs`), plus `herdr_desktop.rs`, the app Herdr opens in when it is installed.
- `ssh.rs`: the two SSH tokens of a sandbox (`Kind`: background and ordinary, see [SSH tokens](docs/ades.md#ssh-tokens)) and the login commands, and the terminal that Open in Terminal, Herdr and Amp open. `ssh_config.rs`: the SSH hosts InstaADE writes for Orca, Paseo and Herdr Desktop, with the background token, and the one line it adds to `~/.ssh/config`.
- `ssh.rs`: the two SSH tokens of a sandbox (`Kind`: background and ordinary, see [SSH tokens](docs/ades.md#ssh-tokens)) and the login commands, and the terminal that Open in Terminal, Herdr, Amp and Codync open. `ssh_config.rs`: the SSH hosts InstaADE writes for Orca, Paseo and Herdr Desktop, with the background token, and the one line it adds to `~/.ssh/config`.
- `clipboard.rs`: copies a secret the user pastes once (Paradev's SSH address) and clears it a minute later, and copies Paseo's and Rex's host address, which holds no secret and stays.
- `old_app.rs`: finds a copy of the app from before it was InstaADE, and moves it to the Trash (see [The old app](#the-old-app)).
- `agents.rs`: signing Claude Code or Codex in on a sandbox. `github.rs`: signing GitHub's CLI in on a sandbox and setting up git there (see [GitHub sign-in](docs/ades.md#github-sign-in)). `repos.rs`: the GitHub repos `gh` lists on a sandbox, the repo names InstaADE takes, and the check of a repo's folder there (see [Bring your repo](docs/ades.md#bring-your-repo)). `settings.rs`: the app's saved settings, `settings.json`, which keep Later on that sign-in and Done on Orca's and Paseo's next steps (see [Next steps](docs/ades.md#next-steps)). `tray.rs`: the menu bar popover. `login.rs`: start at login.
Expand Down Expand Up @@ -62,8 +62,8 @@ cargo test
Pull requests that add an ADE are welcome. Read [How InstaADE works with each ADE](docs/ades.md) first to see how the current ADEs differ.

- Registry: `src-tauri/src/ade/mod.rs` defines `Ade` and lists every ADE in `ALL`. Add a variant and fill in its match arms.
- ADE modules: `src-tauri/src/ade/t3.rs` finds T3 Code and reads its version, and holds the install, version and pairing scripts. `src-tauri/assets/t3-probe` is the idle probe. `src-tauri/src/ade/cmux.rs` finds cmux, reads its version from its app bundle, tells whether it runs, and builds its link. `src-tauri/src/ade/orca.rs` finds Orca and reads its version, from its app bundle on macOS and from `Orca.exe` on Windows, and holds the setup that installs its probe. `src-tauri/assets/orca-probe` is its idle probe. `src-tauri/src/ade/paradev.rs` finds Paradev like cmux, as `Paradev.app` or `Superset.app`, and holds its host check, host id and links, and the call to its CLI that adds the host. `src-tauri/src/ade/paseo.rs` finds Paseo like Orca (it uses Orca's reader for `.exe` files), and holds its daemon setup and host address. `src-tauri/assets/paseo-probe` is its idle probe. `src-tauri/src/ade/herdr.rs` finds the OpenSSH client and reads its version, and holds Herdr's install script and version check. `src-tauri/src/ade/herdr_desktop.rs` finds Herdr Desktop and herdr-core and checks them, and holds the calls to their CLIs that add the sandbox as a machine and show its space. `src-tauri/src/ade/amp.rs` holds Amp's install script and version check, and finds the OpenSSH client with Herdr's code. `src-tauri/src/ade/rex.rs` finds Rex like cmux, checks its signature like Paseo, tells whether this Mac can run it (Apple silicon, macOS 15 or later, which `Ade::runs_here` asks), and holds its server setup, its host address and the calls to its CLI that show the sandbox's session. When an app can be installed more than once, its module picks the newest real copy with `ade::newest_app`, so the version shown is the copy that opens.
- How it opens (`Open`): `Pair` for an app that pairs with a server on the sandbox (T3), `Link` for an app that reaches the sandbox over SSH from a link (cmux), `SshHost` for an app that reaches the sandbox through a host in `~/.ssh/config`, which it imports (Orca) or the user adds by its address (Paseo, Rex), `Host` for an app that runs the sandbox as one of its hosts, set up in the app (Paradev), `Terminal` for an ADE that runs on the sandbox and opens in the user's terminal over SSH (Herdr, Amp). A terminal ADE can have an app of its own (`Terminal::app`, Herdr Desktop): when it is installed, Open uses it in place of the terminal, and `Core::open_ade_in_terminal` keeps the terminal one click away. `src-tauri/src/ssh_config.rs` writes the hosts of Orca, Paseo, Rex and Herdr Desktop, and `ssh::open_in_terminal` opens the terminal.
- ADE modules: `src-tauri/src/ade/t3.rs` finds T3 Code and reads its version, and holds the install, version and pairing scripts. `src-tauri/assets/t3-probe` is the idle probe. `src-tauri/src/ade/cmux.rs` finds cmux, reads its version from its app bundle, tells whether it runs, and builds its link. `src-tauri/src/ade/orca.rs` finds Orca and reads its version, from its app bundle on macOS and from `Orca.exe` on Windows, and holds the setup that installs its probe. `src-tauri/assets/orca-probe` is its idle probe. `src-tauri/src/ade/paradev.rs` finds Paradev like cmux, as `Paradev.app` or `Superset.app`, and holds its host check, host id and links, and the call to its CLI that adds the host. `src-tauri/src/ade/paseo.rs` finds Paseo like Orca (it uses Orca's reader for `.exe` files), and holds its daemon setup and host address. `src-tauri/assets/paseo-probe` is its idle probe. `src-tauri/src/ade/herdr.rs` finds the OpenSSH client and reads its version, and holds Herdr's install script and version check. `src-tauri/src/ade/herdr_desktop.rs` finds Herdr Desktop and herdr-core and checks them, and holds the calls to their CLIs that add the sandbox as a machine and show its space. `src-tauri/src/ade/amp.rs` holds Amp's install script and version check, and finds the OpenSSH client with Herdr's code. `src-tauri/src/ade/rex.rs` finds Rex like cmux, checks its signature like Paseo, tells whether this Mac can run it (Apple silicon, macOS 15 or later, which `Ade::runs_here` asks), and holds its server setup, its host address and the calls to its CLI that show the sandbox's session. `src-tauri/src/ade/codync.rs` holds Codync's install and service setup and version check, and finds the OpenSSH client with Herdr's code. When an app can be installed more than once, its module picks the newest real copy with `ade::newest_app`, so the version shown is the copy that opens.
- How it opens (`Open`): `Pair` for an app that pairs with a server on the sandbox (T3), `Link` for an app that reaches the sandbox over SSH from a link (cmux), `SshHost` for an app that reaches the sandbox through a host in `~/.ssh/config`, which it imports (Orca) or the user adds by its address (Paseo, Rex), `Host` for an app that runs the sandbox as one of its hosts, set up in the app (Paradev), `Terminal` for an ADE that runs on the sandbox and opens in the user's terminal over SSH (Herdr, Amp, Codync). A terminal ADE can have an app of its own (`Terminal::app`, Herdr Desktop): when it is installed, Open uses it in place of the terminal, and `Core::open_ade_in_terminal` keeps the terminal one click away. `src-tauri/src/ssh_config.rs` writes the hosts of Orca, Paseo, Rex and Herdr Desktop, and `ssh::open_in_terminal` opens the terminal.
- Flow: `src-tauri/src/sandbox/connect.rs` sets the ADE up and adds its id to the sandbox's mark. `src-tauri/src/sandbox/sync.rs` keeps the versions in step for an ADE that pins them. `open_in_ade` in `src-tauri/src/app.rs` opens it.
- UI: `src/ades.tsx` holds what the app does with each ADE (its badge, names and text), `src/NextSteps.tsx` the words of each ADE's next step, `src/mode.ts` the ADE the user picked, and `src/ade.ts` with `src/hero/` each ADE's look (logo and background). The switcher is `src/AdeSwitcher.tsx`, the first-run picker `src/AdePicker.tsx` and the tip under the switcher `src/AdeTip.tsx`.
- Docs: add the ADE to the README's Supported ADEs and give it a section in `docs/ades.md`.
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<h1>InstaADE</h1>

<p>Run your ADE (agentic development environment) on an instabox sandbox, from your menu bar or system tray.<br>Works with T3 Code, cmux, Orca, Paradev, Paseo, Herdr, Amp and Rex.</p>
<p>Run your ADE (agentic development environment) on an instabox sandbox, from your menu bar or system tray.<br>Works with T3 Code, cmux, Orca, Paradev, Paseo, Herdr, Amp, Rex and Codync.</p>

<p>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
Expand Down Expand Up @@ -83,6 +83,10 @@ Every **Open in** wakes the sandbox first.
- Installs Rex's server on the sandbox, adds it as an SSH host, copies its address and starts Rex.
- First time: in Rex, open **Settings** → **Remote Hosts** → **Add Remote Host…**, paste the address as the URL and click **Add**.
- With **Remote Control** on in Rex (**Settings** → **General**), Open in Rex goes straight to the sandbox's session.
- **[Codync](docs/ades.md#codync)** · no app needed here, runs in your terminal
- Installs Codync's host on the sandbox as a service and opens Codync's terminal UI in your terminal over SSH.
- First time: sign in to the agents your bots use on the sandbox (such as `claude` or `codex login` in **Open in Terminal**). To message the bots from your phone, open **Pair phone…** in Codync's terminal UI and scan the code with the Codync app.
- Closing the terminal leaves the host and its bots on the sandbox, but the sandbox may sleep when idle and pause them. A sleeping sandbox cannot reach your phone until something wakes it, such as **Open in Codync**.

> [!NOTE]
> If a sandbox stays awake while cmux, Orca, Paseo or T3 Code is open, update InstaADE to 0.1.14 or later, then open the sandbox from InstaADE again.
Expand Down
36 changes: 35 additions & 1 deletion docs/ades.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For Orca, Paseo, Rex, a first Paradev setup that Paradev's CLI does not do, and
InstaADE keeps two SSH tokens for each sandbox, in two keychain entries. Each token lasts 30 days. InstaADE uses the stored one while it has more than a day left, else it makes a new one.

- The **background token** is for an app that stays connected by itself and checks the connection every few seconds: cmux, Orca, Paseo, Herdr Desktop and Rex. When instabox applies background tokens to the sandbox, the connections of this token do not wake the sandbox and do not count as activity. So an idle app does not keep the sandbox awake. An agent at work still keeps it awake, through the ADE's activity probe and the sandbox's terminals and CPU. InstaADE asks for this token with `background: true`. An instabox that does not know background tokens makes an ordinary token. InstaADE then uses that token in its place, and writes this to its log once.
- The **ordinary token** is for a login that you start: the SSH command in the sandbox's details, **Open in Terminal**, Herdr, Amp, Paradev's host setup (its CLI and its SSH address) and the sign-in of Claude Code or Codex. Its connections wake the sandbox and count as activity.
- The **ordinary token** is for a login that you start: the SSH command in the sandbox's details, **Open in Terminal**, Herdr, Amp, Codync, Paradev's host setup (its CLI and its SSH address) and the sign-in of Claude Code or Codex. Its connections wake the sandbox and count as activity.

The SSH host that Orca, Paseo, Herdr Desktop and Rex use holds the background token. An older InstaADE wrote that host with its one token, which is now the ordinary one. The host keeps its alias. Its `User` changes to the background token the next time InstaADE starts, or at the next **Open**. So you do not add the host again in Orca or Paseo.

Expand Down Expand Up @@ -378,6 +378,40 @@ Rex reads the host, which holds an SSH token, so InstaADE starts only the real R

Rex has no idle probe. Its agents run in terminals of the Rex server on the sandbox, so the sandbox sleeps by its terminals and CPU, as with Herdr. A Rex that stays connected, with idle sessions, does not keep the sandbox awake.

## Codync

[Codync](https://codync.dev) runs coding agents (Claude Code, Codex and others) as persistent, named bots that you message from a phone, a desktop app or a terminal. Its host, `codync-host`, runs on the machine the bots work on and drives the agents there over ACP. Like Amp, it runs on the sandbox, and InstaADE opens it in your terminal over SSH. Nothing of Codync has to run on your computer, and no app gets an SSH token.

**Install Codync** wakes the sandbox and runs one command on it:

- It reads the version of Codync's latest release from the release's `codync-host-compat.json`. When the sandbox has no `codync-host`, or one older than that release, the command runs Codync's install script, `https://raw.githubusercontent.com/leepokai/Codync/main/packaging/install.sh`, with `--host-only` and that release. It puts the host in `~/.local/bin/codync-host` and checks its SHA-256, and restarts a service that runs that file. The host is one static binary. An SSH command's PATH lacks `~/.local/bin`, so InstaADE links it as `/usr/local/bin/codync-host` when nothing is there. A host as new as the release or newer, such as a dev build, stays as it is, and so does any host when the release's version cannot be read. The setup then uses one host throughout, the one in `~/.local/bin` or else the one on the PATH, for the service, `codync-tui` and the version it prints, so an older `codync-host` elsewhere on the PATH is not used after an update.
- It writes `/usr/local/bin/codync-tui`, which runs `codync-host tui`, since the SSH session runs one plain word.
- It turns on lingering for the sandbox's user, so the host starts at boot with no login. When the sandbox has no `codync-host` service yet, it runs `codync-host install` from a login shell, which writes and starts a systemd user service that keeps the login PATH, where the agents are. When the service is there and runs that host, it only starts it, so a **Reconnect** restarts bots at work only to update an older host. A service that runs another file is installed again, on its port.
- The service uses port 19222, or the next free port when another user's Codync host holds it (a Codync cloud computer runs one), and `codync-tui` reads the port from the service as systemd reports it (`systemctl --user cat`), wherever its unit file is. The host must take this user's token on that port within 30 seconds. Then it prints `codync-host --version`. When the command fails or prints no version, the sandbox does not get `codync` in its mark.
- Reading the host's version stops after 10 seconds, the release's version after 20 seconds, the download after 60 seconds and the install script after 5 minutes. When the download fails, the error ends with "Could not download Codync's install script." When the script fails or runs out of time, the error shows its last 3 lines and one line that says which. When the service does not start, the error ends with "Codync could not start its host." or "The Codync host did not start."

Then Codync opens, as with **Open in Codync**. **Reconnect** runs the same command again, which installs nothing while the host is current, and opens Codync.

**Open in Codync** opens your terminal as **Open in Amp** does, with the same checks and the same [ordinary token](#ssh-tokens). The SSH session runs `codync-tui`:

```
<OpenSSH client> -t -o StrictHostKeyChecking=accept-new -p 2222 <SSH token>@ssh.instabox.sh codync-tui
```

The first time:

1. Sign in to the agents your bots will use, on the sandbox, as you would for any terminal use: for example `claude` or `codex login` in **Open in Terminal**, or **Sign in to Claude Code or Codex** in the sandbox's details. Claude Code and Codex run through ACP adapters fetched with `npx`, so they need Node.js on the sandbox. Without it, Codync offers to add its own copy.
2. In Codync's terminal UI, make a bot and message it.
3. To message the bots from your phone, open **Pair phone…** in the terminal UI and scan the QR code with the Codync app (iPhone or Android). Away from the sandbox's network, the phone reaches the host through Codync's end-to-end encrypted relay, which needs the host and the phone signed in to the same Codync account.

- Codync keeps its data on the sandbox, in `~/.codync` under `/data/home`, which a pause or a stop keeps.
- Closing the terminal ends only the terminal UI. The host and its bots keep running on the sandbox.
- The host updates itself in place, so the link follows. **Install Codync** and **Reconnect** also update a host older than Codync's latest release.

On your computer, InstaADE needs only the OpenSSH client, as for Herdr and Amp. Settings shows its version next to Codync. Without it, nothing wakes or changes, and InstaADE asks you to install the OpenSSH client.

Codync has no idle probe yet, so the sandbox sleeps by its terminals and CPU. A bot that works with no terminal open can have the sandbox pause under it, and a phone cannot reach a sandbox that sleeps until something wakes it, such as **Open in Codync**.

## Several ADEs on one sandbox

A sandbox can have several ADEs, and its details list each one with **Open**. The sandbox's metadata records which ADEs it has, in a form older releases (named Instabox) still read. [ADEs and the sandbox mark](../DEVELOPMENT.md#ades-and-the-sandbox-mark) has the rules.
Loading