Code from anywhere — mobile terminal & workflow manager for nomad developers
NomadFlow is an open-source platform that turns your phone into a full development environment. A single Rust binary manages git worktrees, Rust-native PTY sessions, and a real-time terminal, while the React Native app lets you seamlessly switch between projects from your pocket.
Documentation | Getting Started | API Reference
- 3-step selection: Server → Repo → Feature → Terminal ready
- Zero manual commands: environment auto-configured with git worktrees
- Branch management: create, switch, and manage branches from your phone
- iOS & Android via React Native / Expo
- Multiplexed terminal powered by xterm.js with binary protocol over a single WebSocket
- Session persistence: Rust-native PTY multiplexer keeps your terminal sessions alive
- Command shortcuts: quick bar with customizable terminal commands
- Deep linking: scan a QR code or use
nomadflowcode://add-server?url=...&secret=...
- All-in-one: HTTP API + PTY multiplexer + TUI wizard + daemon mode in one binary
- Interactive TUI: ratatui-based setup wizard and session management
- Native PTY multiplexer: high-performance terminal panes without external dependencies (no tmux, no ttyd)
- Multiplexed WebSocket: multiple terminal panes over a single connection at
/ws/panes - Daemon mode:
nomadflow start/nomadflow stopfor background operation - Graceful shutdown: no orphan processes on Ctrl+C or SIGTERM
- Public tunnels: expose your server via
--publicwith automatic HTTPS subdomain routing
- Shared secret authentication: single secret protects both API and terminal
- Bearer token & Basic Auth: flexible authentication for API and WebView
- WebSocket subprotocol auth: terminal secured via
Sec-WebSocket-Protocol: bearer.<secret>
From source (requires Rust):
git clone https://github.com/fab-uleuh/NomadFlowCode.git
cd NomadFlowCode/nomadflow-rs
cargo build --release
cp target/release/nomadflow ~/.local/bin/nomadflowOn first run, a setup wizard (TUI) creates ~/.nomadflowcode/config.toml — it walks you through choosing an auth password and optionally enabling a public tunnel.
nomadflow link /path/to/my-project
nomadflow serveA QR code is displayed in the terminal. For remote access from anywhere:
nomadflow serve --publicScan the QR code from the NomadFlowCode app — that's it, you're connected.
nomadflow serve # HTTP server in foreground
nomadflow serve --public # with automatic HTTPS tunnel
nomadflow serve --port 9090 # override port
nomadflow web # open web dashboard
nomadflow start / stop # daemon mode
nomadflow link <path> # link an existing repo
nomadflow attach # attach to a running pane
nomadflow --status # display server statusSee the full CLI reference for all options.
The configuration file is created automatically on first launch:
# ~/.nomadflowcode/config.toml
version = 1
[paths]
base_dir = "~/.nomadflowcode"
[api]
port = 8080
[web]
port = 3000
# Uncomment to enable authentication
# [auth]
# secret = "your-secret-here"cd NomadFlowCode/nomadflowcode
pnpm install
pnpm run ios # or: pnpm run android┌─────────────────────────────────────────────────────────┐
│ Mobile App │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐ │
│ │ Servers │→ │ Repos │→ │ Features │→ │Terminal│ │
│ └──────────┘ └──────────┘ └──────────┘ └────────┘ │
│ │ │ │
│ └───── REST API ──────── /ws/panes ───────┘ │
└────────────────────────┬────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Server (nomadflow binary) │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Axum HTTP Server │ │
│ │ /api/list-repos /api/list-features /health │ │
│ │ /api/create-feature /api/switch-feature │ │
│ │ /api/clone-repo /api/list-branches │ │
│ │ /api/list-sessions /api/create-session │ │
│ │ /api/worktree-status /api/file-diff │ │
│ │ /ws/panes (multiplexed binary WebSocket) │ │
│ └──────────────────────┬───────────────────────────┘ │
│ │ │
│ ┌──────────────────────▼───────────────────────────┐ │
│ │ Native PTY Multiplexer │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Pane: │ │ Pane: │ │ Pane: │ ... │ │
│ │ │repo/feat│ │repo/feat│ │ main │ │ │
│ │ └────┬────┘ └────┬────┘ └────┬────┘ │ │
│ └───────┼────────────┼────────────┼────────────────┘ │
│ ▼ ▼ ▼ │
│ Git Worktrees (isolated directories per branch) │
└─────────────────────────────────────────────────────────┘
┌─────────────┐
│ Bore Relay │ (optional, --public)
│ HTTPS via │
│ subdomain │
└─────────────┘
Full architecture details in the documentation.
NomadFlowCode/
├── nomadflow-rs/ # Rust workspace (single binary)
│ ├── src/main.rs # Entry point, CLI args, daemon mode
│ ├── crates/
│ │ ├── nomadflow-core/ # Config, models, shell, git services
│ │ ├── nomadflow-pty/ # Native PTY spawning, pane management
│ │ ├── nomadflow-ws/ # WebSocket protocol, binary framing
│ │ ├── nomadflow-server/ # Axum HTTP server with auth middleware
│ │ ├── nomadflow-tui/ # Ratatui TUI setup wizard
│ │ └── nomadflow-relay/ # Standalone relay for tunnel routing
│ └── Cargo.toml
├── nomadflowcode/ # React Native/Expo mobile app
├── docs/ # Documentation site (Next.js/fumadocs)
└── README.md
- macOS or Linux
- Git with worktree support
- Node.js 18+
- pnpm
- Xcode (iOS) or Android Studio (Android)
NomadFlow uses a single shared secret that protects both:
- REST API: via Bearer token (
Authorization: Bearer <secret>) or Basic Auth - Terminal WebSocket: via subprotocol header (
Sec-WebSocket-Protocol: bearer.<secret>)
Setup:
- Server — add to
~/.nomadflowcode/config.toml:
[auth]
secret = "your-secure-secret"- Mobile — enter the same secret when adding a server in the app.
Without a secret configured, everything works without authentication (suitable for local development).
- Use HTTPS in production (or tunnels with
--public) - Enable authentication with a strong secret
- Firewall: don't expose ports publicly without VPN or tunnel
- Public access: use
nomadflow serve --publicfor automatic HTTPS tunnels
Contributions are welcome!
- Fork the project
- Create your branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push (
git push origin feature/amazing-feature) - Open a Pull Request
Full documentation is available at nomadflowcode.dev — including API reference, configuration guide, tunnel setup, and mobile app usage.
MIT License — see LICENSE for details.
- xterm.js — Web terminal frontend
- portable-pty — Rust PTY spawning
- alacritty_terminal — Terminal state machine
- axum — Rust web framework
- ratatui — Terminal UI framework
- bore — TCP tunnel
- React Native — Mobile framework
- Expo — React Native toolchain
Made with love for nomad developers



