Open-source serial terminal

A simple serial terminal for the command line.

Pick a device and a baud rate, and you're connected. Use the interactive picker yourself, or run the plain commands from scripts and AI agents.

curl -fsSL https://raw.githubusercontent.com/eliachiarucci/serterm/main/install.sh | sh
View on GitHub
serterm
live demo
Demo of serterm: the interactive device picker lists connected serial devices; a device is selected, the baud rate is chosen, and the terminal view streams output from the device while commands are typed and sent.
Run serterm with no arguments to open the device picker. Sent messages are echoed prefixed with →

01 / Features

What you need to talk to a board.

An interactive picker when you're at the keyboard, plain stdout when a script or an AI agent is running it.

F.01TUI

Interactive device picker

Run serterm and choose from the connected devices. USB devices are listed first, and the duplicate macOS /dev/tty.* entries are hidden.

↑↓select ←→baud rate enterconnect
F.02CLI

Scriptable from the shell

serterm open connects and streams logs to stdout until interrupted, so you can pipe it, grep it, or redirect it to a file.

$ serterm open /dev/cu.usbmodem1101 -b 9600 -ca 5
F.03I/O

Send & capture

Send a command and capture the reply with -s and -ca, or fire a message and close with -c. Commands exit on their own, which makes them easy to run from scripts and agents.

$ serterm open … -s "status" -ca 3
F.04LOG

Save logs

Hit ctrl+s in the terminal view to save the output stream to a log file. ctrl+l clears it.

F.05UX

Feels native

serterm never captures the mouse, so your terminal's own text selection and copy shortcuts work as usual. The output still scrolls with the mouse wheel.

F.06BIN

Single binary

A single self-contained binary with no runtime dependencies. Install script for macOS and Linux, zips for Windows, packages for Linux distros. serterm update installs the latest release.

macOSLinuxWindows .deb.rpm.apk

02 / Install

Install serterm

One command on macOS and Linux, a zip on Windows, and .deb, .rpm and .apk packages. You can also build it from source with Go.

Already installed?
serterm update fetches the latest release.

macOS / Linux

Run the install script. Later, serterm update updates to the latest release by running the same script.

curl -fsSL https://raw.githubusercontent.com/eliachiarucci/serterm/main/install.sh | sh

Then plug in a board and run serterm. Check the installed version with serterm --version.

03 / Usage

Commands and keys

Running serterm with no arguments starts the interactive device picker. There are also a few subcommands for when you want plain output.

Commandsserterm
CommandAction
sertermstart the interactive device picker
serterm listlist connected serial devices (device, tab, description)
serterm open <device> [flags]connect and stream logs to stdout until interrupted (ctrl+c)
serterm updateupdate serterm to the latest release (runs the install script)
serterm helpshow usage
serterm --versionprint the version
open flagsserterm open
FlagAction
-b, --baud Nbaud rate default 115200
-s, --send TEXTsend TEXT to the device after opening, \n appended (the response shows up in the stream)
-ca, --close-after Nexit after N seconds max 60
-c, --closeclose right after sending, without reading a response (use with --send to just fire a message)
Examples
# open the interactive device picker
serterm

# capture 5 seconds of logs
serterm open /dev/cu.usbmodem1101 -b 9600 -ca 5

# send a command, capture the reply
serterm open /dev/cu.usbmodem1101 -s "status" -ca 3

# just send a message and close
serterm open /dev/cu.usbmodem1101 -s "reboot" -c
Device pickerkeys
  • ↑/↓select device
  • ←/→change baud rate (default 115200)
  • enterconnect
  • rrefresh device list
  • qquit
USB devices are listed first, and macOS /dev/tty.* duplicates are hidden. Plugged in a new board? Press r to refresh the list.
Terminalkeys
  • entersend the input line (a \n is appended)
  • ctrl+ssave the output stream to a log file
  • ctrl+lclear the output stream
  • ctrl+dback to the device picker
  • pgup/pgdnscroll the output
  • ctrl+cquit
The output also scrolls with the mouse wheel. Sent messages are echoed in the stream prefixed with →. If the device is unplugged, a notice appears and ctrl+d returns to the picker.

Plug in a board
and run serterm.

$serterm