Chrono Logo

Puff: Random Data at Your Fingertips

author avatar

Toru Maesaka

Founder and Software Engineer

Whether you're an engineer, a sysadmin, or a data analyst, many tech roles require generating random data, such as unique IDs and ephemeral keys. While everyone has their own methods for handling these tasks, there is a simpler way. Meet Puff, a command-line tool that generates random values in formats like UUID4, UUID7, hexadecimal and Base64, along with binary blobs for testing, development, and cryptographic applications.

For example, suppose you need to generate a cryptographically secure 16-byte (128-bit) hexadecimal string, or perhaps a 32-byte (256-bit) hexadecimal string with a larger key space. With Puff, it’s as simple as:

$ puff hex --bytes 16
4d96a521fd120d759be219a58a142254

$ puff hex --bytes 32
1a55b371445f37d3963e2287f2cec1c44a31742c27138837b9a28ffe80a7823c

Need to generate these values in bulk as a CSV? It’s just as straightforward:

$ puff hex --count 2 --delimiter ","
cfa44c368254e27624d42d255adccf1b,5f0e925fa50290a2d4a049b12ec61cb8

Need to generate a large binary file to test your data upload endpoint? Also easy:

$ puff binary --bytes 1048576 --output /tmp/puff.bin

Other formats, like UUID4, UUID7, and Base64, are just as simple to generate with Puff. To explore all available options, run puff --help, or use --help with any subcommand for a deeper dive. As its name suggests, Puff is a powerful, all-in-one tool for instantly generating random data with a simple command.

Installing Puff is straightforward, especially for macOS users. Simply run:

$ brew install chronohq/tap/puff

Puff also supports Linux and Windows, ensuring compatibility across different environments. For detailed instructions, see the installation guide.

Puff is fully open source, licensed under the MIT license, ensuring transparency for anyone curious or concerned about its implementation. You’re welcome to explore the source code, provide feedback, or contribute to the project in any way that suits you.

Under its hood, Puff is built almost entirely on Google's libraries, specifically Go's standard library and their UUID package. By leveraging these well-tested and widely adopted components, Puff ensures reliability and security in generating random data.

As we've explored, Puff offers a simple and trustworthy solution for generating random data in a variety of formats. Whether you’re looking to simplify testing, seed data, or handle tasks requiring secure randomness, Puff has you covered. Try Puff today to simplify your tasks. Your feedback and contributions are always welcome. Help us make Puff even better.

Did you enjoy the content? Follow us on LinkedIn to help us grow and continue delivering blog posts like this one. Your support is appreciated.