@whaletech/pet
v0.2.4
Published
Terminal pet companion — hatch, feed, and chat with your ASCII whale
Downloads
529
Maintainers
Readme
@whaletech/pet
Terminal pet companion. ASCII art, mood system, AI chat, all in your terminal.
npm install -g @whaletech/pet
petWhat it does
- Hatch a random pet (16 species, 5 rarities, shiny variants)
- Feed, pet, and put it to sleep
- Chat with it (powered by DeepSeek)
- Mood changes based on how you take care of it
- Hidden story system unlocked through perfect care
- Cosmetics: hats, eyes, rarity upgrades
Architecture
Client (this npm package): React + Ink terminal UI, runs on Node >= 20.
Server (self-hosted): Bun + SQLite backend handling state, AI chat, and payments. Deploy separately.
The client connects to https://api.pet.whaletech.app by default, with a fallback to https://pet-api.whaletech.app. Override with:
WHALE_API_URL=http://localhost:3001 petDevelopment
Requires Bun.
# Run client (dev)
bun src/main.tsx
# Run server
bun src/server.ts
# Build for npm
bun run buildServer deployment
The server needs these files:
src/server.ts
src/core/types.ts
src/core/petState.ts
src/payment/wechatpay.ts
certs/wechatpay/
.env
tsconfig.jsonCopy .env.example to .env and fill in your keys.
Commands
| Command | Effect | |---------|--------| | feed / 喂食 | +25 belly | | pet / 摸摸 | +affinity | | sleep / 睡觉 | full energy | | talk / 说话 | chat with your pet | | help / 帮助 | show commands | | english / 中文 | switch language |
