An ultra-fast, dependency-free Rust implementation of the original Pokémon colorscripts. Optimized for "Absolute Mode" terminal performance.
| Feature | Original (Python) | Pokémon-RS (Rust) |
|---|---|---|
| Startup Latency | ~60ms | <6ms |
| Data Loading | Disk I/O (Slow) | Compiled into Binary (Instant) |
| Dependencies | Python 3 | Zero (Standalone Binary) |
| Memory Footprint | ~30MB | <2MB |
This is a high-performance port of Phoney Badger's Pokémon colorscripts. It prints colored Unicode sprites of Pokémon directly to your terminal.
Key Improvements:
- Embedded Assets: All 900+ Pokémon sprites and metadata are baked into a single binary using
rust-embed. No external folders required. - Binary Optimization: Compiled with LTO (Link-Time Optimization) and stripped of debug symbols for sub-millisecond execution.
- Safety: Memory-safe Rust implementation with compile-time JSON validation.
Install the high-performance Rust version via your favorite AUR helper:
yay -S pokemon-colorscripts-rs-git
Download the optimized binary directly to your local bin:
curl -sS https://raw.githubusercontent.com/Sibikrish3000/pokemon-colorscripts-rs/master/install.sh | bash
Ensure you have cargo installed:
git clone https://github.com/Sibikrish3000/pokemon-colorscripts-rs.git
cd pokemon-colorscripts-rs
cargo build --release
# Binary located at target/release/pokemon-rs
usage: pokemon-rs [OPTION] [POKEMON NAME]
Options:
-n, --name <NAME> Select Pokémon by name (e.g., 'charizard', 'mr-mime')
-f, --form <FORM> Show alternate form (e.g., 'defense', 'alola')
-r, --random Show a random Pokémon (can specify gen: 1-8)
-s, --shiny Force shiny version
-b, --big Show larger sprite
--no-title Hide the Pokémon name
-l, --list List all available Pokémon
- Random Pokémon:
pokemon-rs -r - Specific Shiny:
pokemon-rs -n gengar -s - Large Form:
pokemon-rs -n deoxys --form attack -b
Add this to your .zshrc or .bashrc for a zero-lag greeting:
# Using the Rust binary ensures NO shell startup delay
pokemon-rs -r --no-title | fastfetch --logo -
Add to your $PROFILE:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
pokemon-rs.exe -r --no-title
Unlike the Python version which reads from the disk on every execution, pokemon-rs uses Zero-Cost Abstractions:
- Compile-Time Embedding: The
colorscripts/directory is mapped into the binary's data segment. - Static JSON: The Pokémon database is parsed once during compilation and stored as a static lookup table.
- No Runtime Bloat: No interpreter, no garbage collector, just raw machine code.
- Original Logic: Phoney Badger
- Sprites: PokéSprite
- Inspiration: DT's Shell Color Scripts
License: MIT