Give each branch its own worktree, dev server and saved preview on a second machine. Open each preview from Omnyo on any of your devices, and restart it from its saved command.
Ask me about each of these, one at a time, with a suggested default: - Branches (the branches to preview) - Machine (an existing connected machine to run them on) - Checkout (the repo's folder on that machine) - Dev server command (check package.json, e.g. pnpm dev) Skip any I've answered. Then sum up the plan in three bullets and wait for my go. My answers override the steps below. If a wait times out, wait again, up to three times. Run a registered dev preview for each branch on my existing connected Omnyo machine. Guide: /guides/remote-dev-servers Preserve other work: don't stash, reset or switch branches in an existing checkout. Don't enroll machines, expose ports, change firewall rules or create public links. If the selected machine or source isn't available, report that before starting. 1. Check omnyo machine list and omnyo project show "$OMNYO_PROJECT_ID". Confirm the named machine is online and use its existing project checkout. If that checkout isn't registered, use omnyo project source add "$OMNYO_PROJECT_ID" --path <checkout> --machine <machine>. Do not create a machine or cloud resource. 2. For each named branch, start a thread on that machine with its own worktree based on the branch's current commit. Leave uncommitted work in other checkouts alone. Use omnyo thread spawn --json --project "$OMNYO_PROJECT_ID" --machine <machine> --new-environment worktree --base-branch <branch> --title "<short task name for the branch>" --prompt "Prepare this branch's dev preview. Reuse its .omnyo-env-setup.sh and .env.local, verify the actual dev-server command and a fixed free loopback port, then register the exact executable, argv and working directory with omnyo preview register --thread <this-thread-id> --url <original-loopback-url> --cwd <worktree> -- <verified-command-and-arguments>. Register first, then omnyo preview restart <preview-id> and omnyo preview status <preview-id>. Use an existing protected launcher for credentials; never put secrets in arguments. Keep the chosen port on restart. Don't adopt or stop another server or change application code. When online, run omnyo glance servers --remember <preview-id> and return the original loopback URL with the preview ID and status." 3. Read each thread's result. If a start is uncertain, check omnyo preview status <preview-id> before retrying with omnyo preview restart <preview-id>; a restart reuses a ready run, so never launch a second copy by hand. A foreign listener is a conflict; don't kill it or silently choose a different port. An offline machine must reconnect before restart. 4. Reply with branch, machine, preview ID, readiness and the original loopback URL. On my other signed-in devices, Omnyo opens the registered private preview instead. Then offer to save these steps as an Omnyo skill in .omnyo/skills/preview-branches/SKILL.md, with my machine and verified dev server command filled in, so next time I can just ask for it.
Use a machine already connected to Omnyo, with the tools your project needs.
Point Omnyo at the checkout already on your dev box, and give every branch its own ports.
Commit a setup script at the repo root. Omnyo runs it in each new worktree it creates, so every branch installs its dependencies and chooses its ports. This example uses pnpm; adapt the command and ports to your project:
#!/usr/bin/env bash
set -euo pipefail
pnpm install --frozen-lockfile
free_port() { node -e 'const s=require("net").createServer().listen(0,"127.0.0.1",()=>{console.log(s.address().port);s.close()})'; }
printf '\nWEB_PORT=%s\nAPI_PORT=%s\n' "$(free_port)" "$(free_port)" >> .env.localEach thread gets its own worktree on the machine, so servers never step on each other.
omnyo thread spawn --project <project-id> --machine <machine> --new-environment worktree --base-branch <branch> --title "<task>" --prompt "<what to do>". Repeat for each branch.Save the server's launch command once. Omnyo can check it, reopen it and restart it in the same worktree.
.env.local. Register that exact launch before starting it:$ set -a; . ./.env.local; set +a $ omnyo preview register --thread "$OMNYO_THREAD_ID" --url "http://127.0.0.1:$WEB_PORT/" --cwd "$PWD" -- pnpm dev --host 127.0.0.1 --port "$WEB_PORT"
Use the returned preview ID with omnyo preview restart <preview-id>, then omnyo preview status <preview-id>. Wait for online before opening it.
Run omnyo glance servers --remember <preview-id> to show it in the thread's Dev servers shelf, just above the message box. On a phone, tap the server button in the thread header. Choose Open while it is Running. If it stopped or didn't start, choose Restart to run its saved command again. You can also open the loopback link returned in chat; on your other signed-in devices, Omnyo opens the registered private preview.
Verify this worktree's dev-server command and fixed loopback port. Register the exact argv and cwd with omnyo preview register, restart the saved preview, and check its status. When online, remember it with omnyo glance servers --remember and return its original loopback URL. Preserve other servers and use the existing protected launcher for credentials.
omnyo preview status <preview-id> and read the reported state.omnyo preview restart <preview-id>, or Restart in the shelf when the server stopped or didn't start, to run the saved launch again. If another program already holds the port, the shelf shows Port in use. Omnyo won't stop that program for you: stop it yourself, then restart the preview on its saved port..omnyo-env-setup.sh from step 2, so each new worktree chooses its own ports..env.local. Keep that port when restarting..worktreeinclude file at the repo root, one pattern per line.Managed previews isolate browser storage and cookies; they do not reuse your normal app session. Redirects outside the registered server are refused, so external sign-in redirects are not supported through this preview route.
Managed previews carry HTTP and supported WebSocket traffic to the registered server. Keep the app's dev-server URLs on that loopback endpoint.
Only you: open it from Omnyo on any device signed in to your Omnyo. Registering a preview doesn't open a public port or create a public share link.
Yes. Sign in to Omnyo connect with a free Omnyo account to reach your Omnyo, and its previews, from your phone or any browser. See Work from anywhere. You can use your own network, a company VPN or Tailscale instead. Either way, the dev server stays on loopback and needs no open firewall port.
Your repo, its build tools and any local configuration. List untracked files every worktree needs in .worktreeinclude; Omnyo copies them from the existing checkout.
Yes. Agents use their own worktrees, leaving your checkout, editor and terminals in place.
Yes, if it is connected to Omnyo and stays awake. After a container restart, use Reconnect in Settings → Machines and run the command it shows. Registering a preview doesn't add a new machine.
Open Settings → Concurrency limit and set that machine's limit under Host limits.
A server you started in the thread's terminal stops after the 30-second undo window. A registered preview belongs to the worktree: five minutes after you archive the worktree's last thread, Omnyo removes the worktree and stops every process still running in it, including the preview. The branch is kept. Use .omnyo-env-teardown.sh for cleanup outside the worktree, such as its own containers.
No. Omnyo is free to use, with no Omnyo subscription. Registering a preview only saves its launch command in your own Omnyo; your agents run on the subscriptions you already have.
Use the machines and agent subscriptions you already have.