JSPM

pet-terminal

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36
  • Score
    100M100P100Q72832F
  • License MIT

A terminal-based virtual pet that grows happier when you code

Package Exports

  • pet-terminal
  • pet-terminal/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pet-terminal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Pet Terminal

A terminal-based virtual pet that lives in your command line. Your pet grows happier when you code!

FeaturesInstallationQuick StartCommandsPhilosophy


Features

  • Choose your pet: Cat, Dog, Rabbit, Hamster, Bird, or Dragon
  • Git integration: Earn rewards for coding - your pet loves watching you work!
  • Shop system: Buy food, toys, and supplies with earned coins
  • Level up: Your pet grows stronger as you care for it
  • One-click care: Quickly handle all your pet's needs with pet care
  • Stats tracking: Hunger, happiness, health, cleanliness, energy
  • Lenient decay: Stats decay slowly - your pet stays healthy for days!

Installation

npm install -g pet-terminal

Local Installation

npm install -g pet-terminal

Or use with npx without installing:

npx pet-terminal init

Quick Start

# Create your first pet
pet init

# Check on your pet
pet status

# See all commands
pet --help

# View the tutorial
pet tutorial

Commands

Command Aliases Description
pet init - Create a new pet
pet status - Display your pet's status
pet feed - Feed your pet
pet play - Play with your pet
pet clean - Clean your pet
pet heal - Heal your pet
pet sleep - Put pet to sleep/wake up
pet care auto, all One-click care for all needs
pet inventory inv, items Show your inventory
pet shop store Visit the pet shop
pet git commits Check for new Git commits
pet sync - Sync time and show changes
pet tutorial help, guide Show the tutorial

Philosophy

"Writing code = being with your pet"

Pet Terminal isn't a chore - it's a companion. When you make Git commits, your pet automatically gains stats because they're happy watching you work!

This is a zero-burden companion designed to make your coding sessions more enjoyable, not another task to complete.

How It Works

Earning Rewards

Every Git commit earns you coins and XP:

Commit Type Prefix Examples Coins XP
Bug Fix fix:, bug:, 修复 +10 +20
Feature feat:, add:, +8 +15
Refactor refactor:, 重构 +6 +12
Normal any other +5 +10

Stat Bonuses

Every commit also gives:

  • Hunger +15: Your pet feels fed seeing you work
  • Happiness +10: Your pet is happy you're here

Stat Decay

Stats decay slowly over time (real-time):

Stat Decay Rate Time to Empty (from 100%)
Hunger -3/hour ~33 hours
Happiness -0.67/hour 150 hours (6 days)
Cleanliness -0.125/hour 800 hours (33 days)
Energy -2/hour (awake) ~50 hours

The decay is intentionally lenient - your pet stays healthy for days without attention!

Streak Bonuses

Maintain a daily commit streak for bonus rewards:

  • 3+ days: +2 stat bonus per commit
  • 7+ days: +5 stat bonus per commit, +10 daily coins
  • 30+ days: +5 stat bonus per commit, +50 daily coins

Screenshots

Pet Status

╔══════════════════════════════════════════╗
║         SPARKY THE CAT                   ║
╚══════════════════════════════════════════╝

   /\_/\
  ( o.o )
   > ^ <

Status: ⚡ Awake

──────────────────────────────────────────
Hunger        ███████████████░░░░  80%
Happiness     ████████████████░░░░  85%
Health        ███████████████████░  95%
Cleanliness   ████████████░░░░░░░░  70%
Energy        ██████████████████░░  90%
──────────────────────────────────────────

Level: 5 ████████████████░░░░ 85/100 XP

Mood: 😊 HAPPY - Sparky is feeling wonderful!

Coins: 150 🪙
Today's earnings: +25 🪙

Git Streak: 5 days
Total Commits: 42

💡 Use 'pet care' for one-click care

Git Rewards

╔══════════════════════════════════════════╗
║              GIT COMMITS                 ║
╚══════════════════════════════════════════╝

──────────────────────────────────────────
Current Streak: 5 days
Total Rewarded: 42 commits
──────────────────────────────────────────

Found 3 new commit(s)!

94b2b6e - feat: add new authentication system
  [Feature] +8 🪙 +15 XP
  📦 Large Commit Bonus!

a1b2c3d - fix: resolve memory leak in parser
  [Bug Fix] +10 🪙 +20 XP

d4e5f6g - refactor: simplify database queries
  [Refactor] +6 🪙 +12 XP

──────────────────────────────────────────
Total: +24 🪙  +47 XP
🔥 Streak Bonus! +5 🪙
──────────────────────────────────────────

Your Coins: 150 🪙

Configuration

Optional config file: ~/.pet-terminal/config.json

{
  "decayRate": 1.0,
  "autoCare": {
    "enabled": false,
    "thresholds": {
      "hunger": 70,
      "happiness": 60,
      "cleanliness": 60,
      "health": 70
    }
  }
}

Configuration Options

Option Type Default Description
decayRate number 1.0 Global decay multiplier (0.5-2.0)
autoCare.enabled boolean false Enable auto-purchase of items
autoCare.thresholds object - Stat thresholds for care needs

Pet Species

Species Description Special Trait
🐱 Cat Independent and graceful Higher happiness cap
🐕 Dog Loyal and energetic Faster energy recovery
🐰 Rabbit Gentle and affectionate Extra XP from care
🐹 Hamster Small and active Bonus coins from play
🐦 Bird Cheerful and smart Stat bonuses from commits
🐉 Dragon Rare and powerful All stats boosted

Tips & Tricks

  • Forgot about your pet? Run pet sync to catch up on time passed
  • Low on supplies? Use pet care to see what you need
  • Want quick coins? Make some commits and run pet git
  • Pet sleeping? Let them sleep to restore energy
  • Stats low? Use pet care for one-click care of all needs

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details

Credits

Built with:


Made with for developers who love their terminal pets