Transform any image into stunning ASCII art for your CLI tools
Create beautiful terminal banners like Claude Code, GitHub Copilot CLI, and Gemini CLI.
Installation β’ Quick Start β’ Commands β’ Examples β’ Options
- πΌοΈ Image to ASCII - Convert any image (PNG, JPG, etc.) to ASCII art
- π True Color Support - 24-bit color, 256 color, or monochrome output
- π² Transparency Support - Handles transparent PNGs perfectly
- π― White Background Removal - Treat white backgrounds as transparent
- π¦ CLI Wrapper Generator - Create branded shell wrappers instantly
- β‘ Multiple Output Formats - Bash scripts, Node.js modules, or raw ASCII
git clone https://github.com/idofrizler/cli-logo-generator.git
cd cli-logo-generator
npm install
npm link # Makes 'cli-logo' available globallycli-logo ./logo.pngcli-logo init ./logo.png mycli -t "My Awesome CLI" --subtitle "v1.0.0"./mycli.sh # Shows banner, drops into shell
./mycli.sh git status # Shows banner, runs commandsudo cp mycli.sh /usr/local/bin/mycli
mycli # Works from anywhere!Convert an image to ASCII art. The convert keyword is optional.
# Basic conversion
cli-logo ./logo.png
# Customize output
cli-logo ./logo.png -w 60 -c truecolor -t "My App" -v "2.0.0"
# Remove white background
cli-logo ./logo.png -b
# Generate reusable JavaScript module
cli-logo ./logo.png --code -o banner.jsGenerate a complete CLI wrapper with your branding.
# Creates both mycli.sh and mycli.js
cli-logo init ./logo.png mycli -t "MyCLI" -v "1.0.0"
# Bash only
cli-logo init ./logo.png mycli --type bash
# Node.js only
cli-logo init ./logo.png mycli --type node
# Custom shell
cli-logo init ./logo.png mycli --shell /bin/zshcli-logo init ./borat.jpeg borat \
-t "Borat CLI" \
-v "1.0.0" \
--subtitle "Very nice!" \
-w 40
sudo cp borat.sh /usr/local/bin/boratNow when you run borat:
ββββββββ
βββ ββ
ββ ββββββ ββ
ββ βββββββββ β
ββ βββββββββββ
ββββββββββββ
βββββββββββ
Borat CLI v1.0.0
Very nice!
$ β
cli-logo ./logo.png -w 40 --code -o src/banner.jsThen in your app:
const { showBanner } = require('./banner.js');
showBanner();
// Your CLI logic...# Blocks (default) - best for most logos
cli-logo ./logo.png -s blocks
# Simple - cleaner look
cli-logo ./logo.png -s simple
# Detailed - more gradients
cli-logo ./logo.png -s detailed| Option | Description | Default |
|---|---|---|
-w, --width <n> |
Width in characters | 60 |
-c, --color <mode> |
none, 256, truecolor |
truecolor |
-s, --charset <set> |
blocks, simple, detailed |
blocks |
-i, --invert |
Invert brightness | false |
-b, --bg-transparent |
Treat white as transparent | false |
--bg-threshold <n> |
White threshold (0-255) | 250 |
-t, --title <text> |
Title below logo | - |
-v, --ver <version> |
Version string | - |
--subtitle <text> |
Subtitle text | - |
-o, --output <file> |
Save to file | - |
--code |
Generate JS module | false |
| Option | Description | Default |
|---|---|---|
-w, --width <n> |
Width in characters | 50 |
-c, --color <mode> |
none, 256, truecolor |
truecolor |
-t, --title <text> |
Title (defaults to name) | - |
-v, --ver <version> |
Version string | 1.0.0 |
--subtitle <text> |
Subtitle text | - |
--type <type> |
bash, node, both |
both |
--shell <path> |
Shell to use | $SHELL |
-d, --dir <directory> |
Output directory | . |
-b, --bg-transparent |
Treat white as transparent | false |
- Use transparent PNGs when possible
- Use
-bflag for images with white backgrounds - Width of 40-60 characters works best
blockscharset gives the best results for most logos
Logo looks inverted?
cli-logo ./logo.png -iWhite background showing?
cli-logo ./logo.png -bColors not showing? Your terminal might not support truecolor. Try:
cli-logo ./logo.png -c 256
# or
cli-logo ./logo.png -c none- Load Image - Uses sharp for fast image processing
- Resize - Scales to target width, adjusting height for terminal aspect ratio
- Map Pixels - Converts each pixel to an ASCII character based on brightness
- Apply Color - Adds ANSI escape codes for terminal colors
- Generate Wrapper - Creates executable scripts that display the banner
Contributions are welcome! Feel free to:
- π Report bugs
- π‘ Suggest features
- π§ Submit pull requests
MIT Β© 2024
Made with β€οΈ for CLI enthusiasts
