tamaterm 0.1.0__tar.gz

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.
@@ -0,0 +1,18 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(python -m pytest tests/ -v)",
5
+ "Bash(python -c \"from tamaterm.cli import cli; cli\\(['--help']\\)\")",
6
+ "Bash(python -c ' *)",
7
+ "Bash(python *)",
8
+ "Bash(git add *)",
9
+ "Bash(git commit *)",
10
+ "Bash(git push *)",
11
+ "Bash(pip install *)"
12
+ ]
13
+ },
14
+ "enableAllProjectMcpServers": true,
15
+ "enabledMcpjsonServers": [
16
+ "gemini-vision"
17
+ ]
18
+ }
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .pytest_cache/
10
+ .ruff_cache/
11
+ *.so
12
+ .venv/
13
+ venv/
tamaterm-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tamaterm contributors
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.
@@ -0,0 +1,149 @@
1
+ Metadata-Version: 2.4
2
+ Name: tamaterm
3
+ Version: 0.1.0
4
+ Summary: A virtual pet that lives in your terminal
5
+ Project-URL: Homepage, https://github.com/tamaterm/tamaterm
6
+ Project-URL: Repository, https://github.com/tamaterm/tamaterm
7
+ Project-URL: Issues, https://github.com/tamaterm/tamaterm/issues
8
+ Author: tamaterm contributors
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ascii-art,cli,pet,tamagotchi,terminal,virtual-pet
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Games/Entertainment
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Requires-Python: >=3.9
26
+ Requires-Dist: click>=8.0
27
+ Requires-Dist: psutil>=5.9
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest-cov; extra == 'dev'
30
+ Requires-Dist: pytest>=7.0; extra == 'dev'
31
+ Requires-Dist: ruff; extra == 'dev'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # tamaterm
35
+
36
+ A virtual pet that lives in your terminal.
37
+
38
+ ```
39
+ ┌────────────────────────┐
40
+ │ ★ Whiskers [adult] │
41
+ │ /\_____/\ │
42
+ │ / * * \ │
43
+ │ ( == w == ) │
44
+ │ ) ♪ ( │
45
+ │ ( ) │
46
+ │ hunger [████████████░░] 85.0 │
47
+ │ happy [██████████████] 92.0 │
48
+ │ energy [████████░░░░░░] 55.0 │
49
+ │ clean [██████████░░░░] 70.0 │
50
+ └────────────────────────┘
51
+ ```
52
+
53
+ ## What is this?
54
+
55
+ tamaterm is a Tamagotchi-style virtual pet that lives in your terminal prompt.
56
+ It reacts to your developer workflow -- git commits make it happy, CPU spikes
57
+ stress it out, and it grows through life stages the longer you care for it.
58
+
59
+ **It's not a TUI app.** It lives *in* your prompt, above every command you type.
60
+
61
+ ## Install
62
+
63
+ ```bash
64
+ pip install tamaterm
65
+ ```
66
+
67
+ ## Quick Start
68
+
69
+ ```bash
70
+ # Create your pet
71
+ tamaterm init Whiskers --type cat
72
+
73
+ # Install the shell hook (adds pet above your prompt)
74
+ tamaterm install
75
+
76
+ # Restart your terminal, then care for your pet
77
+ tamaterm feed
78
+ tamaterm play
79
+ tamaterm clean
80
+ ```
81
+
82
+ ## How it works
83
+
84
+ ```
85
+ Background daemon (tamaterm daemon)
86
+ ├── Monitors: git status, CPU, memory, time
87
+ ├── Updates: ~/.tamaterm/pet.json (state)
88
+ └── Writes: ~/.tamaterm/status.txt (display)
89
+
90
+ Shell hook (in your .bashrc/.zshrc/profile)
91
+ └── cat ~/.tamaterm/status.txt before prompt
92
+
93
+ CLI (tamaterm feed/play/clean/sleep)
94
+ └── Modifies pet.json, daemon picks up changes
95
+ ```
96
+
97
+ ## Features
98
+
99
+ - **Growth system**: Egg -> Baby -> Teen -> Adult (care-dependent)
100
+ - **Reactive**: Happy when you commit code, stressed during CPU spikes
101
+ - **Stat decay**: Hunger, happiness, energy, hygiene decay over time
102
+ - **Night mode**: Pet sleeps automatically at night
103
+ - **Multi-shell**: Bash, Zsh, PowerShell, Fish
104
+ - **Cross-platform**: Linux, macOS, Windows
105
+ - **Lightweight**: 2 dependencies (click, psutil), ~50KB installed
106
+
107
+ ## Pet Types
108
+
109
+ | Pet | ASCII | Personality |
110
+ |-----|-------|-------------|
111
+ | Cat | `/\_/\ (o.o)` | Independent, clean |
112
+ | Dog | `/\ /\ (o.o)` | Loyal, energetic |
113
+ | Slime | `(oo)` | Easy to care for |
114
+
115
+ ## Commands
116
+
117
+ | Command | Effect |
118
+ |---------|--------|
119
+ | `tamaterm init` | Create a new pet |
120
+ | `tamaterm feed` | Feed your pet |
121
+ | `tamaterm play` | Play with your pet |
122
+ | `tamaterm clean` | Clean your pet |
123
+ | `tamaterm sleep` | Put pet to bed |
124
+ | `tamaterm status` | Show detailed stats |
125
+ | `tamaterm doctor` | Diagnose issues |
126
+ | `tamaterm install` | Install shell hook |
127
+ | `tamaterm uninstall` | Remove shell hook |
128
+ | `tamaterm start` | Start daemon |
129
+ | `tamaterm stop` | Stop daemon |
130
+ | `tamaterm revive` | Revive a dead pet |
131
+
132
+ ## How the pet reacts
133
+
134
+ | Event | Pet reaction |
135
+ |-------|-------------|
136
+ | Git commit | Happiness +8 |
137
+ | New branch | Happiness +5 |
138
+ | CPU > 80% | Energy -5, Happiness -3 |
139
+ | Memory > 90% | Energy -3, Happiness -2 |
140
+ | Night (0-6am) | Auto-sleeps |
141
+
142
+ ## Contributing
143
+
144
+ Add a new pet! Create a file in `src/tamaterm/art/` with ASCII art for each
145
+ stage and mood. See `art/cat.py` for the pattern.
146
+
147
+ ## License
148
+
149
+ MIT
@@ -0,0 +1,116 @@
1
+ # tamaterm
2
+
3
+ A virtual pet that lives in your terminal.
4
+
5
+ ```
6
+ ┌────────────────────────┐
7
+ │ ★ Whiskers [adult] │
8
+ │ /\_____/\ │
9
+ │ / * * \ │
10
+ │ ( == w == ) │
11
+ │ ) ♪ ( │
12
+ │ ( ) │
13
+ │ hunger [████████████░░] 85.0 │
14
+ │ happy [██████████████] 92.0 │
15
+ │ energy [████████░░░░░░] 55.0 │
16
+ │ clean [██████████░░░░] 70.0 │
17
+ └────────────────────────┘
18
+ ```
19
+
20
+ ## What is this?
21
+
22
+ tamaterm is a Tamagotchi-style virtual pet that lives in your terminal prompt.
23
+ It reacts to your developer workflow -- git commits make it happy, CPU spikes
24
+ stress it out, and it grows through life stages the longer you care for it.
25
+
26
+ **It's not a TUI app.** It lives *in* your prompt, above every command you type.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install tamaterm
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```bash
37
+ # Create your pet
38
+ tamaterm init Whiskers --type cat
39
+
40
+ # Install the shell hook (adds pet above your prompt)
41
+ tamaterm install
42
+
43
+ # Restart your terminal, then care for your pet
44
+ tamaterm feed
45
+ tamaterm play
46
+ tamaterm clean
47
+ ```
48
+
49
+ ## How it works
50
+
51
+ ```
52
+ Background daemon (tamaterm daemon)
53
+ ├── Monitors: git status, CPU, memory, time
54
+ ├── Updates: ~/.tamaterm/pet.json (state)
55
+ └── Writes: ~/.tamaterm/status.txt (display)
56
+
57
+ Shell hook (in your .bashrc/.zshrc/profile)
58
+ └── cat ~/.tamaterm/status.txt before prompt
59
+
60
+ CLI (tamaterm feed/play/clean/sleep)
61
+ └── Modifies pet.json, daemon picks up changes
62
+ ```
63
+
64
+ ## Features
65
+
66
+ - **Growth system**: Egg -> Baby -> Teen -> Adult (care-dependent)
67
+ - **Reactive**: Happy when you commit code, stressed during CPU spikes
68
+ - **Stat decay**: Hunger, happiness, energy, hygiene decay over time
69
+ - **Night mode**: Pet sleeps automatically at night
70
+ - **Multi-shell**: Bash, Zsh, PowerShell, Fish
71
+ - **Cross-platform**: Linux, macOS, Windows
72
+ - **Lightweight**: 2 dependencies (click, psutil), ~50KB installed
73
+
74
+ ## Pet Types
75
+
76
+ | Pet | ASCII | Personality |
77
+ |-----|-------|-------------|
78
+ | Cat | `/\_/\ (o.o)` | Independent, clean |
79
+ | Dog | `/\ /\ (o.o)` | Loyal, energetic |
80
+ | Slime | `(oo)` | Easy to care for |
81
+
82
+ ## Commands
83
+
84
+ | Command | Effect |
85
+ |---------|--------|
86
+ | `tamaterm init` | Create a new pet |
87
+ | `tamaterm feed` | Feed your pet |
88
+ | `tamaterm play` | Play with your pet |
89
+ | `tamaterm clean` | Clean your pet |
90
+ | `tamaterm sleep` | Put pet to bed |
91
+ | `tamaterm status` | Show detailed stats |
92
+ | `tamaterm doctor` | Diagnose issues |
93
+ | `tamaterm install` | Install shell hook |
94
+ | `tamaterm uninstall` | Remove shell hook |
95
+ | `tamaterm start` | Start daemon |
96
+ | `tamaterm stop` | Stop daemon |
97
+ | `tamaterm revive` | Revive a dead pet |
98
+
99
+ ## How the pet reacts
100
+
101
+ | Event | Pet reaction |
102
+ |-------|-------------|
103
+ | Git commit | Happiness +8 |
104
+ | New branch | Happiness +5 |
105
+ | CPU > 80% | Energy -5, Happiness -3 |
106
+ | Memory > 90% | Energy -3, Happiness -2 |
107
+ | Night (0-6am) | Auto-sleeps |
108
+
109
+ ## Contributing
110
+
111
+ Add a new pet! Create a file in `src/tamaterm/art/` with ASCII art for each
112
+ stage and mood. See `art/cat.py` for the pattern.
113
+
114
+ ## License
115
+
116
+ MIT
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "tamaterm"
7
+ version = "0.1.0"
8
+ description = "A virtual pet that lives in your terminal"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "tamaterm contributors" },
14
+ ]
15
+ keywords = ["terminal", "pet", "virtual-pet", "cli", "tamagotchi", "ascii-art"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Topic :: Software Development :: Libraries :: Python Modules",
29
+ "Topic :: Games/Entertainment",
30
+ ]
31
+ dependencies = [
32
+ "click>=8.0",
33
+ "psutil>=5.9",
34
+ ]
35
+
36
+ [project.optional-dependencies]
37
+ dev = [
38
+ "pytest>=7.0",
39
+ "pytest-cov",
40
+ "ruff",
41
+ ]
42
+
43
+ [project.scripts]
44
+ tamaterm = "tamaterm.cli:cli"
45
+
46
+ [project.urls]
47
+ Homepage = "https://github.com/tamaterm/tamaterm"
48
+ Repository = "https://github.com/tamaterm/tamaterm"
49
+ Issues = "https://github.com/tamaterm/tamaterm/issues"
50
+
51
+ [tool.hatch.build.targets.wheel]
52
+ packages = ["src/tamaterm"]
53
+
54
+ [tool.ruff]
55
+ line-length = 100
56
+ target-version = "py39"
57
+
58
+ [tool.pytest.ini_options]
59
+ testpaths = ["tests"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
File without changes
@@ -0,0 +1,273 @@
1
+ from ..art_registry import register_art, register_art_default
2
+ from ..constants import PetType, Stage, Mood
3
+
4
+
5
+ @register_art_default(PetType.CAT, Stage.EGG)
6
+ def cat_egg():
7
+ return [
8
+ " .---. ",
9
+ " / \\ ",
10
+ " | o | ",
11
+ " | | ",
12
+ " '-----' ",
13
+ ]
14
+
15
+
16
+ @register_art(PetType.CAT, Stage.EGG, Mood.HAPPY)
17
+ def cat_egg_happy():
18
+ return [
19
+ " .---. ",
20
+ " / \\ ",
21
+ " | * | ",
22
+ " | | ",
23
+ " '-----' ",
24
+ ]
25
+
26
+
27
+ @register_art(PetType.CAT, Stage.EGG, Mood.HUNGRY)
28
+ def cat_egg_hungry():
29
+ return [
30
+ " .---. ",
31
+ " / \\ ",
32
+ " | ~ | ",
33
+ " | | ",
34
+ " '-----' ",
35
+ ]
36
+
37
+
38
+ @register_art(PetType.CAT, Stage.EGG, Mood.SLEEPING)
39
+ def cat_egg_sleeping():
40
+ return [
41
+ " .---. ",
42
+ " / \\ ",
43
+ " | - | ",
44
+ " | | ",
45
+ " '-----' ",
46
+ " z Z z ",
47
+ ]
48
+
49
+
50
+ @register_art(PetType.CAT, Stage.EGG, Mood.SAD)
51
+ def cat_egg_sad():
52
+ return [
53
+ " .---. ",
54
+ " / \\ ",
55
+ " | . | ",
56
+ " | | ",
57
+ " '-----' ",
58
+ ]
59
+
60
+
61
+ @register_art(PetType.CAT, Stage.EGG, Mood.DEAD)
62
+ def cat_egg_dead():
63
+ return [
64
+ " .---. ",
65
+ " / \\ ",
66
+ " | x | ",
67
+ " | | ",
68
+ " '-----' ",
69
+ " RIP ",
70
+ ]
71
+
72
+
73
+ @register_art_default(PetType.CAT, Stage.BABY)
74
+ def cat_baby():
75
+ return [
76
+ " /\\_/\\ ",
77
+ " ( o.o ) ",
78
+ " > ^ < ",
79
+ ]
80
+
81
+
82
+ @register_art(PetType.CAT, Stage.BABY, Mood.HAPPY)
83
+ def cat_baby_happy():
84
+ return [
85
+ " /\\_/\\ ",
86
+ " ( ^.^ ) ",
87
+ " > ^ < ",
88
+ ]
89
+
90
+
91
+ @register_art(PetType.CAT, Stage.BABY, Mood.HUNGRY)
92
+ def cat_baby_hungry():
93
+ return [
94
+ " /\\_/\\ ",
95
+ " ( o.o ) ",
96
+ " > ~ < ",
97
+ ]
98
+
99
+
100
+ @register_art(PetType.CAT, Stage.BABY, Mood.SLEEPING)
101
+ def cat_baby_sleeping():
102
+ return [
103
+ " /\\_/\\ ",
104
+ " ( -.- ) ",
105
+ " > ^ < ",
106
+ " z Z z ",
107
+ ]
108
+
109
+
110
+ @register_art(PetType.CAT, Stage.BABY, Mood.SAD)
111
+ def cat_baby_sad():
112
+ return [
113
+ " /\\_/\\ ",
114
+ " ( ._. ) ",
115
+ " > ^ < ",
116
+ ]
117
+
118
+
119
+ @register_art(PetType.CAT, Stage.BABY, Mood.DEAD)
120
+ def cat_baby_dead():
121
+ return [
122
+ " /\\_/\\ ",
123
+ " ( x.x ) ",
124
+ " > ^ < ",
125
+ " RIP ",
126
+ ]
127
+
128
+
129
+ @register_art_default(PetType.CAT, Stage.TEEN)
130
+ def cat_teen():
131
+ return [
132
+ " /\\_/\\ ",
133
+ " ( o.o ) ",
134
+ " > ^ < ",
135
+ " /| |\\ ",
136
+ " (_| |_) ",
137
+ ]
138
+
139
+
140
+ @register_art(PetType.CAT, Stage.TEEN, Mood.HAPPY)
141
+ def cat_teen_happy():
142
+ return [
143
+ " /\\_/\\ ",
144
+ " ( ^.^ ) ",
145
+ " > ^ < ",
146
+ " /| |\\ ",
147
+ " (_| |_) ",
148
+ ]
149
+
150
+
151
+ @register_art(PetType.CAT, Stage.TEEN, Mood.SLEEPING)
152
+ def cat_teen_sleeping():
153
+ return [
154
+ " /\\_/\\ ",
155
+ " ( -.- ) ",
156
+ " > ^ < ",
157
+ " /| |\\ ",
158
+ " (_| |_) ",
159
+ " z Z z ",
160
+ ]
161
+
162
+
163
+ @register_art(PetType.CAT, Stage.TEEN, Mood.DEAD)
164
+ def cat_teen_dead():
165
+ return [
166
+ " /\\_/\\ ",
167
+ " ( x.x ) ",
168
+ " > ^ < ",
169
+ " /| |\\ ",
170
+ " (_| |_) ",
171
+ " RIP ",
172
+ ]
173
+
174
+
175
+ @register_art(PetType.CAT, Stage.TEEN, Mood.HUNGRY)
176
+ def cat_teen_hungry():
177
+ return [
178
+ " /\\_/\\ ",
179
+ " ( o.o ) ",
180
+ " > ~ < ",
181
+ " /| |\\ ",
182
+ " (_| |_) ",
183
+ ]
184
+
185
+
186
+ @register_art(PetType.CAT, Stage.TEEN, Mood.SAD)
187
+ def cat_teen_sad():
188
+ return [
189
+ " /\\_/\\ ",
190
+ " ( ._. ) ",
191
+ " > ^ < ",
192
+ " /| |\\ ",
193
+ " (_| |_) ",
194
+ ]
195
+
196
+
197
+ @register_art_default(PetType.CAT, Stage.ADULT)
198
+ def cat_adult():
199
+ return [
200
+ " /\\_____/\\ ",
201
+ " / o o \\ ",
202
+ " ( == ^ == ) ",
203
+ " ) ( ",
204
+ " ( ) ",
205
+ " ( ( ) ( ) ) ",
206
+ "(__|__|___|__|__)",
207
+ ]
208
+
209
+
210
+ @register_art(PetType.CAT, Stage.ADULT, Mood.HAPPY)
211
+ def cat_adult_happy():
212
+ return [
213
+ " /\\_____/\\ ",
214
+ " / * * \\ ",
215
+ " ( == w == ) ",
216
+ " ) ~ ( ",
217
+ " ( ) ",
218
+ " ( ( ) ( ) ) ",
219
+ "(__|__|___|__|__)",
220
+ ]
221
+
222
+
223
+ @register_art(PetType.CAT, Stage.ADULT, Mood.SLEEPING)
224
+ def cat_adult_sleeping():
225
+ return [
226
+ " /\\_____/\\ ",
227
+ " / - - \\ ",
228
+ " ( == w == ) ",
229
+ " ) z Z ( ",
230
+ " ( ) ",
231
+ " ( ( ) ( ) ) ",
232
+ "(__|__|___|__|__)",
233
+ ]
234
+
235
+
236
+ @register_art(PetType.CAT, Stage.ADULT, Mood.HUNGRY)
237
+ def cat_adult_hungry():
238
+ return [
239
+ " /\\_____/\\ ",
240
+ " / o o \\ ",
241
+ " ( == ~ == ) ",
242
+ " ) ( ",
243
+ " ( ) ",
244
+ " ( ( ) ( ) ) ",
245
+ "(__|__|___|__|__)",
246
+ ]
247
+
248
+
249
+ @register_art(PetType.CAT, Stage.ADULT, Mood.DEAD)
250
+ def cat_adult_dead():
251
+ return [
252
+ " /\\_____/\\ ",
253
+ " / x x \\ ",
254
+ " ( == - == ) ",
255
+ " ) ( ",
256
+ " ( ) ",
257
+ " ( ( ) ( ) ) ",
258
+ "(__|__|___|__|__)",
259
+ " RIP ",
260
+ ]
261
+
262
+
263
+ @register_art(PetType.CAT, Stage.ADULT, Mood.SAD)
264
+ def cat_adult_sad():
265
+ return [
266
+ " /\\_____/\\ ",
267
+ " / . . \\ ",
268
+ " ( == v == ) ",
269
+ " ) ( ",
270
+ " ( ) ",
271
+ " ( ( ) ( ) ) ",
272
+ "(__|__|___|__|__)",
273
+ ]