typeid

command
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Overview

Command typeid is a small CLI for generating, encoding, and decoding typeids.

Usage:

typeid [flags] [input]

Behavior depends on the input:

(no input)              generate a new typeid
<uuid>                  encode a UUID into a typeid
<int64>                 encode a decimal int64 value into a short typeid
<typeid>                decode a typeid back into its UUID or int64 value

Flags:

-prefix string   prefix to use when generating or encoding (default none)
-type   string   id flavor: "uuid", "int64", or "auto" (default "auto")
-format string   output format: "typeid", "uuid", or "int64"

For -type, "auto" means uuid on generation, and on decoding it infers the flavor from the suffix length (26 chars = uuid, 13 chars = int64).

For -format, the default depends on the operation: generate and encode emit the typeid, while decode emits the underlying UUID or int64 value. Set -format to override (e.g. generate an id but print its UUID form).

Jump to

Keyboard shortcuts

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