CLI Overview
The Hamtrax CLI is a small, focused command-line tool for logging POTA contacts, managing activations, and integrating Hamtrax into your scripts and custom hardware. It's designed to be operated by both humans at a terminal and AI agents calling commands programmatically.
What it does
The CLI exposes a deliberately small slice of Hamtrax functionality -- the parts you actually need from a terminal:
- whoami -- show your callsign, plan, tier, and native QSO count.
- List folders, contacts, and activations.
- Create activations (with idempotent find-or-create semantics).
- Create QSOs in any of your folders -- POTA fields auto-populate when you log into an activation folder.
- Delete QSOs (requires an
elevatedkey).
Everything else -- imports, exports, maps -- stays in the web app and the iOS/Android Capacitor builds. The CLI is the integration surface, not a replacement.
Who it's for
- Portable operators running a Raspberry Pi or laptop in the field who want to script their logging flow.
- Custom hardware builders wiring Hamtrax into rig-control software, foot-switch loggers, or display panels.
- AI agents that need a stable, machine-readable API for logging contacts on a user's behalf -- see AI Agent Guide.
- Power users who prefer keyboard over UI for repetitive logging.
How it works
The CLI is a thin Node.js wrapper over a versioned HTTPS API hosted on Hamtrax's Cloud Functions. Each request authenticates with an API key you generate in the web app -- the key is hashed (SHA-256) on the server and shown only once at creation time. See Auth and Keys for the full lifecycle.
$ hamtrax activations create --reference K-1234 --callsign N0CALL
Activation K-1234 ready (folder: act_8a4f...)
$ hamtrax contacts create --callsign W1AW --mode FT8 --frequency 14.074 --folder act_8a4f...
QSO logged (id: qso_92b1...)
Agent-friendly by design
The CLI is built with three principles that matter for automation:
- Stable exit codes -- every error class maps to a deterministic exit code (see AI Agent Guide).
- Structured output --
--jsonfor one-shot calls,--ndjsonfor streaming list output into pipelines. - Self-describing help --
hamtrax help --alldumps the entire command tree to stdout andhamtrax --help-jsonemits a machine-readable manifest, both versioned alongside the API.
What's next
- Install the CLI -- one
npm i -gaway. - Generate an API key -- 60 seconds in the web app.
- Worked examples -- log a POTA contact, run an activation end-to-end.
- AI Agent Guide -- env-var auth, JSON output, exit-code table, sample LLM prompts.