A lightning-fast, cross-platform command-line tool for bidirectional emoji conversion. Convert between emoji aliases (:smile:
) and Unicode emoji characters (π) seamlessly. This is a complete Go rewrite of the original emojify bash script with 169.9x better performance and modern tooling.
# Encode aliases to emojis (default behavior)
echo "Deploy completed :rocket: :100:" | emojify
# Deploy completed π π―
# Decode emojis back to aliases
echo "Deploy completed π π―" | emojify --decode
# Deploy completed :rocket: :100:
git log --oneline | emojify | head -5
# β¨ feat: add new feature :sparkles:
# π fix: resolve critical bug :bug:
# π docs: update README :books:
- β¨ Features
- π¬ Demo
- π¦ Installation
- π Usage
- π Examples
- β‘ Performance
- π Documentation
- ποΈ Development
- π§ Configuration
- π³ Docker
- π€ Contributing
- βοΈ License
- π Acknowledgments
- π Status
- π Related Projects
βοΈ Bidirectional Conversion: Encode aliases to emojis and decode emojis back to aliases- β‘ Lightning Fast: 169.9x faster than bash version (up to 758x on large files)
- π Cross-Platform: Single binary for Linux, macOS, Windows (AMD64 & ARM64)
- π¦ Zero Dependencies: No runtime dependencies, just download and run
- π― 100% Compatible: Drop-in replacement for original emojify
- π§ Pipeline Friendly: Perfect for git logs, CI/CD, and shell scripts
- π 2,500+ Emojis: Complete GitHub gemoji database
- π‘οΈ Production Ready: Comprehensive tests, benchmarks, and error handling
- π¨ Modern CLI: Built with urfave/cli for excellent UX
Lightning-fast emoji conversion in action! See the 169.9x performance improvement over the original bash version.
π macOS
# Homebrew
brew install damienbutt/tap/emojify-go
π§ Linux
# Arch Linux (AUR)
# Install pre-built binary
paru -S emojify-go-bin
# Or build from source
paru -S emojify-go
# Ubuntu/Debian (DEB package)
wget https://github.com/damienbutt/emojify-go/releases/latest/download/emojify-go_linux_amd64.deb
sudo dpkg -i emojify-go_linux_amd64.deb
# RHEL/CentOS/Fedora (RPM package)
sudo rpm -i https://github.com/damienbutt/emojify-go/releases/latest/download/emojify-go_linux_amd64.rpm
πͺ Windows
# Scoop
# 1. Add the bucket (only needs to be done once)
scoop bucket add damienbutt https://github.com/damienbutt/scoop-bucket.git
# 2. Install the package
scoop install emojify-go
# WinGet
# 1. Add the source repository (only needs to be done once)
winget source add --name damienbutt --arg https://github.com/damienbutt/winget-pkgs --type Microsoft.Winget.Source.8wekyb3d8bbwe
# 2. Install the package
winget install damienbutt.emojify-go
βοΈ NixOS / Nix
emojify-go
is available in a Nix User Repository (NUR).
To install emojify-go
from the NUR, you first need to add the NUR to your Nix configuration. This is a one-time setup step.
1. Add the NUR to your Nix configuration
Add the following to your ~/.config/nixpkgs/config.nix
file:
{
packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/damienbutt/nur/archive/master.tar.gz") {
inherit pkgs;
};
};
}
2. Install the package
nix-env -iA nur.repos.damienbutt.emojify-go
Note on Nix Flakes
If you're using Nix Flakes, you can install emojify-go
directly from the NUR repo:
nix profile install github:damienbutt/nur#emojify-go
# Run directly
echo "Hello :wave: world" | docker run --rm -i ghcr.io/damienbutt/emojify-go
# Use as alias
alias emojify='docker run --rm -i ghcr.io/damienbutt/emojify-go'
Download the latest binary for your platform from the releases page.
# Linux (AMD64)
curl -L https://github.com/damienbutt/emojify-go/releases/latest/download/emojify-go_linux_amd64.tar.gz | tar xz
sudo mv emojify-go /usr/local/bin/emojify
# macOS (ARM64)
curl -L https://github.com/damienbutt/emojify-go/releases/latest/download/emojify-go_darwin_arm64.tar.gz | tar xz
sudo mv emojify-go /usr/local/bin/emojify
# Windows (AMD64)
curl -L https://github.com/damienbutt/emojify-go/releases/latest/download/emojify-go_windows_amd64.zip -o emojify.zip
unzip emojify.zip
git clone https://github.com/damienbutt/emojify-go.git
cd emojify-go
make build
./build/emojify "Hello :wave:"
go install github.com/damienbutt/emojify-go/cmd/emojify@latest
# Convert emoji aliases to emojis (default behavior)
emojify "Hey, I just :raising_hand: you, and this is :scream:"
# Output: Hey, I just π you, and this is π±
# Explicitly encode aliases to emojis
emojify --encode "To :bee: or not to :bee:"
emojify -e "To :bee: or not to :bee:"
# Output: To π or not to π
# Decode emojis back to aliases
emojify --decode "Deploy completed π π― π"
emojify -d "Deploy completed π π― π"
# Output: Deploy completed :rocket: :100: :tada:
# Round-trip conversion
echo "Hello :wave: world!" | emojify --encode | emojify --decode
# Output: Hello :wave: world!
# Convert emoji-rich text to aliases for storage/transmission
echo "Great work! π π π" | emojify --decode
# Output: Great work! :+1: :tada: :rocket:
# Convert back to emojis for display
echo "Great work! :+1: :tada: :rocket:" | emojify --encode
# Output: Great work! οΏ½ π π
# Git log with emojis (most popular use case)
git log --oneline --color | emojify | less -r
# Git commit with emojis
git commit -m ":sparkles: Add new feature :rocket:"
# Echo and pipe (default encoding)
echo "Perfect! :100: :tada:" | emojify
# Output: Perfect! π― π
# Decode emoji-rich output
curl -s "https://api.github.com/repos/user/repo/commits" | jq -r '.[].commit.message' | emojify --decode
# Process files
cat commit_messages.txt | emojify > pretty_commits.txt
cat emoji_output.txt | emojify --decode > clean_text.txt
# CI/CD notifications with bidirectional support
echo "Build status: :white_check_mark: Success :rocket:" | emojify
echo "Build completed π’ β
π" | emojify --decode
# Encode aliases to emojis (default behavior)
emojify "text with :aliases:"
emojify --encode "text with :aliases:"
emojify -e "text with :aliases:"
# Decode emojis to aliases
emojify --decode "text with π emojis"
emojify -d "text with π emojis"
# List all available emojis
emojify --list
emojify -l
# Show version information
emojify --version
emojify -v
# Get help
emojify --help
emojify -h
Note:
--encode
and--decode
flags are mutually exclusive.- When using shell pipes or arguments with special characters (
!
,$
, etc.), wrap strings in single quotes or escape them properly.
# Create a git alias for emoji logs
git config --global alias.elog '!git log --oneline --color | emojify | less -r'
# Create a git alias for clean (no emoji) logs
git config --global alias.clean-log '!git log --oneline --color | emojify --decode | less -r'
# Use the aliases
git elog # Shows emojified commit messages
git clean-log # Shows clean text commit messages
# Emoji commit messages
git commit -m ":sparkles: feat: add user authentication :lock:"
git commit -m ":bug: fix: resolve memory leak :wrench:"
git commit -m ":books: docs: update API documentation"
# Extract clean commit messages for reports
git log --oneline --since="1 week ago" | emojify --decode > weekly_report.txt
# Shakespeare with emojis
emojify "To :bee: or not to :bee: that is the question :thinking:"
# Convert emoji-rich social media content to clean text
echo "Amazing product π Love it β€οΈ 5 stars βββββ" | emojify --decode
# Output: Amazing product :tada: Love it :heart: 5 stars :star::star::star::star::star:
# Status updates with bidirectional conversion
emojify "Server status: :green_heart: Healthy | Load: :chart_with_upwards_trend:"
echo "Server status: π Healthy | Load: π" | emojify --decode
# Code review feedback
emojify "LGTM :+1: Great work :clap: Ship it :rocket:"
# Clean up emoji-heavy slack exports for documentation
cat slack_export.txt | emojify --decode > clean_documentation.txt
# Progress indicators
emojify "Progress: :white_check_mark: Tests | :white_check_mark: Build | :construction: Deploy"
# Convert between formats for different platforms
echo "π― Goal achieved π Next milestone: Q4 targets π" | emojify --decode | tee clean_report.txt | emojify
# Colorful git statistics
git shortlog -sn | head -10 | sed 's/^/π€ /' | emojify
# Enhanced build notifications
./build.sh && echo ":white_check_mark: Build successful :rocket:" | emojify || echo ":x: Build failed :sob:" | emojify
# Log processing with timestamps
tail -f app.log | while read line; do echo "$(date '+%H:%M:%S') :clock: $line"; done | emojify
Emojify is built for speed and handles large inputs efficiently:
Dataset Size | Bash Version | Go Version | Speedup |
---|---|---|---|
Small (151 chars) | 395.6ms | 177.8ms | 2.22x |
Medium (1.6KB) | 659.3ms | 155.8ms | 4.23x |
Large (17KB) | 10.328s | 126.9ms | 81.36x |
XLarge (90KB) | 156.197s | 205.8ms | 758.81x |
Average Performance Improvement: 169.9x faster β‘
# Run performance benchmarks
make benchmark
# Test with large input
seq 1 10000 | sed 's/.*/:rocket: Line &/' | time emojify > /dev/null
Emojify includes a comprehensive Unix manual page that provides detailed documentation about all commands and options.
When installed via package managers, the man page is automatically available:
# After installing via Homebrew, AUR, etc.
man emojify
Supported Systems: macOS, Linux, Windows (WSL/MSYS2/Cygwin)
- Go 1.23 or later
- Make (optional, for convenience)
git clone https://github.com/damienbutt/emojify-go.git
cd emojify-go
make dev-setup # Downloads dependencies
# Build for current platform
make build # Output: build/emojify
# Build for all platforms
make build-all # Output: build/emojify-{os}-{arch}
# Create optimized release binary
make release # Output: build/emojify (optimized)
# Run all tests
make test
# Run tests with coverage
make test-coverage
# Run benchmarks
make benchmark
# Run specific benchmark
make benchmark-processor
# Integration tests
make test-integration
# Race condition testing
make test-race
# Generate test report
make test-report
# Run linting
make lint
# Format code
go fmt ./...
# Vet code
go vet ./...
# Security scan
gosec ./...
# Add emoji git aliases
git config --global alias.ec '!git log --oneline --color | emojify | head -10'
git config --global alias.es '!git status --porcelain | emojify'
# Set up commit template with emojis
cat > ~/.gitmessage << 'EOF'
# :sparkles: feat:
# :bug: fix:
# :books: docs:
# :art: style:
# :recycle: refactor:
# :white_check_mark: test:
# :construction_worker: build:
# :green_heart: ci:
EOF
git config --global commit.template ~/.gitmessage
# Run with stdin
echo "Hello :wave: Docker" | docker run --rm -i ghcr.io/damienbutt/emojify-go
# Process files
docker run --rm -v $(pwd):/workspace -w /workspace ghcr.io/damienbutt/emojify-go "$(cat input.txt)"
# Multi-architecture support
docker run --platform linux/arm64 --rm -i ghcr.io/damienbutt/emojify-go
# Build image
docker build -t my-emojify .
# Run
echo "Custom build :hammer:" | docker run --rm -i my-emojify
We love contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Add tests for new functionality
- Run tests:
make test
- Commit with emojis:
git commit -m ":sparkles: feat: add amazing feature"
- Push to your branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Write tests for new features
- Follow Go conventions and best practices
- Run
make lint
before committing - Include benchmarks for performance-critical code
- Update documentation for user-facing changes
- π Additional package managers
- π§ New emoji sources/databases
- π Performance optimizations
- π§ͺ Additional test cases
- π Documentation improvements
- π Bug fixes and edge cases
See CONTRIBUTING.md for detailed guidelines.
MIT License - see LICENSE for details.
- Original emojify - Inspiration and compatibility
- GitHub Gemoji - Emoji database
- urfave/cli - Excellent CLI framework
- testify - Testing framework
- β Production Ready: Used in CI/CD pipelines and development workflows
- β Actively Maintained: Regular updates and improvements
- β Cross-Platform: Supports all major platforms and architectures
- β Well Tested: Comprehensive test suite with >95% coverage
- emojify - Original bash implementation
- pyemojify - Python implementation
- node-emojify - Node.js implementation