SerialHub is a cross-platform serial and TCP terminal built with Textual. It runs either as a native terminal app or as the same Textual UI served locally in a browser, with local user profiles, persistent device workspaces, command-config buttons, and per-device session logging.
- Serial and TCP/IP connection workflows in one app
- Native terminal mode and browser-served Textual mode
- Local username-based profiles with optional remember-me startup
- Persistent per-device workspace tabs and stream history
- Per-user command-config JSON files and a built-in config editor
- Per-device logging with automatic filename generation
- Theme toggle plus keyboard shortcuts for common actions
- Python
3.12or newer for development or source-based runs - A terminal that can run Textual apps for terminal mode
- A modern browser for browser mode
- Serial permissions or device access on your OS
Windows executable builds are produced locally. Cloud CI does not build release binaries for this repo.
- Build on Windows with
scripts\build_release.ps1. The output is a single.exenamedSerialHub-v#, where#is the release version. - On Linux, build the same Windows
.exewith Docker using./scripts/build_release_docker.sh 2.0. - By default, the script uses the package version. Pass
-Version 2.0to build a specific release version. - Use
-InstallDependencieswhen the local environment still needs PyInstaller installed. - Commit the release executable as
dist/SerialHub-v*.exebefore pushing av*tag. - Tags matching
v*publish the committed local executable to GitHub Releases when the file is present. - To brand the Windows executable, place a Windows
.icofile atsrc/serialhub/assets/app.ico; the local PyInstaller step will use it automatically when present.
End users on Windows can download SerialHub-v*.exe from the GitHub release assets or from the repository dist/ folder, then run the executable directly. No Python installation or source checkout is required for normal end-user use.
Linux end users can install SerialHub with one command:
curl -fsSL https://raw.githubusercontent.com/diedasman/SerialHub/main/scripts/install_linux.sh | bashThe installer creates an isolated virtual environment under ~/.local/share/serialhub, installs SerialHub into it, and adds a serialhub launcher at ~/.local/bin/serialhub. After installation, run the app from any terminal:
serialhubIf your shell cannot find serialhub, add ~/.local/bin to your PATH and open a new terminal:
export PATH="$HOME/.local/bin:$PATH"Linux install requirements:
- Python
3.12or newer - The Python
venvmodule, such aspython3.12-venvon Debian or Ubuntu - Serial device permissions for your user, often through the
dialoutoruucpgroup depending on your distribution
To install a tagged version instead of main, set SERIALHUB_REF:
curl -fsSL https://raw.githubusercontent.com/diedasman/SerialHub/main/scripts/install_linux.sh | env SERIALHUB_REF=v2.0 bashUse a local virtual environment for development and testing.
Windows PowerShell shortcut from the project root:
. .\scripts\dev_setup.ps1Manual setup:
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e .[dev]Linux manual setup:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[dev]If you use VS Code, point it at the virtual-environment interpreter so imports resolve correctly.
Terminal mode:
python -m serialhubBrowser mode:
python -m serialhub --webTo bind a different browser host or port:
python -m serialhub --web --host 0.0.0.0 --port 8000By default SerialHub stores local app data in a per-user application-data folder:
- Windows:
%LOCALAPPDATA%\SerialHub - Linux:
$XDG_DATA_HOME/SerialHubor~/.local/share/SerialHub
Override the storage location with SERIALHUB_DATA_DIR if needed.
- Enter a username on the login screen.
- Optional: enable
Remember Meto sign back into that local profile automatically next time. - Use
New Useronce to create the local profile and starter command files. - Refresh ports, choose a
SerialorTCP/IPconnection, and connect. - Optional: set a log folder or explicit
.txtlog path. - Optional: choose a command config in the
Functionspanel. - Start sending and receiving data in the workspace tab for that device.
Browser mode serves the same Textual app locally; it is not a separate frontend.
- Select a serial device or TCP target and connect.
- Work in that device's raw-stream workspace tab.
- Use the TX input to send payloads, or enable
HEX TXfor hex data. - Toggle timestamps and logging as needed.
- Use the
Functionspanel to send configured commands. - Open
CONFIG EDITORto edit or preview command-config JSON files.
Keyboard shortcuts:
M: focus the TX message inputD: connect or disconnect the selected deviceL: start or stop logging for the active sessionCtrl+Q: log outCtrl+T: toggle theme
Runtime user data lives under the SerialHub data directory. For a user named alice, the layout looks like this:
<SerialHub data dir>/
users/
alice/
alice.json
configs/
alice_cmds.json
blank.json
logs/
COM3-20260418-210000.txt
message_history.txt
Important behaviors:
- If
Log filepathpoints to an existing folder, SerialHub generates the filename automatically. - If
Log filepathpoints to a.txtfile, SerialHub writes to that exact file. LOG_FOLDERin the user profile is mirrored into the app'sLog filepathinput.
Example override:
$env:SERIALHUB_DATA_DIR = "D:\SerialHubData"
python -m serialhubpython -m pytest
python -m ruff check src tests
python -m compileall src tests
.\scripts\build_release.ps1 -Version 2.0 -InstallDependencies
./scripts/build_release_docker.sh 2.0src/serialhub/: application sourcetests/: automated teststools/: optional development and manual-testing helpersscripts/dev_setup.ps1: Windows development bootstrap helper
- License:
GPLv3(LICENSE) - Contribution guide: CONTRIBUTING.md
- Changelog: CHANGELOG.md
- CI and release upload automation:
.github/workflows/ci.yml
