flexx logoflexx docs

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 command

Commands

flexx setup

Authenticate, register this machine, and print MCP config. Does not start the daemon.

flexx setup

After setup, start a connection:

flexx service install   # always-on (recommended)
flexx connect           # foreground
flexx connect --daemon  # background

flexx connect

Start the daemon and connect to the relay server.

flexx connect           # Foreground
flexx connect --daemon  # Background (detached)
FlagDescription
--daemonRun 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 status

API 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-server

This displays the SSH command. To connect directly:

ssh flexx-my-server

The SSH ProxyCommand is auto-configured by flexx remote init.

flexx mcp

MCP helpers.

flexx mcp config    # Print MCP JSON configuration

Outputs 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
PlatformMechanism
Linuxsystemd user unit
macOSLaunchAgent
WindowsTask Scheduler (user-level, no admin)

flexx status

Show daemon PID, running state, and remote connection status.

flexx status

flexx update

Self-update to the latest version from cli.flexx.dev.

flexx update

flexx version

Print version and build commit.

flexx version

Configuration files

FilePurpose
~/.flexx/config.jsonAPI URL and API key
~/.flexx/remote.jsonRemote ID, relay URL, secret, workspace path
~/.flexx/flexx.pidPID of background daemon
~/.flexx/daemon.logDaemon log file

On this page