CLI Reference
Complete reference for all forkoff commands and options.
Quick install: npm install -g forkoff
forkoff pair
Generate a QR code to pair with the mobile app.
Options
| --local | Use local network relay instead of cloud relay |
Example
forkoff pairforkoff connect
Reconnect a previously paired device and stream sessions to your phone.
Options
| --local | Use local network relay instead of cloud relay |
Example
forkoff connectforkoff status
Show connection status and pairing details.
Example
forkoff statusforkoff disconnect
Disconnect and unpair this device.
Example
forkoff disconnectforkoff remote
Route Claude Code through your self-hosted gateway to use a Claude account hosted on your own server. Full terminal feature parity; credentials never leave the server.
Options
| signup --url <url> --code <invite> | Create a gateway account with an invite code |
| login --url <url> | Log in and store a revocable device key |
| start [--minimal] | Route new claude sessions through the gateway |
| stop | Restore default routing exactly |
| status | Show state and live gateway health |
| logout | Stop and delete the stored gateway key |
Example
forkoff remote start --url https://api.forkoff.appforkoff tools
Detect and configure AI tool integrations.
Options
| --detect | Detect installed AI tools |
| --install-hooks | Install ForkOff hooks for Claude Code |
| --uninstall-hooks | Remove ForkOff hooks |
| --watch | Watch tool status changes |
Example
forkoff tools --install-hooksforkoff startup
Manage automatic startup on login.
Options
| --enable | Enable automatic startup |
| --disable | Disable automatic startup |
| --status | Show startup registration status |
Example
forkoff startup --statusforkoff config
View or modify configuration settings.
Options
| --show | Show current configuration |
| --name <name> | Set device name |
| --port <port> | Set relay server port (local mode) |
| --reset | Reset to defaults |
Example
forkoff config --name "My MBP"forkoff logs
List, view, or clean debug logs.
Options
| --latest | Print path to most recent log |
| --clean | Delete all log files |
Example
forkoff logs --latestConfiguration
ForkOff stores configuration in %APPDATA%\forkoff-cli\config.json on Windows and ~/.config/forkoff-cli/config.json on macOS/Linux. Manage it with the forkoff config command.
Available Settings
| Setting | Default | Description |
|---|---|---|
| deviceName | hostname | Name shown in the mobile app |
| relayMode | cloud | Cloud relay or direct local network relay |
| relayPort | 3000 | Port for the local relay server |
| startupEnabled | true | Launch ForkOff automatically on login |
| remoteGatewayUrl | — | Self-hosted gateway URL for remote mode |
Remote Claude Accounts
Use a Claude account that lives on your own server. forkoff remote routes Claude Code's API traffic through your self-hosted gateway, which injects the account's credentials server-side. Slash commands, skills, hooks, MCP servers, and subagents all keep working — only the network path changes.
forkoff remote login --url https://your-domain.comforkoff remote start# restart claude — new sessions now route through your gatewayforkoff remote stopYour machine only stores a revocable gateway key. The Claude account token stays on your server, encrypted at rest. Set up the server side with the gateway self-hosting guide.
Features that require a claude.ai login are unavailable while remote mode is active: Remote Control, voice dictation, /schedule, /code-review ultra, claude.ai connectors, /fast, and /usage.
Security
ForkOff takes security seriously. Here's how we protect your code:
End-to-End Encryption
All communication between your devices is encrypted using TLS 1.3. Your code and commands never pass through our servers unencrypted.
Local-First Architecture
The CLI runs entirely on your machine. We only relay encrypted messages between your devices. We can't see your code.
No Account Required
Start using ForkOff without creating an account. Device pairing uses cryptographic keys, not passwords.
Troubleshooting
QR code won't scan
Make sure your phone and computer are on the same network. Try:
forkoff pair --port 9877Connection keeps dropping
Check your firewall settings. ForkOff needs port 9876 (or your configured port) open for local connections.
Claude integration not working
Reinstall the hooks and restart Claude Code:
forkoff tools --uninstall-hooksforkoff tools --install-hooks