Commands
Everything coderemote can do, one command at a time.
$ coderemote up # share this folder, print the pairing QR $ coderemote status # running agents and their terminal sessions $ coderemote kill <id>... | --all # end terminal sessions $ coderemote stop [--all] # stop the agent for this folder $ coderemote serve # share on 127.0.0.1 only, no tunnel $ coderemote requests [PORT] # requests that reached a previewed port $ coderemote request <ID> # headers and bodies of one request $ coderemote setup claude # follow Claude Code sessions in the app $ coderemote setup codex # the same for Codex $ coderemote devices # phones enrolled with this folder $ coderemote devices revoke <id> # remove one phone $ coderemote devices policy <level> # how strict Face ID is $ coderemote rotate-token # revoke every paired device $ coderemote tunnels # your Dev Tunnels account's tunnels $ coderemote tunnels delete <id> # delete ones nothing uses $ coderemote login # sign in to Dev Tunnels again $ coderemote update # install the latest version $ coderemote help # all options
up
Shares the current folder through a private Microsoft Dev Tunnel and prints the pairing QR code. This is the command you use day to day.
$ coderemote up $ coderemote up --root ~/projects # share another folder $ coderemote up --web # also open it in VS Code on vscode.dev
It starts a small agent on 127.0.0.1, signs you in to Dev Tunnels if needed, connects out to the relay and prints three things: the folder being shared, who can get in, and the links to pair with. It keeps running until you press Ctrl+C or close the terminal.
| Option | What it does |
|---|---|
--root DIR | Share DIR instead of the current folder. |
--port N | Listen on local port N (default 31580). Change it when another program already holds that port. |
--allow-anonymous | Skip the account sign-in on the phone: the pairing token alone grants access. Alias --no-auth. |
--web | Also run VS Code's code tunnel and print a vscode.dev link that opens the folder in the full editor in a browser. |
--web uses VS Code's own tunnel, not Code Remote's. It signs in with its own GitHub account and gives the browser the whole machine, not just the shared folder. It needs VS Code's code command on your PATH.
status
Lists the agents running on this computer and the terminal sessions in each. Alias ps.
$ coderemote status
/Users/you/projects/my-app (pid 4121, port 31580, up 2h)
https://…devtunnels.ms
3f9a2c1e zsh pid 4188 2h 1 attached
b71d04aa claude pid 5230 14m detached
Each session shows its id, title, process id, age and whether a phone is attached right now. A detached session is still running; it waits for the app to reattach.
kill
Ends terminal sessions. The first few characters of an id from status are enough.
$ coderemote kill b71d killed b71d04aa (claude) in /Users/you/projects/my-app $ coderemote kill --all # every session in every agent
The agent itself keeps running; use stop for that.
stop
Stops the agent sharing the current folder, ending its tunnel and terminal sessions. Handy when up runs in a window you can't reach.
$ coderemote stop # the agent for this folder $ coderemote stop --all # every agent on this computer
serve
Starts the agent on 127.0.0.1 only, with no tunnel and no sign-in, and prints the local URL and token. For local testing and development; your phone can't reach it.
$ coderemote serve
coderemote agent on http://127.0.0.1:31580
Sharing: /Users/you/projects/my-app
Token: …
requests
Prints the requests that reached a port you preview from the app, the same log the app shows. It's made for a coding agent in a terminal, such as Claude Code or Codex: tell it to run coderemote requests and it can see what your page or a webhook actually sent, and what your server answered. Needs coderemote 0.3.0 or later.
$ coderemote requests #41 200 GET /api/me 8 ms 212 B 10:20:31 #42 401 POST /api/orders 5 ms 38 B 10:20:33 $ coderemote request 42 #42 POST /api/orders -> 401 authorization: Bearer [redacted] …
Run it in the shared folder (or below it) so it finds that folder's agent; with a single agent running, anywhere works. Without a port it reads every port being previewed now. A preview you stopped keeps its log: name its port to read it.
| Command or option | What it does |
|---|---|
requests [PORT] | One line per request, oldest first: id, status, method and path, duration, size and time. |
request <ID> [PORT] | Headers and bodies of one request. JSON is indented; bodies over 64 KB aren't kept. |
requests clear [PORT] | Forgets the recorded requests, like Clear in the app. |
--grep TEXT | Only requests whose method or path contains TEXT. |
--failed | Only errors and 4xx/5xx responses. |
--limit N | Show the latest N (default 50). |
--json | Machine-readable output, for scripts. |
--show-secrets | Print the values that are masked by default (see below). |
Secrets are masked unless you ask for them: Authorization headers (the scheme, such as Bearer, stays), cookie values (their names stay), headers named like a token, key or session, and fields such as password or access_token in query strings, JSON and form bodies. The output says how many values it hid. Add --show-secrets when the agent needs one, for example to reuse a session token in a test.
Nothing is written to disk: the command reads the log the agent keeps in memory, the latest 200 requests per port.
setup claude, setup codex
Installs the Code Remote plugin into Claude Code or Codex, so its sessions show in the app's Agents tab and you can answer their prompts from the phone. Codex runs the plugin's hooks only after you trust them once: open Codex and type /hooks. --remove uninstalls it. See Coding agents.
$ coderemote setup claude $ coderemote setup codex
devices
Lists the phones enrolled with the folder's running agent, when each enrolled and was last seen, and its Face ID setting. A phone enrolls by itself the first time it connects after scanning the QR code.
$ coderemote devices $ coderemote devices revoke 94d5 # an id prefix is enough $ coderemote devices policy terminal+writes --window 30m
revoke removes one phone at once: its sessions and open terminals end, and it can't come back without being paired again. policy sets which actions ask for Face ID: none, terminal (the default: terminals, coding agents and builds) or terminal+writes (also file and git changes), and with --window how long one check lasts: 5m (the default), 30m or 1h. The app can make it stricter; making it looser from the app asks for Face ID.
rotate-token
Replaces the access token and this computer's keys, and forgets every enrolled phone. Every paired phone loses access at once. Use it if you lose your only phone or a pairing link leaks.
$ coderemote rotate-token
Token rotated. Re-pair your devices, and restart running agents.
Then restart coderemote up and scan the new QR code on the devices you still trust.
tunnels
Lists the tunnels on your Dev Tunnels account and deletes the ones nothing uses any more. An account may keep 10 tunnels. Each computer running coderemote uses one, plus one more for previews while its agent runs, and old computers or reinstalls leave theirs behind. Needs coderemote 0.3.6 or later.
$ coderemote tunnels silent-lake-pqv9b80.usw2 online · this computer's agent on port 31580 · coderemote my-mac brave-hill-x7k2m41.usw2 online · this computer's previews on port 31580 · coderemote preview my-mac quiet-fox-3hd8w2c.usw2 coderemote old-laptop $ coderemote tunnels delete quiet-fox-3hd8w2c deleted quiet-fox-3hd8w2c.usw2
Each line shows the tunnel's id, online when an agent serves it right now, what this computer uses it for, and its description, which names the computer that made it. The region suffix (.usw2) is optional when you give an id.
| Command or option | What it does |
|---|---|
tunnels | One line per tunnel on the account you're signed in with. |
tunnels delete <id>... | Deletes those tunnels. One that is online, or that this computer uses, is kept unless you add --force. |
--force | Delete it anyway. Its URL is gone, so the phones paired with it have to pair again; on this computer the next up makes a new one. |
You rarely need it by hand: when the account is full, up and previews first delete preview tunnels no agent serves. Only when that doesn't free a slot does up stop, list the account's tunnels and ask you to delete some.
login
Signs in to Microsoft Dev Tunnels. up does this by itself when needed, so you only run it to switch accounts or when there's no browser.
$ coderemote login # GitHub, in the browser $ coderemote login --microsoft # a Microsoft account $ coderemote login --device-code # no browser here: enter a code on another device
The phone must sign in with the same account, unless you run up --allow-anonymous.
update
Installs the latest coderemote the way you installed it: with npm (or pnpm, yarn, bun), with Homebrew, or into the Node.js the install script downloaded. When there's a newer version, up says so under the pairing links; it asks npm at most once a day and never slows startup. Set CODEREMOTE_NO_UPDATE_CHECK=1 to turn that off.
$ coderemote update $ coderemote --version # the version you're running
Agents already running keep the old version until you restart them: coderemote stop --all, then coderemote up again.
help
Prints every command and option. coderemote on its own, or --help anywhere on the line, does the same, so a typo never starts sharing a folder by accident.
Options
| Option | Commands | Default |
|---|---|---|
--root DIR | up, serve, stop | current folder |
--port N | up, serve | 31580 |
--allow-anonymous | up | off |
--web | up | off |
--all | kill, stop | |
--force | tunnels delete | off |
--microsoft, --device-code | login | GitHub, in the browser |