Command-Line Reference

The TranNAP client is a single self-contained binary named trannap (or trannap.exe on Windows). It exposes a small command-line interface (CLI) built on top of Cobra . This page documents every command and flag.

On Windows you run the binary as trannap.exe. On macOS and Linux it is ./trannap (after chmod +x). The examples below use trannap for brevity.

Overview

trannap [command]

Running trannap without a subcommand (or with trannap help) prints the list of available commands:

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  install     Install TranNAP as a system service
  restart     Restart TranNAP service
  run         Run the TranNAP client in the foreground
  start       Start TranNAP service
  status      Check TranNAP service status
  stop        Stop TranNAP service
  uninstall   Uninstall TranNAP
  update      Update TranNAP to the latest version
  version     Print version info

Flags:
  -h, --help   help for trannap

For help on any command at any time, append --help, e.g. trannap run --help.

Commands

run — Run in the foreground

trannap run [flags]

Starts the TranNAP client in the current terminal and keeps it running until you stop it (Ctrl+C). This is the most direct way to use TranNAP and is useful for testing or for running it under your own process supervisor.

FlagDescription
--device-token stringDevice token for authentication. Required to connect the client to your account.
-h, --helpHelp for run.

Example:

trannap run --device-token=YOUR_DEVICE_TOKEN

install — Install as a system service

trannap install [flags]

Registers TranNAP as a system service (Windows service / systemd unit) so it starts automatically and keeps running in the background. This is the recommended way to run TranNAP in production; see Keep TranNAP Running for details.

A successful install automatically starts the service for you, so you normally do not need to run trannap start afterwards.
FlagDescription
--device-token stringDevice token for authentication. Required so the installed service can authenticate on every start.
-h, --helpHelp for install.

Example:

trannap install --device-token=YOUR_DEVICE_TOKEN

start — Start the service

trannap start [flags]

Starts the previously installed TranNAP service without reinstalling it.

FlagDescription
-h, --helpHelp for start.

stop — Stop the service

trannap stop [flags]

Stops the running TranNAP service.

FlagDescription
-h, --helpHelp for stop.

restart — Restart the service

trannap restart [flags]

Stops and then starts the TranNAP service in one step (for example, after changing configuration).

FlagDescription
-h, --helpHelp for restart.

status — Check service status

trannap status [flags]

Reports whether the TranNAP service is installed and its current running state.

FlagDescription
-h, --helpHelp for status.

uninstall — Uninstall

trannap uninstall [flags]

Removes the TranNAP system service that was created with install. The trannap binary itself is also deleted during a successful uninstall.

FlagDescription
-h, --helpHelp for uninstall.

update — Update TranNAP

trannap update [flags]

Updates the TranNAP binary to the latest version. It can also be used to check for new releases or to switch/rollback to a specific version.

FlagDescription
--checkOnly check for updates; do not download or apply anything.
--rollbackRoll back to the previously installed version.
--version stringSwitch to a specific version instead of the latest.
-h, --helpHelp for update.

Examples:

trannap update            # update to the latest version
trannap update --check    # just check if a newer version exists
trannap update --version v1.2.3   # switch to a specific version
trannap update --rollback # revert to the previous version

version — Print version info

trannap version [flags]

Prints version information about the running binary.

FlagDescription
--shortPrint only the version number (no extra details).
-h, --helpHelp for version.

completion — Shell completion

trannap completion [command]

Generates an autocompletion script for your shell so you can tab-complete trannap commands and flags. Supported shells:

  • trannap completion bash
  • trannap completion fish
  • trannap completion powershell
  • trannap completion zsh

Use trannap completion [shell] --help for instructions on how to load the generated script into your shell.

help — Help about any command

trannap help [command]

Displays help for trannap itself or for a specific subcommand. Equivalent to passing --help to a command.

Typical workflow

  1. trannap install --device-token=YOUR_DEVICE_TOKEN — install and run as a service (it starts automatically, so no manual start is needed).
  2. trannap status — verify it is running.
  3. trannap restart — apply changes after editing configuration.
  4. trannap update — keep the binary up to date.
  5. trannap uninstall — remove both the service and the binary when no longer needed.

For a guided, illustrated walkthrough, see Getting Started and Keep TranNAP Running .