go-cli

command module
v0.0.0-...-1ae09b1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 1 Imported by: 0

README

Garmin Messenger CLI (Go)

Command-line interface for Garmin Messenger (Hermes) — send, receive, and manage satellite messages from your terminal.

Built on the Go library.

Install

cd garmin-messenger

# Build the binary
make build-go-cli    # outputs build/go/garmin-messenger

# Or build directly
cd apps/go-cli
go build -o ../../build/go/garmin-messenger .

Authentication

# First time — sends an SMS code, then prompts you to enter it
garmin-messenger login --phone "+1234567890"
# Enter SMS OTP code: 123456
# Authenticated! instance=...

# All subsequent commands reuse the saved session (~/.garmin-messenger/)
garmin-messenger conversations

Commands

conversations

List recent conversations with member names and last message preview.

garmin-messenger conversations
garmin-messenger conversations --limit 50
garmin-messenger conversations --yaml
messages

Show messages from a conversation.

garmin-messenger messages CONVERSATION_ID
garmin-messenger messages CONVERSATION_ID --limit 50
garmin-messenger messages CONVERSATION_ID --uuid    # show message/sender UUIDs
send

Send a message with optional GPS location and media attachment.

# Simple text message
garmin-messenger send --to "+1234567890" --message "Hello from base!"

# With GPS coordinates
garmin-messenger send --to "+1234567890" --message "At camp" \
    --lat 48.8566 --lon 2.3522 --elevation 35.0

# With media attachment (AVIF image or OGG audio)
garmin-messenger send --to "+1234567890" --message "Photo from camp" \
    --file photo.avif
media

Download a media attachment (photo or voice message) from a message. The messages and listen commands print copy-pasteable media commands for messages with attachments.

# Download using IDs from messages/listen output
garmin-messenger media CONVERSATION_ID MESSAGE_ID \
    --media-id MEDIA_ID --media-type ImageAvif

# Auto-detect media from conversation (fetches message details)
garmin-messenger media CONVERSATION_ID MESSAGE_ID

# Save to a specific file
garmin-messenger media CONVERSATION_ID MESSAGE_ID -o photo.avif
listen

Listen for incoming messages in real time via WebSocket. Press Ctrl+C to stop.

garmin-messenger listen
garmin-messenger listen --uuid    # show conversation/message/sender UUIDs
garmin-messenger listen --yaml    # YAML output format

Automatically marks incoming messages as delivered. Messages with media attachments include a copy-pasteable garmin-messenger media download command.

members

Show members of a conversation with their phone numbers and display names.

garmin-messenger members CONVERSATION_ID
mute / muted

Mute or unmute conversation notifications. List muted conversations.

garmin-messenger mute CONVERSATION_ID          # mute
garmin-messenger mute CONVERSATION_ID --off    # unmute
garmin-messenger muted                         # list all muted
sync-contacts

Fetch conversation members from the server and merge into local contacts.yaml. This populates friendly names for UUID-based sender identifiers.

garmin-messenger sync-contacts
garmin-messenger sync-contacts --limit 200   # scan more conversations (default: 100)
device-metadata

Show satellite device metadata (IMEI, device type, satellite message details) for specific messages.

garmin-messenger device-metadata CONVERSATION_ID MESSAGE_ID_1 MESSAGE_ID_2
network

Show network properties (Iridium satellite network status).

garmin-messenger network
login

Authenticate via SMS OTP and save the session.

garmin-messenger login --phone "+1234567890"
garmin-messenger login --phone "+1234567890" --device-name "My Laptop"
mcp

Start an MCP (Model Context Protocol) server on stdio for LLM integration with Claude Desktop, Claude Code, and other MCP clients.

garmin-messenger mcp
garmin-messenger mcp --verbose    # debug logging to stderr

Tools: login_request_otp, login_confirm_otp, send_message, send_media_message, mark_as_read, download_media, sync_contacts, listen, stop

Resources: garmin://status, garmin://conversations, garmin://conversations/{id}/messages, garmin://conversations/{id}/members, garmin://contacts

Configure in Claude Code:

# Linux (amd64) — for other platforms see Releases page
curl -Lo garmin-messenger https://github.com/slush-dev/garmin-messenger/releases/latest/download/garmin-messenger-linux-amd64
chmod +x garmin-messenger
claude mcp add garmin-messenger -- ./garmin-messenger mcp

Global Options

All commands accept these options:

Option Description
--session-dir PATH Credential storage directory (default: ~/.garmin-messenger)
--verbose / -v Enable debug logging
--yaml Output in YAML format (where supported)

The session directory can also be set via the GARMIN_SESSION_DIR environment variable.

Contact Management

The CLI maintains a local contacts.yaml file in the session directory that maps UUIDs to friendly names. This is used to display human-readable sender names instead of raw UUIDs.

# Populate contacts from server
garmin-messenger sync-contacts

# Contacts are automatically used in conversations, messages, and listen output
garmin-messenger conversations    # shows member names
garmin-messenger listen           # shows sender names

The contacts file can also be edited manually to set custom display names.

Testing

cd apps/go-cli
go test ./... -v

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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