Skip to content

CLI Flags

Usage shape:

Terminal window
term-serve [options] [command [args...]]

Options must appear before positional command.

FlagMeaning
-p, --port <port>Port to listen on (default 31337)
`—host <ipname>`
--publicAlias for --host 0.0.0.0
--auth-token <secret>Require token for WebSocket connections
-C, --cwd <path>Start shell/command in this directory
--config <path>Load config from explicit file path
-t, --theme <name>Set terminal theme ID
--list-themesPrint supported terminal theme IDs
--font <font>Set terminal font family
--font-size <size[,mobile_size]>Set terminal font size(s)
--verboseEnable debug logs
-v, --versionShow version
-h, --helpShow usage help

When you provide a command, term-serve runs that command in the PTY on client connect.

Terminal window
term-serve htop -d 10
term-serve --cwd ~/projects opencode

Use -- to avoid parsing command args as term-serve options:

Terminal window
term-serve --port 4141 -- rg --hidden TODO src