Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands Overview

idt provides the following commands for working with identifiers:

CommandAliasDescription
gengGenerate new IDs
inspectiAnalyze and decode IDs
convertcConvert between formats
validatevCheck if input is valid
compare-Compare two IDs
sortsSort IDs by timestamp
info-Show ID type information

Global Options

These options work with all commands:

OptionDescription
-j, --jsonOutput in JSON format
-p, --prettyPretty-print JSON output
--no-colorDisable colored output
-h, --helpShow help information
-V, --versionShow version

Command Aliases

For faster typing, use command aliases:

idt g uuid         # Same as: idt gen uuid
idt i <ID>         # Same as: idt inspect <ID>
idt c <ID> -f hex  # Same as: idt convert <ID> -f hex
idt v <ID>         # Same as: idt validate <ID>
idt s <ID>...      # Same as: idt sort <ID>...

Reading from stdin

Most commands that accept IDs can read from stdin:

# Pipe from another command
idt gen uuid | idt inspect

# Read from file
cat ids.txt | idt validate

# Here-string
idt inspect <<< "550e8400-e29b-41d4-a716-446655440000"

Exit Codes

Commands use standard exit codes:

CodeMeaning
0Success
1Error (invalid input, validation failure, etc.)

This makes idt suitable for use in scripts:

if idt validate -q "$ID"; then
    echo "Valid ID"
else
    echo "Invalid ID"
fi