Share a port
An agent working on a web app runs its dev server on your computer, at localhost:3000. Sharing that port gives you a link to open it from your phone or another computer, wherever you are. Only a browser signed in to your Bussin Bytes account can open it; it is never public.
The machine must be signed in to your account first (Your phone and other computers).
Ask the agent
Section titled “Ask the agent”Start the dev server and share it so I can try it on my phone.
The agent starts the server, shares the port and gives you the link in its reply. Tap it in Cohort, on your phone or another computer, and it opens in your browser already signed in.
Agents do this with Cohort’s share_port tool, or the command line:
cohort share 3000It prints the link, then:
localhost:3000 opens there for your account only, from your phone or another computer (signed in). Stop: cohort share 3000 --stopSomething must already be listening on that port: otherwise Cohort says to start the server first. Sharing a port that is already shared gives the same link again.
Open the link
Section titled “Open the link”- From Cohort (a link in a thread, on any of your devices): it opens signed in.
- Anywhere else (a link you copied into another browser): the page asks you to sign in with your Bussin Bytes account (an email code, and two-factor if your account has it). After that, that browser stays signed in for 12 hours.
The page works as on localhost: live reload, the app’s own requests, its absolute paths. Opening another shared link in the same browser clears the previous app’s cookies and storage first, so one dev app’s data doesn’t leak into the next.
Stop sharing
Section titled “Stop sharing”cohort share 3000 --stop, or ask the agent to stop.- Archiving the thread that shared it stops it too.
cohort share --list lists what this machine shares, with the thread that shared each one:
No ports shared.A share lasts until it’s stopped, across restarts, but opens only while its machine is online. A machine can share up to 32 ports.
What it means for privacy
Section titled “What it means for privacy”Everything else between your devices is end-to-end encrypted. A shared port isn’t: a browser opens it, so Cohort’s relay passes its traffic on in the clear. The relay doesn’t log it or keep it. Share your own dev servers, not pages that hold other people’s data. See Privacy.
