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

--localUse local network relay instead of cloud relay

Example

bash
forkoff pair

forkoff connect

Reconnect a previously paired device and stream sessions to your phone.

Options

--localUse local network relay instead of cloud relay

Example

bash
forkoff connect

forkoff status

Show connection status and pairing details.

Example

bash
forkoff status

forkoff disconnect

Disconnect and unpair this device.

Example

bash
forkoff disconnect

forkoff 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
stopRestore default routing exactly
statusShow state and live gateway health
logoutStop and delete the stored gateway key

Example

bash
forkoff remote start --url https://api.forkoff.app

forkoff tools

Detect and configure AI tool integrations.

Options

--detectDetect installed AI tools
--install-hooksInstall ForkOff hooks for Claude Code
--uninstall-hooksRemove ForkOff hooks
--watchWatch tool status changes

Example

bash
forkoff tools --install-hooks

forkoff startup

Manage automatic startup on login.

Options

--enableEnable automatic startup
--disableDisable automatic startup
--statusShow startup registration status

Example

bash
forkoff startup --status

forkoff config

View or modify configuration settings.

Options

--showShow current configuration
--name <name>Set device name
--port <port>Set relay server port (local mode)
--resetReset to defaults

Example

bash
forkoff config --name "My MBP"

forkoff logs

List, view, or clean debug logs.

Options

--latestPrint path to most recent log
--cleanDelete all log files

Example

bash
forkoff logs --latest

Configuration

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

SettingDefaultDescription
deviceNamehostnameName shown in the mobile app
relayModecloudCloud relay or direct local network relay
relayPort3000Port for the local relay server
startupEnabledtrueLaunch ForkOff automatically on login
remoteGatewayUrlSelf-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.

bash
forkoff remote login --url https://your-domain.com
forkoff remote start
# restart claude — new sessions now route through your gateway
forkoff remote stop

Your 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:

bash
forkoff pair --port 9877

Connection 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:

bash
forkoff tools --uninstall-hooks
forkoff tools --install-hooks