GitHub - joeheyming/ascii_nyan: put a nyan cat on the command line, or in emacs

2 min read Original article ↗

🌈 ASCII Nyan Cat

Put a Nyan Cat in your terminal, Emacs, or browser!

curl nyan-cat.joeheyming.workers.dev

nyan

✨ Features

  • Terminal Animation - Stream ASCII Nyan Cat via curl
  • Web Viewer - Beautiful browser-based viewer with music
  • Emacs Integration - Watch Nyan Cat in your editor
  • Speed Control - From slow to LUDICROUS speed
  • Docker Support - Easy deployment anywhere

🚀 Quick Start

Terminal (curl)

# Install dependencies
npm install

# Start the server
npm start

# In another terminal
curl localhost:3000

Browser

Just open http://localhost:3000 in your browser!

Docker

# Build
docker build -t nyan-cat .

# Run
docker run -p 3000:3000 nyan-cat

# Then curl or browse to localhost:3000

🎮 Options

Speed Control

curl "localhost:3000?speed=slow"      # đŸĸ Relaxed viewing
curl "localhost:3000?speed=normal"    # 🐱 Default
curl "localhost:3000?speed=fast"      # 🚀 Speedy cat
curl "localhost:3000?speed=ludicrous" # ⚡ Maximum nyan

Flip Mode

curl "localhost:3000?flip=true"       # â†Šī¸ Reversed nyan

Combine Options

curl "localhost:3000?speed=fast&flip=true"

đŸ–Ĩī¸ Bash Script

For a standalone terminal experience without the server:

./nyan.sh [-e] [-h] [-m]

-e → Run in Emacs
-m → Play music  
-h → Show help

Emacs Setup

Make sure the emacsclient server is running:

đŸŽĩ Music

The web viewer includes the original Nyan Cat music! Click the 🔇 button to toggle audio.

For the bash script, use the -m flag to play music.

â˜ī¸ Live Demo

Try it now - no install required!

curl nyan-cat.joeheyming.workers.dev

# With options
curl "nyan-cat.joeheyming.workers.dev?speed=fast"
curl "nyan-cat.joeheyming.workers.dev?speed=ludicrous"
curl "nyan-cat.joeheyming.workers.dev?flip=true"

Or visit nyan-cat.joeheyming.workers.dev in your browser!

Self-Hosting with Cloudflare Workers

Deploy your own globally with Cloudflare Workers:

cd worker
npm install
npm run dev      # Local development
npm run deploy   # Deploy to Cloudflare

The worker fetches frames directly from GitHub at runtime (cached for 1 hour).

Configuration (worker/wrangler.toml):

[vars]
GITHUB_REPO = "joeheyming/ascii_nyan"
GITHUB_BRANCH = "master"

đŸŗ Environment Variables

Variable Default Description
NYAN_PORT 3000 Server port

đŸ“Ļ Tech Stack

  • Node.js 18+ - Runtime
  • Chalk - Terminal colors
  • Pure HTML/CSS/JS - Web viewer (no framework needed!)

🤝 Credits

  • Original Nyan Cat by PRGuitarman & daniwell
  • Server streaming inspired by parrot.live

📄 License

MIT Š Joe Heyming


Enjoy! ^_^ 🐱🌈