BR
TypeID Ruby
A Ruby implementation of TypeIDs
TypeIDs are a modern, type-safe, globally unique identifier based on the upcoming
UUIDv7 standard. They provide a ton of nice properties that make them a great choice
as the primary identifiers for your data in a database, APIs, and distributed systems.
Read more about TypeIDs in their spec.
This particular implementation provides a Ruby library for generating and parsing TypeIDs.
Installation
If using bundler
bundle add typeidIf not
gem install typeidUsage
require "typeid" #=> true
id = TypeID.new("user") #=> #<TypeID user_01h46z1k2cf2av8mp4r7we4697>
id.to_s #=> user_01h46z1k2cf2av8mp4r7we4697
other_id = TypeID.from_string(id.to_s) #=> #<TypeID user_01h46z1k2cf2av8mp4r7we4697>
id == other_id #=> trueAttributions
On this page
Languages
Ruby99.0%Shell1.0%
Apache License 2.0
Created June 30, 2023
Updated March 8, 2026