Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ› hyper-termibug

Bugs are invading your terminal! A fun and chaotic Hyper.js plugin that spawns pixel-art bugs in your terminal at random intervals. Squash them before they eat your text!

โœจ Features

  • ๐Ÿชฒ Pixel art bugs โ€” Animated 16ร—16 sprite bugs crawling around your terminal
  • ๐Ÿ–ฑ๏ธ Click to squash โ€” Click on a bug to kill it instantly
  • โŒจ๏ธ Space combo โ€” Press space 5 times within 2 seconds to squash the nearest bug
  • ๐Ÿฝ๏ธ They eat your text! โ€” After a configurable delay, bugs start consuming characters in your terminal
  • ๐Ÿ“Š Score HUD โ€” Track active bugs, kills, and your score in a sleek overlay (toggleable)
  • ๐ŸŽฎ Multi-bug chaos โ€” Multiple bugs can appear simultaneously
  • โธ๏ธ Pause/Resume โ€” Press Ctrl+Shift+B to toggle the game on/off at any time
  • โš™๏ธ Fully configurable โ€” Customize spawn rates, eat delay, speed, size, HUD visibility, and more

๐Ÿ“ฆ Installation

From npm (when published)

hyper i hyper-termibug

Local development

  1. Clone or copy this directory to ~/.hyper_plugins/local/hyper-termibug/

    Or create a symlink:

    ln -s /path/to/termibug ~/.hyper_plugins/local/hyper-termibug
  2. Add to your ~/.hyper.js:

module.exports = {
  localPlugins: ['hyper-termibug'],
  // ...
};
  1. Restart Hyper (or press Ctrl+Shift+R / Cmd+Shift+R)

โš™๏ธ Configuration

Add a termibug section to your ~/.hyper.js config:

module.exports = {
  config: {
    // ... other config
    termibug: {
      enabled: true,           // Enable/disable the plugin entirely
      showHUD: true,           // Show/hide the score panel in the top-right corner
      spawnIntervalMin: 15000, // Minimum time between bug spawns (ms)
      spawnIntervalMax: 45000, // Maximum time between bug spawns (ms)
      maxBugs: 10,             // Maximum simultaneous bugs
      eatDelay: 5000,          // Time before a bug starts eating characters (ms)
      bugSpeed: 1,             // Bug movement speed multiplier
      bugSize: 1,              // Bug visual size multiplier
    }
  }
};

Configuration Reference

Option Type Default Description
enabled boolean true Master switch โ€” set to false to disable the plugin completely
showHUD boolean true Show/hide the score panel (๐Ÿ› active โ”‚ ๐Ÿ’€ killed โ”‚ ๐Ÿ† score)
spawnIntervalMin number 15000 Minimum delay before next bug spawns (milliseconds)
spawnIntervalMax number 45000 Maximum delay before next bug spawns (milliseconds)
maxBugs number 10 Maximum number of bugs alive simultaneously
eatDelay number 5000 How long a bug wanders before it starts eating text (milliseconds)
bugSpeed number 1 Movement speed multiplier (2 = twice as fast)
bugSize number 1 Visual size multiplier (2 = twice as large)

โŒจ๏ธ Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+B Toggle the game on/off (pause/resume)
Space ร— 5 Press space 5 times within 2 seconds to squash the nearest bug

When the game is paused, a notification appears in the top-right corner showing the shortcut to resume.

๐ŸŽฎ How to Play

  1. Wait โ€” Bugs will appear from the edges of your terminal at random intervals
  2. Squash by clicking โ€” Simply click on a bug to kill it
  3. Squash by keyboard โ€” Press Space 5 times quickly (within 2 seconds) to kill the nearest bug to your cursor
  4. Don't let them eat! โ€” After the eat delay (default: 5 seconds), a bug's eyes turn red and it starts eating characters from your terminal
  5. Score โ€” Earn 100 points per kill, lose 10 points per eaten character
  6. Pause โ€” Press Ctrl+Shift+B to pause if you need a break

๐Ÿ—๏ธ Architecture

hyper-termibug/
โ”œโ”€โ”€ index.js              # Hyper plugin hooks (decorateTerm, middleware)
โ”œโ”€โ”€ package.json          # npm package config (zero dependencies)
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ lib/
    โ”œโ”€โ”€ Bug.js            # Single bug entity (movement, eating, state)
    โ”œโ”€โ”€ BugManager.js     # Bug spawning, killing, pause/resume, stats
    โ”œโ”€โ”€ BugRenderer.js    # Canvas pixel-art rendering engine
    โ”œโ”€โ”€ HUD.js            # Score overlay + toggle notifications
    โ””โ”€โ”€ SpriteData.js     # Pixel art sprite definitions (walk, eat, death)

๐Ÿž Debugging

Open Hyper DevTools with Ctrl+Shift+I and check the Console tab for messages prefixed with [termibug]:

[termibug] Found terminal container: DIV xterm
[termibug] Canvas appended. Container size: 800 x 400
[termibug] Plugin initialized! Toggle with Ctrl+Shift+B

๐Ÿค Contributing

PRs welcome! Some ideas for improvements:

  • Sound effects on squash
  • Different bug species with unique behaviors
  • Boss bugs that require more hits
  • Leaderboard
  • Bug trails / slime effects

๐Ÿ“„ License

MIT

About

๐Ÿ› Bugs invade your Hyper terminal! Click or press space 5x to squash them before they eat your text.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages