CLI Reference

The SerialFlow CLI connects local serial devices to SerialFlow from your terminal.

Installation

macOS:

brew install nirosoftware/serialflow/serialflow

Linux:

curl -fsSL https://github.com/Nirosoftware/serialflow-releases/releases/latest/download/serialflow-linux-x64 -o serialflow
chmod +x serialflow
sudo install -m 0755 serialflow /usr/local/bin/serialflow

On Linux ARM64, replace serialflow-linux-x64 with serialflow-linux-arm64.

Windows:

winget install --id Nirosoftware.SerialFlow --exact --source winget

Then verify the install:

serialflow --version

Upgrade later on Windows with:

winget upgrade --id Nirosoftware.SerialFlow --exact

For platform-specific installation steps, see CLI Installation.

Authentication

serialflow auth login

Start the OAuth device-flow login:

serialflow auth login

On success, the CLI opens a browser, asks you to confirm the device code, stores the resulting token in the OS keychain, and prints Logged in..

Supported user-facing option:

Option Description
--scope <scope> Request a specific OAuth scope

serialflow auth status

Show whether the CLI currently has a stored login token:

serialflow auth status

Use --json for machine-readable output:

serialflow auth status --json

serialflow auth logout

Revoke the current CLI session token when possible, then clear the stored keychain token:

serialflow auth logout

Device Discovery

serialflow device list

List serial ports visible on the local machine:

serialflow device list

Use --json to print a JSON array instead of text:

serialflow device list --json

The text output looks like this:

Available serial ports:
  /dev/tty.usbserial-1234  (USB FTDI, vid:0x0403 pid:0x6001)

Device Connection

serialflow device connect <path>

Connect a local serial port and register it with SerialFlow:

serialflow device connect /dev/ttyUSB0

Set the baud rate and device name explicitly:

serialflow device connect /dev/ttyUSB0 --baud 115200 --name 'Lab ESP32'

Supported options:

Option Description
--baud <baud> Serial baud rate. Default: 115200
--name <name> Name to register for the connected device
--token <token> Use an explicit CLI token instead of the stored keychain token
--timeout <seconds> Connection timeout in seconds. Default: 10
--heartbeat-interval <seconds> Heartbeat interval in seconds. Default: 15
--serial-read-timeout-ms <ms> Serial read timeout in milliseconds. Default: 20

If --token is omitted, the CLI uses the token stored by serialflow auth login.

Version

serialflow version

Print the CLI version:

serialflow version

The root command also supports serialflow --version.

Global Options

All commands support these global options:

Option Description
--log-level <level> Set log verbosity
-v, --verbose Shortcut for debug logging
-q, --quiet Reduce log noise
--log-file <path> Write logs to a file

See Also