Prerequisites

Before installing TermNode, make sure you have the following:

  • Termux — Install from F-Droid or GitHub releases. The Play Store version is outdated.
  • Go 1.22+ — Install via pkg install golang in Termux.
  • termux-api — Install the package (pkg install termux-api) and the Termux:API Android app. Grant it permissions in Android settings.
  • OpenSSH (optional) — For the SSH server feature: pkg install openssh.

Test that termux-api works:

termux-battery-status

Installation

Option 1: Download Binary (Recommended)

wget https://github.com/Mr-Dark-debug/termnode/releases/latest/download/termnode chmod +x termnode ./termnode

Option 2: Build from Source

git clone https://github.com/Mr-Dark-debug/termnode.git cd termnode go build -o termnode . ./termnode

Option 3: Go Install

go install github.com/Mr-Dark-debug/termnode@latest

Quick Start

Once installed, simply run TermNode. The TUI dashboard launches immediately:

./termnode

Use the function keys or number keys to navigate between screens:

  • F1 or 1 — Hardware Dashboard
  • F2 or 2 — Service Manager
  • F3 or 3 — IoT Event Log
  • F4 or ? — Help & Keybindings

Press q or Ctrl+C to quit.

CLI Options

Usage: termnode [options] Options: -db string Path to SQLite database (default "$HOME/.termnode/termnode.db") -port string HTTP webhook listen address (default ":8080") -debug Enable debug logging to debug.log -version Print version and exit

Hardware Dashboard (F1)

The dashboard provides real-time monitoring of your device's critical hardware metrics, powered by termux-api. Data auto-refreshes every 5 seconds.

Displayed information includes:

  • Battery percentage, status (charging/discharging), health, and temperature
  • Battery current (mA) and charging status
  • CPU usage percentage, core count, architecture, and temperature
  • WiFi SSID, local IP address, and BSSID

Press r to force a manual refresh.

Service Manager (F2)

One-toggle controls for background services:

ServiceDescriptionDefault Port
Wake LockPrevents Android battery optimization from killing your processes
SSH ServerStart/stop the OpenSSH daemon for remote access8022
HTTP File ServerGo-powered file server serving from your home directory8081

Use Up/Down or j/k to navigate, Enter to toggle a service.

IoT Bridge (F3)

Turn your Android phone into a data collection hub for microcontrollers and IoT devices.

The IoT bridge starts an HTTP server that accepts POST requests with sensor data:

curl -X POST http://<phone-ip>:8080/webhook/temperature \ -H "Content-Type: application/json" \ -d '{"sensor":"DHT22","value":23.5,"unit":"celsius"}'

All events are persisted to a local SQLite database and displayed in a scrollable, real-time event log.

Help Screen (F4)

Full keybinding reference and feature documentation, always one keypress away. Displays all available commands and their shortcuts.

Keybindings

KeyAction
F1 or 1Dashboard tab
F2 or 2Services tab
F3 or 3IoT Log tab
F4 or ?Help tab
q or Ctrl+CQuit
/ kMove up
/ jMove down
EnterToggle / Activate
rManual refresh (Dashboard)

IoT Webhook API

POST /webhook/{topic}

Send sensor data to TermNode from any HTTP-capable device. The {topic} parameter is used to categorize the event.

Request:

curl -X POST http://192.168.1.100:8080/webhook/temperature \ -H "Content-Type: application/json" \ -d '{"sensor":"DHT22","value":23.5,"unit":"celsius"}'

Response:

{"status":"ok"}

GET /health

Health check endpoint for monitoring.

{"status":"ok"}

Building from Source

# Default build go build -o termnode . # With version info go build -ldflags="-X main.version=$(git describe --tags)" -o termnode . # With MQTT support (future) go build -tags mqtt -o termnode . # Cross-compile from desktop GOOS=android GOARCH=arm64 go build -o termnode-android .

Make Targets

CommandDescription
makeBuild the binary
make runBuild and run
make testRun tests
make debugBuild and run with debug logging
make cleanRemove binary and logs

Architecture

TermNode uses the Elm Architecture via Bubble Tea. The root model composes screen models, each implementing Init(), Update(), and View().

Project Structure

termnode/ ├── main.go # Thin entry point ├── internal/ │ ├── app/ # Root TUI model & routing │ ├── daemon/ # Wake-lock & process management │ ├── hardware/ # termux-api polling & parsing │ ├── iot/ # HTTP webhook server │ ├── db/ # SQLite repository layer │ ├── screen/ # Individual TUI screens │ └── theme/ # Lipgloss styles & colors ├── migrations/ # SQL schema (embedded in binary) └── plan/ # Development plans & docs

All dependencies are pure Go — zero CGO required. The database auto-migrates on startup via embedded Goose migrations.