Skip to main content

CLI / HTTP API

Truvami Decoder is a command-line interface (CLI) tool written in Go for decoding Truvami payloads. This reference implementation supports various payload types, including nomad XS and different tag formats. 🛠ī¸

Github Repository

đŸŽŦ Demo​

Check out this demo to see Truvami Decoder in action! 👇

Demo

🌟 Features​

  • 🔍 Payload Decoding: Decode nomad XS, tag S/L, and tag XL payloads with ease.
  • 📄 Flexible Output: Choose between standard console output and JSON format.
  • 🛠ī¸ Debugging & Verbosity: Enable debugging and verbose output for detailed insights.

đŸ“Ļ Installation​

🔧 Binaries​

You can install the Truvami Decoder binary easily using the following command:

# This will install the binary at $(go env GOPATH)/bin/decoder
curl -sSfL https://raw.githubusercontent.com/truvami/decoder/main/install.sh | sh -s -- -b $(go env GOPATH)/bin

# ✅ Verify the installation by checking the help
decoder --help

đŸ–Ĩī¸ Windows​

For Windows users, you can install the Truvami Decoder binary using Chocolatey:

# Install using Chocolatey
choco install Truvami-decoder

# ✅ Verify the installation by checking the help
decoder --help

🛠ī¸ Usage​

Truvami Decoder provides a variety of commands and options to help you decode payloads efficiently. Below is an overview of the available commands and flags.

🗂ī¸ Basic Command Structure​

decoder [command] [flags]

📝 Available Commands​

  • completion - 🖋ī¸ Generate the autocompletion script for the specified shell.
  • help - ℹī¸ Display help information about any command.
  • nomadxs - 🧩 Decode nomad XS payloads.
  • tagsl - 🏷ī¸ Decode tag S / L payloads.
  • tagxl - 🏷ī¸ Decode tag XL payloads.

🚩 Global Flags​

  • -d, --debug - 🐛 Display debugging output in the console. (default: false)
  • -h, --help - ℹī¸ Display help information.
  • -j, --json - 📄 Output the result in JSON format. (default: false)
  • -v, --verbose - đŸ“ĸ Display more verbose output in the console. (default: false)

💡 Example Usage​

# 🔍 Decode a nomad XS payload with verbose output
decoder nomadxs -v

# 📝 Decode a tag S / L payload and output the result in JSON format
decoder tagsl -j

# 🖋ī¸ Generate autocompletion script for bash
decoder completion bash

For more detailed information on each command, use:

decoder [command] --help