atptid

A command-line tool for generating and parsing AT Protocol TID strings.

TIDs (Timestamp Identifiers) are used as record keys throughout AT Protocol. atptid generates new TIDs, produces multiple TIDs at once, and converts between TID strings and their underlying microsecond timestamps.

Install

brew tap ngerakines/tap
brew install atptid

Help

$ atptid --help
A command-line tool for generating and parsing AT Protocol TIDs (Timestamp
Identifiers). TIDs are 13-character base32-sortable strings combining a
microsecond timestamp with a random clock identifier.

MODES:
  Generate:  atptid              Generate a single TID
  Batch:     atptid -n 5         Generate multiple TIDs
  Parse:     atptid <tid>        Parse a TID and display its timestamp
  Validate:  atptid -q <tid>     Validate a TID (exit 1 if invalid)
  From time: atptid <timestamp>  Generate a TID from microsecond timestamp

EXAMPLES:
  atptid
  atptid -n 10
  atptid 3mgn37sytoc2c
  atptid -q 3mgn37sytoc2c
  atptid 1773067572000000


Usage: atptid [OPTIONS] [INPUT]

Arguments:
  [INPUT]
          TID to parse, or microsecond timestamp to generate a TID from

Options:
  -n, --count <COUNT>
          Number of TIDs to generate

  -q, --quiet
          Quiet mode - validate without output, exit 1 if invalid

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version