serterm

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 13 Imported by: 0

README

SerTerm

CI

A simple serial terminal for the command line. Pick a device, watch its output stream, type on the bottom line to send messages back.

Built for talking to Arduinos, STM32 boards, and anything else that speaks serial.

SerTerm

Install

macOS / Linux

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

Installs the latest release to /usr/local/bin (or ~/.local/bin if that isn't writable).

Windows

Download the zip for your architecture from the latest release, extract serterm.exe, and put it somewhere on your PATH.

Packages

.deb, .rpm, and .apk packages are attached to each release.

With Go

go install github.com/eliachiarucci/serterm@latest

Or build from source (see Build below).

Usage

serterm

serterm -version prints the version.

Device picker

Key Action
↑/↓ select device
←/→ change baud rate (default 115200)
enter connect
r refresh device list
q quit

Terminal

Key Action
enter send the input line (a \n is appended)
ctrl+l clear the output stream
ctrl+d back to the device picker
pgup/pgdn scroll the output
ctrl+c quit

Sent messages are echoed in the stream prefixed with →. If the device is unplugged, a notice appears and ctrl+d returns to the picker.

Build

go build -ldflags="-s -w" -o serterm .

Produces a single self-contained binary, no runtime dependencies.

Test

go test ./...

Code layout

  • main.go — root model; switches between the two screens
  • ports.go — device discovery (hides macOS /dev/tty.* duplicates, USB first)
  • picker.go — device selection screen
  • terminal.go — streaming view, input line, serial reader goroutine
  • styles.go — shared lipgloss styles

License

MIT

Documentation

Overview

SerTerm is a small serial terminal for the command line.

It shows a list of serial devices to pick from, then streams the device's output while a reserved bottom line accepts messages to send. Ctrl+D returns to the device list, Ctrl+C quits.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL