CLI Reference
Complete reference for all flexx CLI commands. Install, authenticate, connect, and manage remotes from the terminal.
Global flags
flexx [command] --help Show help for any commandCommands
flexx setup
Authenticate, register this machine, and print MCP config. Does not start the daemon.
flexx setupAfter setup, start a connection:
flexx service install # always-on (recommended)
flexx connect # foreground
flexx connect --daemon # backgroundflexx connect
Start the daemon and connect to the relay server.
flexx connect # Foreground
flexx connect --daemon # Background (detached)| Flag | Description |
|---|---|
--daemon | Run in background, write PID to ~/.flexx/flexx.pid |
flexx auth
Manage authentication.
flexx auth login # Browser login or API key prompt
flexx auth login --api-key=… # Non-interactive
flexx auth logout # Remove stored credentials
flexx auth whoami # Show current auth statusAPI keys start with flexx_ and can be generated from Dashboard → Settings → API Keys.
flexx remote
Manage remote machines.
flexx remote init # Register this machine
flexx remote list # List all remotes (alias: ls)
flexx remote unregister # Delete this remote (with confirmation)flexx remote init also configures the SSH ProxyCommand for flexx-* hosts automatically.
flexx ssh
Show SSH connection info for a remote.
flexx ssh my-serverThis displays the SSH command. To connect directly:
ssh flexx-my-serverThe SSH ProxyCommand is auto-configured by flexx remote init.
flexx mcp
MCP helpers.
flexx mcp config # Print MCP JSON configurationOutputs the JSON block with your relay URL and API key, ready to paste into Cursor, Claude Desktop, or any MCP client.
flexx service
Manage flexx as a user service (starts on login).
flexx service install # Install service (Linux / macOS / Windows)
flexx service uninstall # Remove service
flexx service status # Show service status
flexx service start # Start the service
flexx service stop # Stop the service
flexx service restart # Restart the service
flexx service logs # Stream logs| Platform | Mechanism |
|---|---|
| Linux | systemd user unit |
| macOS | LaunchAgent |
| Windows | Task Scheduler (user-level, no admin) |
flexx status
Show daemon PID, running state, and remote connection status.
flexx statusflexx update
Self-update to the latest version from cli.flexx.dev.
flexx updateflexx version
Print version and build commit.
flexx versionConfiguration files
| File | Purpose |
|---|---|
~/.flexx/config.json | API URL and API key |
~/.flexx/remote.json | Remote ID, relay URL, secret, workspace path |
~/.flexx/flexx.pid | PID of background daemon |
~/.flexx/daemon.log | Daemon log file |
Setup Guide — From Install to AI-Ready
Go from installing flexx to having AI agents reach your machine in under two minutes. flexx setup authenticates and registers the machine; flexx connect (or flexx service install) brings it online.
MCP Configuration for AI Agents
Configure Cursor, Claude Desktop, ChatGPT, OpenAI Codex, and other MCP-compatible AI tools to connect to your machine via flexx. Includes config snippets and the complete list of available MCP tools.