cli-pet 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/dist/art/animations.d.ts +4 -0
- package/dist/art/animations.d.ts.map +1 -0
- package/dist/art/animations.js +26 -0
- package/dist/art/animations.js.map +1 -0
- package/dist/art/ascii.d.ts +4 -0
- package/dist/art/ascii.d.ts.map +1 -0
- package/dist/art/ascii.js +291 -0
- package/dist/art/ascii.js.map +1 -0
- package/dist/art/colors.d.ts +26 -0
- package/dist/art/colors.d.ts.map +1 -0
- package/dist/art/colors.js +57 -0
- package/dist/art/colors.js.map +1 -0
- package/dist/commands/adopt.d.ts +2 -0
- package/dist/commands/adopt.d.ts.map +1 -0
- package/dist/commands/adopt.js +104 -0
- package/dist/commands/adopt.js.map +1 -0
- package/dist/commands/feed.d.ts +2 -0
- package/dist/commands/feed.d.ts.map +1 -0
- package/dist/commands/feed.js +61 -0
- package/dist/commands/feed.js.map +1 -0
- package/dist/commands/play.d.ts +2 -0
- package/dist/commands/play.d.ts.map +1 -0
- package/dist/commands/play.js +85 -0
- package/dist/commands/play.js.map +1 -0
- package/dist/commands/stats.d.ts +2 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +64 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +27 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/tips.d.ts +2 -0
- package/dist/commands/tips.d.ts.map +1 -0
- package/dist/commands/tips.js +87 -0
- package/dist/commands/tips.js.map +1 -0
- package/dist/github/activity.d.ts +3 -0
- package/dist/github/activity.d.ts.map +1 -0
- package/dist/github/activity.js +115 -0
- package/dist/github/activity.js.map +1 -0
- package/dist/github/analyzer.d.ts +5 -0
- package/dist/github/analyzer.d.ts.map +1 -0
- package/dist/github/analyzer.js +23 -0
- package/dist/github/analyzer.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/pet/engine.d.ts +8 -0
- package/dist/pet/engine.d.ts.map +1 -0
- package/dist/pet/engine.js +193 -0
- package/dist/pet/engine.js.map +1 -0
- package/dist/pet/persistence.d.ts +8 -0
- package/dist/pet/persistence.d.ts.map +1 -0
- package/dist/pet/persistence.js +28 -0
- package/dist/pet/persistence.js.map +1 -0
- package/dist/pet/types.d.ts +44 -0
- package/dist/pet/types.d.ts.map +1 -0
- package/dist/pet/types.js +15 -0
- package/dist/pet/types.js.map +1 -0
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +33 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/display.d.ts +7 -0
- package/dist/utils/display.d.ts.map +1 -0
- package/dist/utils/display.js +83 -0
- package/dist/utils/display.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# 🐾 cli-pet — A GitHub-Powered Virtual Pet for Your Terminal
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://github.com/features/copilot/cli)
|
|
5
|
+
|
|
6
|
+
> **A Tamagotchi-style virtual pet that lives in your terminal and reacts to your real GitHub activity.** Feed it commits, keep it healthy with green builds, make it happy with merged PRs, and energize it with coding streaks!
|
|
7
|
+
|
|
8
|
+
## ✨ Features
|
|
9
|
+
|
|
10
|
+
- 🐱🐶🐉🐙 **4 adorable pet species** — Cat, Dog, Dragon, and Octocat
|
|
11
|
+
- 📊 **GitHub-powered stats** — Your real coding activity drives your pet's health
|
|
12
|
+
- 🎮 **Interactive mini-games** — Play with your pet in the terminal
|
|
13
|
+
- 🧠 **Smart coding tips** — Your pet gives personalized advice based on your habits
|
|
14
|
+
- 🎨 **Beautiful ASCII art** — Expressive pet states with color-coded mood indicators
|
|
15
|
+
- 💾 **Persistent state** — Your pet remembers you between sessions
|
|
16
|
+
|
|
17
|
+
## 🚀 Quick Start
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
|
|
21
|
+
- **Node.js** 18+
|
|
22
|
+
- **GitHub CLI** (`gh`) authenticated, or a `GITHUB_TOKEN` environment variable
|
|
23
|
+
|
|
24
|
+
### Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Clone the repository
|
|
28
|
+
git clone https://github.com/YOUR_USERNAME/cli-pet.git
|
|
29
|
+
cd cli-pet
|
|
30
|
+
|
|
31
|
+
# Install dependencies & build
|
|
32
|
+
npm install && npm run build
|
|
33
|
+
|
|
34
|
+
# Link globally (optional)
|
|
35
|
+
npm link
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Usage
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Adopt your first pet! 🏠
|
|
42
|
+
cli-pet adopt
|
|
43
|
+
|
|
44
|
+
# Check on your pet 👀
|
|
45
|
+
cli-pet status
|
|
46
|
+
|
|
47
|
+
# Feed your pet with GitHub activity 🍕
|
|
48
|
+
cli-pet feed
|
|
49
|
+
|
|
50
|
+
# Play a mini-game 🎮
|
|
51
|
+
cli-pet play
|
|
52
|
+
|
|
53
|
+
# View detailed GitHub stats 📊
|
|
54
|
+
cli-pet stats
|
|
55
|
+
|
|
56
|
+
# Get coding tips from your pet 🧠
|
|
57
|
+
cli-pet tips
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 📖 How It Works
|
|
61
|
+
|
|
62
|
+
Your pet has **4 core stats**, each driven by your real GitHub activity:
|
|
63
|
+
|
|
64
|
+
| Stat | Emoji | Driven By | Effect |
|
|
65
|
+
|------|-------|-----------|--------|
|
|
66
|
+
| **Hunger** | 🍕 | Your commits | More commits = well-fed pet |
|
|
67
|
+
| **Health** | ❤️ | CI/CD status | Green builds = healthy pet |
|
|
68
|
+
| **Happiness** | 😊 | Merged PRs & reviews | Collaboration = happy pet |
|
|
69
|
+
| **Energy** | ⚡ | Coding streaks | Consistent activity = energized pet |
|
|
70
|
+
|
|
71
|
+
Stats **decay over time** — if you don't code, your pet gets hungry and sad! Run `cli-pet feed` regularly to keep your pet happy.
|
|
72
|
+
|
|
73
|
+
### Pet Moods
|
|
74
|
+
|
|
75
|
+
Your pet's mood changes based on its overall stats:
|
|
76
|
+
|
|
77
|
+
- 🌟 **Ecstatic** — All stats above 85%
|
|
78
|
+
- 😊 **Happy** — Balanced, healthy stats
|
|
79
|
+
- 😢 **Sad** — Low happiness or declining stats
|
|
80
|
+
- 🍕 **Hungry** — Haven't committed in a while
|
|
81
|
+
- 🤒 **Sick** — CI builds are failing
|
|
82
|
+
- 😴 **Sleeping** — Low energy, needs activity
|
|
83
|
+
- 💀 **Fainted** — Critical stats! Feed immediately!
|
|
84
|
+
|
|
85
|
+
### Leveling Up
|
|
86
|
+
|
|
87
|
+
Your pet earns **XP** from your GitHub activity:
|
|
88
|
+
- Each commit = **5 XP**
|
|
89
|
+
- Each merged PR = **20 XP**
|
|
90
|
+
- Each code review = **10 XP**
|
|
91
|
+
- Each streak day = **3 XP**
|
|
92
|
+
|
|
93
|
+
Every **100 XP** = 1 level up! 🎉
|
|
94
|
+
|
|
95
|
+
## 🏗️ Architecture
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
src/
|
|
99
|
+
├── index.ts # CLI entry point (Commander.js)
|
|
100
|
+
├── commands/
|
|
101
|
+
│ ├── adopt.ts # Interactive pet adoption
|
|
102
|
+
│ ├── status.ts # Pet status display
|
|
103
|
+
│ ├── feed.ts # GitHub activity → pet feeding
|
|
104
|
+
│ ├── play.ts # Mini-game
|
|
105
|
+
│ ├── stats.ts # Detailed GitHub stats
|
|
106
|
+
│ └── tips.ts # AI-powered coding tips
|
|
107
|
+
├── pet/
|
|
108
|
+
│ ├── engine.ts # State machine & stat calculations
|
|
109
|
+
│ ├── types.ts # TypeScript interfaces
|
|
110
|
+
│ └── persistence.ts # Save/load pet state
|
|
111
|
+
├── github/
|
|
112
|
+
│ ├── activity.ts # GitHub API integration
|
|
113
|
+
│ └── analyzer.ts # Activity → stat mapping
|
|
114
|
+
├── art/
|
|
115
|
+
│ ├── ascii.ts # ASCII art for all species & moods
|
|
116
|
+
│ ├── animations.ts # Terminal animations
|
|
117
|
+
│ └── colors.ts # Color theming
|
|
118
|
+
└── utils/
|
|
119
|
+
├── config.ts # Config management
|
|
120
|
+
└── display.ts # Terminal rendering
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 🛠️ Tech Stack
|
|
124
|
+
|
|
125
|
+
- **TypeScript** — Type-safe codebase
|
|
126
|
+
- **Commander.js** — CLI argument parsing
|
|
127
|
+
- **Octokit** — GitHub API client
|
|
128
|
+
- **Chalk** — Terminal colors
|
|
129
|
+
- **Boxen** — Terminal boxes
|
|
130
|
+
- **Figlet** — ASCII text art
|
|
131
|
+
- **Ora** — Loading spinners
|
|
132
|
+
- **Conf** — Persistent configuration
|
|
133
|
+
|
|
134
|
+
## 🤝 Built with GitHub Copilot CLI
|
|
135
|
+
|
|
136
|
+
This entire project was built using **GitHub Copilot CLI** as my AI-powered coding companion. Copilot CLI helped with:
|
|
137
|
+
|
|
138
|
+
- 🏗️ **Architecture design** — Planning the project structure and module boundaries
|
|
139
|
+
- 💻 **Code generation** — Writing TypeScript code across all modules
|
|
140
|
+
- 🐛 **Debugging** — Identifying and fixing issues in real-time
|
|
141
|
+
- 🔍 **Code exploration** — Understanding GitHub API responses and library interfaces
|
|
142
|
+
- 📝 **Documentation** — Generating this README and inline documentation
|
|
143
|
+
|
|
144
|
+
## 📄 License
|
|
145
|
+
|
|
146
|
+
MIT © 2026
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
**Made with 💜 and GitHub Copilot CLI**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../src/art/animations.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhF;AAED,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/E;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAS/C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Terminal animations
|
|
2
|
+
import { setTimeout as sleep } from 'timers/promises';
|
|
3
|
+
export async function typeWriter(text, delay = 30) {
|
|
4
|
+
for (const char of text) {
|
|
5
|
+
process.stdout.write(char);
|
|
6
|
+
await sleep(delay);
|
|
7
|
+
}
|
|
8
|
+
process.stdout.write('\n');
|
|
9
|
+
}
|
|
10
|
+
export async function fadeIn(lines, delay = 80) {
|
|
11
|
+
for (const line of lines) {
|
|
12
|
+
console.log(line);
|
|
13
|
+
await sleep(delay);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export async function celebrate() {
|
|
17
|
+
const frames = ['🎉', '🎊', '✨', '⭐', '🌟', '💫', '🎆'];
|
|
18
|
+
for (let i = 0; i < 3; i++) {
|
|
19
|
+
for (const frame of frames) {
|
|
20
|
+
process.stdout.write(`\r ${frame} `);
|
|
21
|
+
await sleep(60);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
process.stdout.write('\r');
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=animations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../src/art/animations.ts"],"names":[],"mappings":"AAAA,sBAAsB;AAEtB,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY,EAAE,QAAgB,EAAE;IAC/D,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,KAAe,EAAE,QAAgB,EAAE;IAC9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,GAAG,CAAC,CAAC;YACtC,MAAM,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ascii.d.ts","sourceRoot":"","sources":["../../src/art/ascii.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA6RtD,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAGtE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMhF"}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// ASCII art for each pet species and mood
|
|
2
|
+
const catArt = {
|
|
3
|
+
happy: `
|
|
4
|
+
/\\_/\\
|
|
5
|
+
( ^.^ )
|
|
6
|
+
> ^ <
|
|
7
|
+
/| |\\
|
|
8
|
+
(_| |_)
|
|
9
|
+
`,
|
|
10
|
+
ecstatic: `
|
|
11
|
+
/\\_/\\ ♥
|
|
12
|
+
( ★▽★) ♥
|
|
13
|
+
> ^ < ♥
|
|
14
|
+
/| |\\
|
|
15
|
+
(_| |_)
|
|
16
|
+
`,
|
|
17
|
+
sad: `
|
|
18
|
+
/\\_/\\
|
|
19
|
+
( ;.; )
|
|
20
|
+
> ^ <
|
|
21
|
+
/| |\\
|
|
22
|
+
(_| |_)
|
|
23
|
+
`,
|
|
24
|
+
hungry: `
|
|
25
|
+
/\\_/\\
|
|
26
|
+
( o.o )
|
|
27
|
+
> ~ <
|
|
28
|
+
/| |\\ ?
|
|
29
|
+
(_| |_)
|
|
30
|
+
`,
|
|
31
|
+
sick: `
|
|
32
|
+
/\\_/\\
|
|
33
|
+
( x.x )
|
|
34
|
+
> ~ <
|
|
35
|
+
/| |\\
|
|
36
|
+
(_| |_) ~
|
|
37
|
+
`,
|
|
38
|
+
sleeping: `
|
|
39
|
+
/\\_/\\
|
|
40
|
+
( -.- ) z
|
|
41
|
+
> ^ < zz
|
|
42
|
+
/| |\\zzz
|
|
43
|
+
(_| |_)
|
|
44
|
+
`,
|
|
45
|
+
playing: `
|
|
46
|
+
/\\_/\\
|
|
47
|
+
( >w< ) ~♪
|
|
48
|
+
> ^ <
|
|
49
|
+
/| _ |\\
|
|
50
|
+
(_| |_)
|
|
51
|
+
`,
|
|
52
|
+
dead: `
|
|
53
|
+
/\\_/\\
|
|
54
|
+
( x_x )
|
|
55
|
+
> - <
|
|
56
|
+
/| |\\
|
|
57
|
+
(_|___|_)
|
|
58
|
+
`,
|
|
59
|
+
};
|
|
60
|
+
const dogArt = {
|
|
61
|
+
happy: `
|
|
62
|
+
/ \\__
|
|
63
|
+
( @\\___
|
|
64
|
+
/ O
|
|
65
|
+
/ (_____/
|
|
66
|
+
/_____/ U
|
|
67
|
+
`,
|
|
68
|
+
ecstatic: `
|
|
69
|
+
/ \\__ ♥ ♥
|
|
70
|
+
( @\\___
|
|
71
|
+
/ O
|
|
72
|
+
/ (_____/
|
|
73
|
+
/_____/ U U
|
|
74
|
+
`,
|
|
75
|
+
sad: `
|
|
76
|
+
/ \\__
|
|
77
|
+
( ;\\___
|
|
78
|
+
/ O
|
|
79
|
+
/ (_____/
|
|
80
|
+
/_____/ U
|
|
81
|
+
`,
|
|
82
|
+
hungry: `
|
|
83
|
+
/ \\__ ?
|
|
84
|
+
( o\\___
|
|
85
|
+
/ O
|
|
86
|
+
/ (_____/
|
|
87
|
+
/_____/ U
|
|
88
|
+
`,
|
|
89
|
+
sick: `
|
|
90
|
+
/ \\__ ~
|
|
91
|
+
( x\\___
|
|
92
|
+
/ O
|
|
93
|
+
/ (_____/
|
|
94
|
+
/_____/ U
|
|
95
|
+
`,
|
|
96
|
+
sleeping: `
|
|
97
|
+
/ \\__
|
|
98
|
+
( -\\___ zzz
|
|
99
|
+
/ O
|
|
100
|
+
/ (_____/
|
|
101
|
+
/_____/ U
|
|
102
|
+
`,
|
|
103
|
+
playing: `
|
|
104
|
+
/ \\__ ♪
|
|
105
|
+
( >\\___
|
|
106
|
+
/ __ O
|
|
107
|
+
/ (_____/
|
|
108
|
+
/_____/ U U
|
|
109
|
+
`,
|
|
110
|
+
dead: `
|
|
111
|
+
/ \\__
|
|
112
|
+
( x\\___
|
|
113
|
+
/ O
|
|
114
|
+
/ (___x_/
|
|
115
|
+
/_____/ U
|
|
116
|
+
`,
|
|
117
|
+
};
|
|
118
|
+
const dragonArt = {
|
|
119
|
+
happy: `
|
|
120
|
+
/\\ /\\
|
|
121
|
+
/ \\/ \\
|
|
122
|
+
/ ( ^^ ) \\
|
|
123
|
+
/ ( <> ) \\
|
|
124
|
+
| |
|
|
125
|
+
/| /\\ /|\\
|
|
126
|
+
/ |/ \\| \\
|
|
127
|
+
~~~~
|
|
128
|
+
`,
|
|
129
|
+
ecstatic: `
|
|
130
|
+
/\\ /\\ 🔥
|
|
131
|
+
/ \\/ \\
|
|
132
|
+
/ ( ★★ ) \\
|
|
133
|
+
/ ( <> ) \\
|
|
134
|
+
| |
|
|
135
|
+
/| /\\ /|\\
|
|
136
|
+
/ |/ \\| \\
|
|
137
|
+
~~~~
|
|
138
|
+
`,
|
|
139
|
+
sad: `
|
|
140
|
+
/\\ /\\
|
|
141
|
+
/ \\/ \\
|
|
142
|
+
/ ( ;; ) \\
|
|
143
|
+
/ ( <> ) \\
|
|
144
|
+
| |
|
|
145
|
+
/| /\\ /|\\
|
|
146
|
+
/ |/ \\| \\
|
|
147
|
+
~~~~
|
|
148
|
+
`,
|
|
149
|
+
hungry: `
|
|
150
|
+
/\\ /\\
|
|
151
|
+
/ \\/ \\
|
|
152
|
+
/ ( oo ) \\
|
|
153
|
+
/ ( <> ) \\ ?
|
|
154
|
+
| |
|
|
155
|
+
/| /\\ /|\\
|
|
156
|
+
/ |/ \\| \\
|
|
157
|
+
~~~~
|
|
158
|
+
`,
|
|
159
|
+
sick: `
|
|
160
|
+
/\\ /\\
|
|
161
|
+
/ \\/ \\ ~
|
|
162
|
+
/ ( xx ) \\
|
|
163
|
+
/ ( <> ) \\
|
|
164
|
+
| |
|
|
165
|
+
/| /\\ /|\\
|
|
166
|
+
/ |/ \\| \\
|
|
167
|
+
~~~~
|
|
168
|
+
`,
|
|
169
|
+
sleeping: `
|
|
170
|
+
/\\ /\\
|
|
171
|
+
/ \\/ \\
|
|
172
|
+
/ ( -- ) \\ zzz
|
|
173
|
+
/ ( <> ) \\
|
|
174
|
+
| |
|
|
175
|
+
/| /\\ /|\\
|
|
176
|
+
/ |/ \\| \\
|
|
177
|
+
~~~~
|
|
178
|
+
`,
|
|
179
|
+
playing: `
|
|
180
|
+
/\\ /\\ 🔥
|
|
181
|
+
/ \\/ \\
|
|
182
|
+
/ ( >< ) \\
|
|
183
|
+
/ ( <> ) \\
|
|
184
|
+
| |
|
|
185
|
+
/| /\\ /|\\
|
|
186
|
+
/ |/ \\| \\
|
|
187
|
+
~~~~
|
|
188
|
+
`,
|
|
189
|
+
dead: `
|
|
190
|
+
/\\ /\\
|
|
191
|
+
/ \\/ \\
|
|
192
|
+
/ ( xx ) \\
|
|
193
|
+
/ ( -- ) \\
|
|
194
|
+
| |
|
|
195
|
+
/| /\\ /|\\
|
|
196
|
+
/ |/ \\| \\
|
|
197
|
+
....
|
|
198
|
+
`,
|
|
199
|
+
};
|
|
200
|
+
const octocatArt = {
|
|
201
|
+
happy: `
|
|
202
|
+
MMM
|
|
203
|
+
(o o)
|
|
204
|
+
/( Y )\\
|
|
205
|
+
\\ | /
|
|
206
|
+
|||
|
|
207
|
+
_|||_
|
|
208
|
+
| |
|
|
209
|
+
`,
|
|
210
|
+
ecstatic: `
|
|
211
|
+
MMM ♥
|
|
212
|
+
(★ ★) ♥
|
|
213
|
+
/( Y )\\
|
|
214
|
+
\\ | /
|
|
215
|
+
|||
|
|
216
|
+
_|||_
|
|
217
|
+
| |
|
|
218
|
+
`,
|
|
219
|
+
sad: `
|
|
220
|
+
MMM
|
|
221
|
+
(; ;)
|
|
222
|
+
/( Y )\\
|
|
223
|
+
\\ | /
|
|
224
|
+
|||
|
|
225
|
+
_|||_
|
|
226
|
+
| |
|
|
227
|
+
`,
|
|
228
|
+
hungry: `
|
|
229
|
+
MMM
|
|
230
|
+
(o o) ?
|
|
231
|
+
/( Y )\\
|
|
232
|
+
\\ | /
|
|
233
|
+
|||
|
|
234
|
+
_|||_
|
|
235
|
+
| |
|
|
236
|
+
`,
|
|
237
|
+
sick: `
|
|
238
|
+
MMM ~
|
|
239
|
+
(x x)
|
|
240
|
+
/( Y )\\
|
|
241
|
+
\\ | /
|
|
242
|
+
|||
|
|
243
|
+
_|||_
|
|
244
|
+
| |
|
|
245
|
+
`,
|
|
246
|
+
sleeping: `
|
|
247
|
+
MMM
|
|
248
|
+
(- -) zzz
|
|
249
|
+
/( Y )\\
|
|
250
|
+
\\ | /
|
|
251
|
+
|||
|
|
252
|
+
_|||_
|
|
253
|
+
| |
|
|
254
|
+
`,
|
|
255
|
+
playing: `
|
|
256
|
+
MMM ♪
|
|
257
|
+
(> <)
|
|
258
|
+
/( Y )\\
|
|
259
|
+
\\ | / ~
|
|
260
|
+
|||
|
|
261
|
+
_|||_
|
|
262
|
+
| |
|
|
263
|
+
`,
|
|
264
|
+
dead: `
|
|
265
|
+
MMM
|
|
266
|
+
(x_x)
|
|
267
|
+
/( Y )\\
|
|
268
|
+
\\ | /
|
|
269
|
+
|||
|
|
270
|
+
_|||_
|
|
271
|
+
|_____|
|
|
272
|
+
`,
|
|
273
|
+
};
|
|
274
|
+
const artMap = {
|
|
275
|
+
cat: catArt,
|
|
276
|
+
dog: dogArt,
|
|
277
|
+
dragon: dragonArt,
|
|
278
|
+
octocat: octocatArt,
|
|
279
|
+
};
|
|
280
|
+
export function getAsciiArt(species, mood) {
|
|
281
|
+
const speciesArt = artMap[species];
|
|
282
|
+
return speciesArt[mood] || speciesArt['happy'];
|
|
283
|
+
}
|
|
284
|
+
export function getStatusBar(label, value, emoji) {
|
|
285
|
+
const filled = Math.round(value / 5);
|
|
286
|
+
const empty = 20 - filled;
|
|
287
|
+
const bar = '█'.repeat(filled) + '░'.repeat(empty);
|
|
288
|
+
const percentage = `${value}%`.padStart(4);
|
|
289
|
+
return `${emoji} ${label.padEnd(10)} ${bar} ${percentage}`;
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=ascii.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ascii.js","sourceRoot":"","sources":["../../src/art/ascii.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAI1C,MAAM,MAAM,GAA2B;IACrC,KAAK,EAAE;;;;;;GAMN;IACD,QAAQ,EAAE;;;;;;GAMT;IACD,GAAG,EAAE;;;;;;GAMJ;IACD,MAAM,EAAE;;;;;;GAMP;IACD,IAAI,EAAE;;;;;;GAML;IACD,QAAQ,EAAE;;;;;;GAMT;IACD,OAAO,EAAE;;;;;;GAMR;IACD,IAAI,EAAE;;;;;;GAML;CACF,CAAC;AAEF,MAAM,MAAM,GAA2B;IACrC,KAAK,EAAE;;;;;;GAMN;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AG,CAAC,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,EAAE,GAAG,MAAM,CAAC;IAC1B,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,GAAG,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3C,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PetMood } from '../pet/types.js';
|
|
2
|
+
export declare const colors: {
|
|
3
|
+
title: import("chalk").ChalkInstance;
|
|
4
|
+
subtitle: import("chalk").ChalkInstance;
|
|
5
|
+
success: import("chalk").ChalkInstance;
|
|
6
|
+
warning: import("chalk").ChalkInstance;
|
|
7
|
+
danger: import("chalk").ChalkInstance;
|
|
8
|
+
info: import("chalk").ChalkInstance;
|
|
9
|
+
highlight: import("chalk").ChalkInstance;
|
|
10
|
+
muted: import("chalk").ChalkInstance;
|
|
11
|
+
pet: import("chalk").ChalkInstance;
|
|
12
|
+
stat: {
|
|
13
|
+
hunger: import("chalk").ChalkInstance;
|
|
14
|
+
health: import("chalk").ChalkInstance;
|
|
15
|
+
happiness: import("chalk").ChalkInstance;
|
|
16
|
+
energy: import("chalk").ChalkInstance;
|
|
17
|
+
};
|
|
18
|
+
level: import("chalk").ChalkInstance;
|
|
19
|
+
xp: import("chalk").ChalkInstance;
|
|
20
|
+
streak: import("chalk").ChalkInstance;
|
|
21
|
+
};
|
|
22
|
+
export declare function getMoodColor(mood: PetMood): (text: string) => string;
|
|
23
|
+
export declare function colorizeArt(art: string, mood: PetMood): string;
|
|
24
|
+
export declare function statColor(value: number): (text: string) => string;
|
|
25
|
+
export declare function colorizedBar(label: string, value: number, emoji: string): string;
|
|
26
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/art/colors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAmBlB,CAAC;AAEF,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAYpE;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAG9D;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAKjE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Color theming for the terminal display
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
export const colors = {
|
|
4
|
+
title: chalk.bold.magentaBright,
|
|
5
|
+
subtitle: chalk.dim,
|
|
6
|
+
success: chalk.green,
|
|
7
|
+
warning: chalk.yellow,
|
|
8
|
+
danger: chalk.red,
|
|
9
|
+
info: chalk.cyan,
|
|
10
|
+
highlight: chalk.bold.white,
|
|
11
|
+
muted: chalk.gray,
|
|
12
|
+
pet: chalk.yellowBright,
|
|
13
|
+
stat: {
|
|
14
|
+
hunger: chalk.hex('#FF6B35'),
|
|
15
|
+
health: chalk.hex('#FF4444'),
|
|
16
|
+
happiness: chalk.hex('#44BB44'),
|
|
17
|
+
energy: chalk.hex('#FFD700'),
|
|
18
|
+
},
|
|
19
|
+
level: chalk.bold.hex('#9B59B6'),
|
|
20
|
+
xp: chalk.hex('#3498DB'),
|
|
21
|
+
streak: chalk.hex('#E67E22'),
|
|
22
|
+
};
|
|
23
|
+
export function getMoodColor(mood) {
|
|
24
|
+
const moodColors = {
|
|
25
|
+
happy: chalk.green,
|
|
26
|
+
ecstatic: chalk.magentaBright,
|
|
27
|
+
sad: chalk.blue,
|
|
28
|
+
hungry: chalk.yellow,
|
|
29
|
+
sick: chalk.red,
|
|
30
|
+
sleeping: chalk.gray,
|
|
31
|
+
playing: chalk.cyan,
|
|
32
|
+
dead: chalk.dim.red,
|
|
33
|
+
};
|
|
34
|
+
return moodColors[mood];
|
|
35
|
+
}
|
|
36
|
+
export function colorizeArt(art, mood) {
|
|
37
|
+
const color = getMoodColor(mood);
|
|
38
|
+
return color(art);
|
|
39
|
+
}
|
|
40
|
+
export function statColor(value) {
|
|
41
|
+
if (value >= 75)
|
|
42
|
+
return chalk.green;
|
|
43
|
+
if (value >= 50)
|
|
44
|
+
return chalk.yellow;
|
|
45
|
+
if (value >= 25)
|
|
46
|
+
return chalk.hex('#FF6B35');
|
|
47
|
+
return chalk.red;
|
|
48
|
+
}
|
|
49
|
+
export function colorizedBar(label, value, emoji) {
|
|
50
|
+
const filled = Math.round(value / 5);
|
|
51
|
+
const empty = 20 - filled;
|
|
52
|
+
const color = statColor(value);
|
|
53
|
+
const bar = color('█'.repeat(filled)) + chalk.gray('░'.repeat(empty));
|
|
54
|
+
const percentage = color(`${value}%`.padStart(4));
|
|
55
|
+
return `${emoji} ${chalk.bold(label.padEnd(10))} ${bar} ${percentage}`;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/art/colors.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,aAAa;IAC/B,QAAQ,EAAE,KAAK,CAAC,GAAG;I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