Skip to content

Go-based CLI tool that generates unique robot, cat, monster and person avatars from text/hashes. Perfect for user profile pictures and placeholder images

License

Notifications You must be signed in to change notification settings

fl4vis/robohash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 RoboHash

Generate unique robot avatars from any text

MIT License Go Release

A Go port of Robohash — turn any string into a unique, deterministic robot avatar.

InstallationUsageExamplesAttribution


✨ Features

  • 🎨 5 Different Sets: Robots, monsters, cats, and human avatars
  • 🎭 10 Color Schemes: For Set 1 robots
  • 📦 Multiple Formats: PNG, JPG, GIF, WebP, and Data URI
  • 🎯 Deterministic: Same input always produces the same avatar
  • Fast: Built with Go for maximum performance
  • 🖼️ Custom Backgrounds: Optional background layers

📦 Installation

Quick Install

# Clone the repository
git clone https://github.com/fl4vis/robohash.git
cd robohash

# Build and extract
make all
cd build
tar -xvzf robohash.tar.gz

Or Download Release

Download the latest release from GitHub Releases


🚀 Usage

Basic Example

./robohash -input "hello@example.com"

Advanced Example

./robohash -input "user@example.com" -set 1 -color blue -bgset 1 -sizex 500 -sizey 500 -extension webp

⚙️ Configuration

🎨 Appearance Options

Flag Default Description
-set any Avatar style:
1 - Robots (original)
2 - Monsters
3 - Robots (alt)
4 - Cats
5 - Humans
any - Random
-color - Set 1 only:
blue, brown, green, grey, orange, pink, purple, red, white, yellow
-bgset - Background:
1 - Background set 1
2 - Background set 2
any - Random

📐 Output Options

Flag Default Description
-extension png Format: png, jpg, jpeg, gif, webp, ppm, datauri
-sizex 300 Width in pixels
-sizey 300 Height in pixels

🔧 Input Options

Flag Default Description
-input required String to hash into avatar
-ignoreExt true Ignore file extensions when hashing
-slots 11 Hash slot divisions ⚠️ Advanced option

🎨 Examples


📖 How It Works

RoboHash generates avatars deterministically:

  1. Your input string is hashed using SHA-256
  2. The hash is split into segments (slots)
  3. Each slot determines a specific image layer
  4. Layers are composited together to create the final avatar

Same input = Same avatar, always! Perfect for user avatars, identicons, or fun profile pictures.


🙏 Attribution

This project uses artwork from Robohash.org:

  • Set 1: Robots by Zikri Kader
  • Set 2: Monsters by Hrvoje Novakovic
  • Set 3: Robots by Julian Peter Arias
  • Set 4: Cats by David Revoy
  • Set 5: Humans by Pablo Stanley

All images are licensed under CC-BY 4.0


📝 License

This project is licensed under the MIT License


Made with ❤️ and Go

⭐ Star this repo if you find it useful!


Support this project:

Donate with PayPal

About

Go-based CLI tool that generates unique robot, cat, monster and person avatars from text/hashes. Perfect for user profile pictures and placeholder images

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published