pet-me-js
A Tamagotchi-style virtual pet for your terminal. TypeScript, evolutions, mini-games, random events, inventory, multiple pets, achievements โ zero runtime deps.
A tiny Tamagotchi-style virtual pet that lives right in your terminal.
Built with TypeScript, featuring adorable ASCII art, evolutions, random events, mini-games, inventory, achievements, and more โ all with zero runtime dependencies.
โจ Badges (replace with real ones in your repo):
- ๐ฆ npm: pet-me-js
- ๐ license: MIT
- ๐ฆ language: TypeScript
- ๐ฃ Evolutions: egg โ baby โ teen โ adult (age & care based)
- ๐ ASCII moods: art changes with happiness, hunger, and sickness
- ๐ฒ Random events: find items, mood boosts, occasional sickness
- โ Mini-game: RockโPaperโScissors to boost happiness
- ๐ Inventory: food, toys, meds
- ๐ Multiple pets: hatch, list, switch, rename, release
- ๐ Achievements: 7-day survivor, month keeper, perfect diet, etc.
- โก Zero deps: fast install, portable CLI
Try instantly (no install): npx pet-me-js help
Or install globally: npm i -g pet-me-js pet-me help
Note: Package name is pet-me-js; CLI command is pet-me.
Use pet-me help
(or -h
/ --help
) anytime to see this menu.
pet-me status Show pet status
pet-me feed [food|toys] Feed your pet (default: food)
pet-me play [rock|paper|scissors]
Play mini-game (RPS)
pet-me medicate Use medicine if sick
pet-me hatch [--name NAME] Hatch a new pet and switch to it
pet-me list List all pets
pet-me switch <id|name> Switch current pet
pet-me rename <name> Rename current pet
pet-me release [<id|name>] Release a pet (default: current)
pet-me log [N] Show last N events (default 20)
pet-me config [key value] View or set config; keys:
hungerRatePerHour, happinessDecayPerHour,
healthDecayPerHour, randomEventHourlyChance,
notifications
pet-me reset Clear ALL data (fresh start)
pet-me help Show help
pet-me version Show version
npx pet-me-js hatch --name Luna
npx pet-me-js play rock
npx pet-me-js feed
npx pet-me-js medicate
npx pet-me-js list
npx pet-me-js switch <id>
npx pet-me-js config hungerRatePerHour 3
Your petโs state is stored in a single JSON file (pets, config, log).
- ๐ง Linux: ~/.config/pet-me-js/state.json
- ๐ macOS: ~/Library/Application Support/pet-me-js/state.json
- ๐ช Windows: %APPDATA%/pet-me-js/state.json
(Future optional build: stored in browser localStorage)
-
hungerRatePerHour
(number) -
happinessDecayPerHour
(number) -
healthDecayPerHour
(number) -
randomEventHourlyChance
(0โ1) -
notifications
(boolean; reserved for future desktop alerts)
Example: pet-me config hungerRatePerHour 3 pet-me config randomEventHourlyChance 0.15
git clone https://github.com/JAYDIPSINH27/pet-me-js
cd pet-me-js
npm i
npm run build
node dist/bin/pet-me.js help
src/ types.ts - Domain types utils.ts - Colors, time, clamps, progress bars ascii.ts - ASCII sprites by stage & mood achievements.ts - Badge logic minigames.ts - RockโPaperโScissors storage.ts - Local storage (browser) or file (Node) state.ts - Constructors, load/save, current pet selection engine.ts - Pure simulation (evolve, events, tickOne) actions.ts - User-facing operations + printing help.ts - Central help text for CLI bin/ pet-me.ts - CLI dispatcher (supports help & version)
pet, virtual-pet, tamagotchi, game, fun, cli, node, javascript, typescript
We follow SemVer. To publish: npm version 1.0.1 npm publish --access public
- ๐ Browser bundle (UMD/ESM)
- ๐ Desktop notifications
- ๐ฎ Additional mini-games
- ๐งฉ Plugin API
- ๐ Localization
MIT ยฉ Jaydipsinh Padhiyar