@kresnayulianta/codemotely
v0.0.2
Published
Access your terminal from any browser — self-hosted via cloudflared tunnel
Downloads
34
Maintainers
Readme
Codemotely
Access your local terminal from any browser — self-hosted, no third-party relay, tunneled through cloudflared.
Works great with AI coding tools: Claude Code, OpenCode, Aider, and any other CLI tool.
Install
Requires Bun:
curl -fsSL https://bun.sh/install | bashInstall Codemotely:
bun add -g @kresnayulianta/codemotely
# or with npm
npm install -g @kresnayulianta/codemotelyInstall cloudflared (for public tunnel access):
# macOS
brew install cloudflare/cloudflare/cloudflared
# Linux — https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/Quick Start
# 1. Start the server (shows QR code + public URL)
codemotely start
# 2. In another terminal, create a shell session
codemotely exec
# 3. Scan the QR code or open the URL on your phone/tabletThat's it. Tap the session card in the browser to open a full terminal.
CLI Reference
Server
codemotely start Start the server + cloudflared tunnelSessions
codemotely exec Open your default shell ($SHELL)
codemotely exec node server.js Run a specific command
codemotely exec --name api node server.js Named session
codemotely exec --readonly View-only (browser can watch, not type)
codemotely exec -- vim . Use -- before commands with their own flags
codemotely list List all sessions (active + ended)
codemotely kill <name|id> Kill a running session
codemotely remove <name|id> Remove an ended session from the listBrowser
codemotely open Open browser (session picker)
codemotely open <name> Open browser for a specific sessionTerminal attach
Connect your local terminal directly to an existing session (bidirectional):
codemotely attach <name|id>- Your keystrokes are forwarded to the session PTY
- Session output is streamed to your terminal in real-time
- Press Ctrl+] to detach without killing the session
- The browser and your terminal can view the same session simultaneously
Features
- Public URL + QR code — cloudflared tunnel, no port forwarding needed
- Session replay — re-opening a session replays the last 100KB of output instantly
- Multi-viewer — multiple browsers (and terminals) can watch the same session
- View-only sessions — share a terminal without giving control
- Bell notifications — sound + OS notification + in-app toast when terminal rings
- File explorer — browse and preview files on the host machine from the browser
- JWT auth — every connection requires a token embedded in the QR code URL
- Mobile keyboard — extra keys panel (Tab, Esc, Ctrl+C, arrows) for touchscreens
How It Works
Your Machine
┌─────────────────────────────────────────┐
│ codemotely start │
│ └─ Bun HTTP/WS server (port 7681) │
│ └─ PTY (bash / zsh / any cmd) │
│ │
│ cloudflared tunnel ──────────────────────────► https://xxx.trycloudflare.com
└─────────────────────────────────────────┘
│
Browser (mobile/desktop)
xterm.js terminal- No relay server. Traffic goes directly from cloudflared to your machine.
- No account required. cloudflared's free tunnel needs no login.
- Local-only option. Works without cloudflared — just use the local network URL.
