boba-pet 1.0.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.
Files changed (43) hide show
  1. boba_pet-1.0.0/LICENSE +21 -0
  2. boba_pet-1.0.0/PKG-INFO +162 -0
  3. boba_pet-1.0.0/README.md +138 -0
  4. boba_pet-1.0.0/__init__.py +3 -0
  5. boba_pet-1.0.0/__main__.py +5 -0
  6. boba_pet-1.0.0/account.py +97 -0
  7. boba_pet-1.0.0/boba_pet.egg-info/PKG-INFO +162 -0
  8. boba_pet-1.0.0/boba_pet.egg-info/SOURCES.txt +73 -0
  9. boba_pet-1.0.0/boba_pet.egg-info/dependency_links.txt +1 -0
  10. boba_pet-1.0.0/boba_pet.egg-info/entry_points.txt +5 -0
  11. boba_pet-1.0.0/boba_pet.egg-info/requires.txt +6 -0
  12. boba_pet-1.0.0/boba_pet.egg-info/top_level.txt +1 -0
  13. boba_pet-1.0.0/cc_watch.py +243 -0
  14. boba_pet-1.0.0/chatlog.py +186 -0
  15. boba_pet-1.0.0/claude_pet.py +5092 -0
  16. boba_pet-1.0.0/computer.py +973 -0
  17. boba_pet-1.0.0/focus.py +377 -0
  18. boba_pet-1.0.0/hackathons.py +245 -0
  19. boba_pet-1.0.0/hackmode.py +253 -0
  20. boba_pet-1.0.0/launch.py +67 -0
  21. boba_pet-1.0.0/listener.py +178 -0
  22. boba_pet-1.0.0/news.py +192 -0
  23. boba_pet-1.0.0/pet_hook.py +137 -0
  24. boba_pet-1.0.0/pet_mcp.py +80 -0
  25. boba_pet-1.0.0/pet_paths.py +28 -0
  26. boba_pet-1.0.0/pet_setup.py +142 -0
  27. boba_pet-1.0.0/pet_status.py +67 -0
  28. boba_pet-1.0.0/projects.py +638 -0
  29. boba_pet-1.0.0/providers.py +621 -0
  30. boba_pet-1.0.0/pyproject.toml +47 -0
  31. boba_pet-1.0.0/setup.cfg +4 -0
  32. boba_pet-1.0.0/snip.py +162 -0
  33. boba_pet-1.0.0/speak.ps1 +13 -0
  34. boba_pet-1.0.0/sprite_bluebot.py +193 -0
  35. boba_pet-1.0.0/sprite_gentleman.py +173 -0
  36. boba_pet-1.0.0/sprite_goggles.py +227 -0
  37. boba_pet-1.0.0/sprites.py +612 -0
  38. boba_pet-1.0.0/tasks.py +207 -0
  39. boba_pet-1.0.0/ui_fx.py +277 -0
  40. boba_pet-1.0.0/usage.py +389 -0
  41. boba_pet-1.0.0/vscode-ext/extension.js +73 -0
  42. boba_pet-1.0.0/vscode-ext/package.json +15 -0
  43. boba_pet-1.0.0/wake.py +150 -0
boba_pet-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Abdul Rahman Azam and Boba Pet 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,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: boba-pet
3
+ Version: 1.0.0
4
+ Summary: Boba: an always-on-top desktop pet for Claude Code, Codex, Gemini and Groq on Windows.
5
+ Author: Abdul Rahman Azam
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/AbdulRahmanAzam/boba-pet
8
+ Project-URL: Issues, https://github.com/AbdulRahmanAzam/boba-pet/issues
9
+ Keywords: claude,claude-code,desktop-pet,ai-assistant,tkinter,windows
10
+ Classifier: Operating System :: Microsoft :: Windows
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Environment :: Win32 (MS Windows)
13
+ Classifier: Topic :: Desktop Environment
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: numpy>=1.26
18
+ Requires-Dist: sounddevice>=0.4
19
+ Requires-Dist: vosk>=0.3.45
20
+ Requires-Dist: faster-whisper>=1.0
21
+ Requires-Dist: model2vec>=0.3
22
+ Requires-Dist: tkinterdnd2>=0.4
23
+ Dynamic: license-file
24
+
25
+ # Boba Pet
26
+
27
+ An always-on-top pixel-art desktop pet for Windows that talks to **Claude Code**
28
+ (and Codex, Antigravity, Gemini or Groq). Click it, type or say "Hey Boba", and
29
+ the answer pops up in a speech bubble. It watches your Claude Code sessions,
30
+ reacts when they finish or fail, and keeps you on track with tasks, focus
31
+ timers and a hackathon mode.
32
+
33
+ ## Install (one line)
34
+
35
+ Open **PowerShell** and run:
36
+
37
+ ```powershell
38
+ irm https://raw.githubusercontent.com/AbdulRahmanAzam/boba-pet/main/install.ps1 | iex
39
+ ```
40
+
41
+ That's it. The installer:
42
+
43
+ 1. installs [uv](https://docs.astral.sh/uv/) if you don't have it,
44
+ 2. installs Boba Pet with its own private Python 3.12 (your Python is untouched),
45
+ 3. downloads the offline voice and search models (about 200 MB, one time),
46
+ 4. adds **Boba Pet** to the Start menu and starts the pet.
47
+
48
+ No admin rights, no git clone. To also start the pet with Windows, run
49
+ `$env:BOBA_PET_AUTOSTART="1"` before the line above, or later run
50
+ `boba-pet-setup --autostart`.
51
+
52
+ ### Already have Python 3.11+?
53
+
54
+ ```powershell
55
+ pip install boba-pet
56
+ boba-pet
57
+ ```
58
+
59
+ or, with [uv](https://docs.astral.sh/uv/), just `uvx boba-pet`. The first
60
+ start downloads the voice models in the background; run `boba-pet-setup`
61
+ once to get them right away and add a Start menu shortcut.
62
+ ### Update / uninstall
63
+
64
+ ```powershell
65
+ uv tool upgrade boba-pet # update (or re-run the install line)
66
+ boba-pet-setup --uninstall-shortcuts; uv tool uninstall boba-pet # remove
67
+ ```
68
+
69
+ Your settings and models stay in `%USERPROFILE%\.boba-pet` and
70
+ `%USERPROFILE%\.claude-pet*.json`; delete them to remove everything.
71
+
72
+ ## Requirements
73
+
74
+ - Windows 10 or 11
75
+ - One AI to talk through (the pet has no key of its own; pick it from the
76
+ right-click menu > **AI provider**):
77
+ - [Claude Code](https://docs.claude.com/claude-code) (recommended):
78
+ `irm https://claude.ai/install.ps1 | iex`, then sign in once with `claude`
79
+ - Codex CLI (ChatGPT plan), Antigravity CLI (Google account), or a free
80
+ Groq / Gemini API key
81
+
82
+ ## What it does
83
+
84
+ - **Chat** in a speech bubble; the chat keeps context, shows tokens used
85
+ (↑ input, ↓ output) and has a cheap **Compact** button that rolls the chat
86
+ into a short note.
87
+ - **Quick menu**: click the ✱ in the ask box for ask, talk, screenshot, new
88
+ chat, compact, history, effort level and more.
89
+ - **Voice, fully offline**: talk with the mic button (Whisper), say
90
+ "Hey Boba" to wake it (Vosk), and have replies read aloud (Windows TTS).
91
+ - **Claude Code companion**: it looks busy while a session works, celebrates
92
+ when it finishes, sweats when tests fail and waves when Claude needs your
93
+ permission. A usage meter shows your plan limits and today's tokens.
94
+ - **Projects**: "open my portfolio project" finds the folder and opens it in
95
+ VS Code with Claude Code running.
96
+ - **Tasks, reminders and focus timer**, with a gentle distraction guard.
97
+ - **Hackathons**: track deadlines, and click one for a workspace with a
98
+ checklist, notes, focus sprints, idea/pitch/judge helpers and a prompt coach
99
+ that suggests better Claude Code prompts while you build.
100
+ - **Morning tech briefing** from real news feeds, every item linked to its source.
101
+ - **Screenshots**: snip part of the screen and ask about it.
102
+ - **Computer tools** (optional): the AI can open apps, change volume, type and
103
+ so on. By default it **asks you first** for anything risky; set the mode in
104
+ the menu, or turn it off.
105
+ - **Characters**: several pixel-art pets; add your own with one file (see below).
106
+
107
+ ## Privacy
108
+
109
+ - API keys you paste are saved only in `%USERPROFILE%\.boba-pet\.env` on your PC.
110
+ - Speech recognition and the wake word run locally; audio never leaves the PC.
111
+ - The pet reads Claude Code transcripts locally to react to sessions; their
112
+ text is not sent anywhere.
113
+ - Requests to the AI go through the provider you linked, on your own account.
114
+
115
+ ## Run from source (for contributors)
116
+
117
+ ```powershell
118
+ git clone https://github.com/AbdulRahmanAzam/boba-pet
119
+ cd boba-pet
120
+ uv venv --python 3.12 .venv
121
+ uv pip install --python .venv\Scripts\python.exe -r requirements.txt
122
+ .venv\Scripts\python.exe launch.py --setup # optional: models + Start menu shortcut
123
+ .venv\Scripts\pythonw.exe claude_pet.py
124
+ ```
125
+
126
+ In a clone, the pet keeps `.env`, `models/` and `shots/` next to the code
127
+ (all git-ignored). Copy `.env.example` to `.env` if you use Groq or Gemini keys.
128
+ Set `BOBA_PET_PROJECTS` (folders separated by `;`) to choose where it looks
129
+ for your projects.
130
+
131
+ ### Layout
132
+
133
+ | File | What it is |
134
+ |------|------------|
135
+ | `claude_pet.py` | The pet window, menus, chat and everything that ties the parts together |
136
+ | `providers.py`, `account.py` | Talking to Claude Code, Codex, Antigravity, Groq and Gemini |
137
+ | `chatlog.py` | Chat history, token counts and compaction |
138
+ | `sprites.py`, `sprite_*.py` | Pixel-art characters |
139
+ | `listener.py`, `wake.py`, `speak.ps1` | Mic input (Whisper), wake word (Vosk), text to speech |
140
+ | `cc_watch.py`, `pet_hook.py`, `pet_status.py`, `usage.py` | Claude Code session watching and usage meter |
141
+ | `projects.py`, `vscode-ext/` | Project search and the VS Code launcher extension |
142
+ | `tasks.py`, `focus.py` | Tasks, reminders, focus timer visuals |
143
+ | `hackathons.py`, `hackmode.py` | Hackathon tracker and hackathon mode |
144
+ | `news.py` | Morning briefing from RSS/Atom feeds |
145
+ | `computer.py`, `pet_mcp.py` | Computer tools and their MCP server |
146
+ | `snip.py`, `ui_fx.py` | Screen snipping, fades, markdown and other UI helpers |
147
+ | `launch.py`, `pet_setup.py`, `pet_paths.py` | Installed command, first-run setup, data folders |
148
+
149
+ ### Add a character
150
+
151
+ Drop a `sprite_<name>.py` file next to `sprites.py` with a
152
+ `compose_<name>(...)` function (copy `sprite_bluebot.py` to start), an
153
+ optional `NAME` for the menu and an optional `EXTRA_PALETTE`. It shows up in
154
+ the menu on the next start.
155
+
156
+ ## Contributing
157
+
158
+ Pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
159
+
160
+ ## License
161
+
162
+ [MIT](LICENSE)
@@ -0,0 +1,138 @@
1
+ # Boba Pet
2
+
3
+ An always-on-top pixel-art desktop pet for Windows that talks to **Claude Code**
4
+ (and Codex, Antigravity, Gemini or Groq). Click it, type or say "Hey Boba", and
5
+ the answer pops up in a speech bubble. It watches your Claude Code sessions,
6
+ reacts when they finish or fail, and keeps you on track with tasks, focus
7
+ timers and a hackathon mode.
8
+
9
+ ## Install (one line)
10
+
11
+ Open **PowerShell** and run:
12
+
13
+ ```powershell
14
+ irm https://raw.githubusercontent.com/AbdulRahmanAzam/boba-pet/main/install.ps1 | iex
15
+ ```
16
+
17
+ That's it. The installer:
18
+
19
+ 1. installs [uv](https://docs.astral.sh/uv/) if you don't have it,
20
+ 2. installs Boba Pet with its own private Python 3.12 (your Python is untouched),
21
+ 3. downloads the offline voice and search models (about 200 MB, one time),
22
+ 4. adds **Boba Pet** to the Start menu and starts the pet.
23
+
24
+ No admin rights, no git clone. To also start the pet with Windows, run
25
+ `$env:BOBA_PET_AUTOSTART="1"` before the line above, or later run
26
+ `boba-pet-setup --autostart`.
27
+
28
+ ### Already have Python 3.11+?
29
+
30
+ ```powershell
31
+ pip install boba-pet
32
+ boba-pet
33
+ ```
34
+
35
+ or, with [uv](https://docs.astral.sh/uv/), just `uvx boba-pet`. The first
36
+ start downloads the voice models in the background; run `boba-pet-setup`
37
+ once to get them right away and add a Start menu shortcut.
38
+ ### Update / uninstall
39
+
40
+ ```powershell
41
+ uv tool upgrade boba-pet # update (or re-run the install line)
42
+ boba-pet-setup --uninstall-shortcuts; uv tool uninstall boba-pet # remove
43
+ ```
44
+
45
+ Your settings and models stay in `%USERPROFILE%\.boba-pet` and
46
+ `%USERPROFILE%\.claude-pet*.json`; delete them to remove everything.
47
+
48
+ ## Requirements
49
+
50
+ - Windows 10 or 11
51
+ - One AI to talk through (the pet has no key of its own; pick it from the
52
+ right-click menu > **AI provider**):
53
+ - [Claude Code](https://docs.claude.com/claude-code) (recommended):
54
+ `irm https://claude.ai/install.ps1 | iex`, then sign in once with `claude`
55
+ - Codex CLI (ChatGPT plan), Antigravity CLI (Google account), or a free
56
+ Groq / Gemini API key
57
+
58
+ ## What it does
59
+
60
+ - **Chat** in a speech bubble; the chat keeps context, shows tokens used
61
+ (↑ input, ↓ output) and has a cheap **Compact** button that rolls the chat
62
+ into a short note.
63
+ - **Quick menu**: click the ✱ in the ask box for ask, talk, screenshot, new
64
+ chat, compact, history, effort level and more.
65
+ - **Voice, fully offline**: talk with the mic button (Whisper), say
66
+ "Hey Boba" to wake it (Vosk), and have replies read aloud (Windows TTS).
67
+ - **Claude Code companion**: it looks busy while a session works, celebrates
68
+ when it finishes, sweats when tests fail and waves when Claude needs your
69
+ permission. A usage meter shows your plan limits and today's tokens.
70
+ - **Projects**: "open my portfolio project" finds the folder and opens it in
71
+ VS Code with Claude Code running.
72
+ - **Tasks, reminders and focus timer**, with a gentle distraction guard.
73
+ - **Hackathons**: track deadlines, and click one for a workspace with a
74
+ checklist, notes, focus sprints, idea/pitch/judge helpers and a prompt coach
75
+ that suggests better Claude Code prompts while you build.
76
+ - **Morning tech briefing** from real news feeds, every item linked to its source.
77
+ - **Screenshots**: snip part of the screen and ask about it.
78
+ - **Computer tools** (optional): the AI can open apps, change volume, type and
79
+ so on. By default it **asks you first** for anything risky; set the mode in
80
+ the menu, or turn it off.
81
+ - **Characters**: several pixel-art pets; add your own with one file (see below).
82
+
83
+ ## Privacy
84
+
85
+ - API keys you paste are saved only in `%USERPROFILE%\.boba-pet\.env` on your PC.
86
+ - Speech recognition and the wake word run locally; audio never leaves the PC.
87
+ - The pet reads Claude Code transcripts locally to react to sessions; their
88
+ text is not sent anywhere.
89
+ - Requests to the AI go through the provider you linked, on your own account.
90
+
91
+ ## Run from source (for contributors)
92
+
93
+ ```powershell
94
+ git clone https://github.com/AbdulRahmanAzam/boba-pet
95
+ cd boba-pet
96
+ uv venv --python 3.12 .venv
97
+ uv pip install --python .venv\Scripts\python.exe -r requirements.txt
98
+ .venv\Scripts\python.exe launch.py --setup # optional: models + Start menu shortcut
99
+ .venv\Scripts\pythonw.exe claude_pet.py
100
+ ```
101
+
102
+ In a clone, the pet keeps `.env`, `models/` and `shots/` next to the code
103
+ (all git-ignored). Copy `.env.example` to `.env` if you use Groq or Gemini keys.
104
+ Set `BOBA_PET_PROJECTS` (folders separated by `;`) to choose where it looks
105
+ for your projects.
106
+
107
+ ### Layout
108
+
109
+ | File | What it is |
110
+ |------|------------|
111
+ | `claude_pet.py` | The pet window, menus, chat and everything that ties the parts together |
112
+ | `providers.py`, `account.py` | Talking to Claude Code, Codex, Antigravity, Groq and Gemini |
113
+ | `chatlog.py` | Chat history, token counts and compaction |
114
+ | `sprites.py`, `sprite_*.py` | Pixel-art characters |
115
+ | `listener.py`, `wake.py`, `speak.ps1` | Mic input (Whisper), wake word (Vosk), text to speech |
116
+ | `cc_watch.py`, `pet_hook.py`, `pet_status.py`, `usage.py` | Claude Code session watching and usage meter |
117
+ | `projects.py`, `vscode-ext/` | Project search and the VS Code launcher extension |
118
+ | `tasks.py`, `focus.py` | Tasks, reminders, focus timer visuals |
119
+ | `hackathons.py`, `hackmode.py` | Hackathon tracker and hackathon mode |
120
+ | `news.py` | Morning briefing from RSS/Atom feeds |
121
+ | `computer.py`, `pet_mcp.py` | Computer tools and their MCP server |
122
+ | `snip.py`, `ui_fx.py` | Screen snipping, fades, markdown and other UI helpers |
123
+ | `launch.py`, `pet_setup.py`, `pet_paths.py` | Installed command, first-run setup, data folders |
124
+
125
+ ### Add a character
126
+
127
+ Drop a `sprite_<name>.py` file next to `sprites.py` with a
128
+ `compose_<name>(...)` function (copy `sprite_bluebot.py` to start), an
129
+ optional `NAME` for the menu and an optional `EXTRA_PALETTE`. It shows up in
130
+ the menu on the next start.
131
+
132
+ ## Contributing
133
+
134
+ Pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
135
+
136
+ ## License
137
+
138
+ [MIT](LICENSE)
@@ -0,0 +1,3 @@
1
+ """Boba Pet: a desktop pet for Claude Code (and Codex, Gemini, Groq)."""
2
+
3
+ __version__ = "1.0.0"
@@ -0,0 +1,5 @@
1
+ import sys
2
+
3
+ from boba_pet.launch import main
4
+
5
+ sys.exit(main())
@@ -0,0 +1,97 @@
1
+ """Linking the pet to the user's own Claude Code login.
2
+
3
+ The pet never stores an API key or token. Every request goes through the
4
+ `claude` CLI, so it runs on (and bills) whatever account Claude Code is
5
+ signed in to on this computer. This module only checks that link and
6
+ opens a terminal for installing Claude Code or signing in.
7
+ """
8
+
9
+ import json
10
+ import shutil
11
+ import subprocess
12
+ from pathlib import Path
13
+
14
+ CREATE_NO_WINDOW = 0x08000000
15
+ CREATE_NEW_CONSOLE = 0x00000010
16
+ INSTALL_COMMAND = "irm https://claude.ai/install.ps1 | iex"
17
+ # Phrases in a failed reply that mean the login is missing or expired.
18
+ AUTH_ERRORS = ("not logged in", "please run /login", "invalid api key",
19
+ "authentication_error", "oauth token has expired", "/login")
20
+
21
+
22
+ def find_claude() -> str | None:
23
+ """Path of the Claude Code CLI, or None when it is not installed."""
24
+ found = shutil.which("claude")
25
+ if found:
26
+ return found
27
+ local = Path.home() / ".local" / "bin" / "claude.exe"
28
+ return str(local) if local.exists() else None
29
+
30
+
31
+ def status() -> dict:
32
+ """Check whether Claude Code is installed and signed in.
33
+
34
+ Returns:
35
+ {"installed": bool, "linked": bool, "email": str, "plan": str,
36
+ "method": str, "claude": path or None}
37
+ """
38
+ claude = find_claude()
39
+ info = {"installed": bool(claude), "linked": False, "email": "",
40
+ "plan": "", "method": "", "claude": claude}
41
+ if not claude:
42
+ return info
43
+ try:
44
+ out = subprocess.run([claude, "auth", "status"], capture_output=True,
45
+ text=True, timeout=30, creationflags=CREATE_NO_WINDOW)
46
+ data = json.loads(out.stdout or "{}")
47
+ except (OSError, ValueError, subprocess.TimeoutExpired):
48
+ return info
49
+ info.update(linked=bool(data.get("loggedIn")), email=data.get("email") or "",
50
+ plan=data.get("subscriptionType") or "",
51
+ method=data.get("authMethod") or "")
52
+ return info
53
+
54
+
55
+ def describe(info: dict) -> str:
56
+ """Short account line for the menu, e.g. "you@mail.com (pro)"."""
57
+ if not info.get("linked"):
58
+ return "not linked"
59
+ who = info.get("email") or ("API key" if "api" in info.get("method", "") else "signed in")
60
+ plan = info.get("plan")
61
+ return f"{who} ({plan})" if plan else who
62
+
63
+
64
+ def is_auth_error(text: str) -> bool:
65
+ low = (text or "").lower()
66
+ return any(p in low for p in AUTH_ERRORS)
67
+
68
+
69
+ def open_terminal(command: str) -> None:
70
+ """Run a command in a new visible PowerShell window (it stays open)."""
71
+ shell = shutil.which("pwsh") or shutil.which("powershell") or "powershell"
72
+ subprocess.Popen([shell, "-NoExit", "-Command", command],
73
+ creationflags=CREATE_NEW_CONSOLE)
74
+
75
+
76
+ def install() -> None:
77
+ """Install Claude Code with Anthropic's official installer."""
78
+ open_terminal(INSTALL_COMMAND)
79
+
80
+
81
+ def login(claude: str | None, console: bool = False) -> None:
82
+ """Start Claude Code's browser sign-in.
83
+
84
+ Args:
85
+ claude: path of the CLI (found again when None).
86
+ console: sign in to the Anthropic Console (API credits) instead of
87
+ a Claude Pro/Max subscription.
88
+ """
89
+ exe = claude or find_claude() or "claude"
90
+ flag = "--console" if console else "--claudeai"
91
+ open_terminal(f"& '{exe}' auth login {flag}")
92
+
93
+
94
+ def logout(claude: str | None) -> None:
95
+ exe = claude or find_claude() or "claude"
96
+ subprocess.run([exe, "auth", "logout"], capture_output=True, timeout=30,
97
+ creationflags=CREATE_NO_WINDOW)
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: boba-pet
3
+ Version: 1.0.0
4
+ Summary: Boba: an always-on-top desktop pet for Claude Code, Codex, Gemini and Groq on Windows.
5
+ Author: Abdul Rahman Azam
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/AbdulRahmanAzam/boba-pet
8
+ Project-URL: Issues, https://github.com/AbdulRahmanAzam/boba-pet/issues
9
+ Keywords: claude,claude-code,desktop-pet,ai-assistant,tkinter,windows
10
+ Classifier: Operating System :: Microsoft :: Windows
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Environment :: Win32 (MS Windows)
13
+ Classifier: Topic :: Desktop Environment
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: numpy>=1.26
18
+ Requires-Dist: sounddevice>=0.4
19
+ Requires-Dist: vosk>=0.3.45
20
+ Requires-Dist: faster-whisper>=1.0
21
+ Requires-Dist: model2vec>=0.3
22
+ Requires-Dist: tkinterdnd2>=0.4
23
+ Dynamic: license-file
24
+
25
+ # Boba Pet
26
+
27
+ An always-on-top pixel-art desktop pet for Windows that talks to **Claude Code**
28
+ (and Codex, Antigravity, Gemini or Groq). Click it, type or say "Hey Boba", and
29
+ the answer pops up in a speech bubble. It watches your Claude Code sessions,
30
+ reacts when they finish or fail, and keeps you on track with tasks, focus
31
+ timers and a hackathon mode.
32
+
33
+ ## Install (one line)
34
+
35
+ Open **PowerShell** and run:
36
+
37
+ ```powershell
38
+ irm https://raw.githubusercontent.com/AbdulRahmanAzam/boba-pet/main/install.ps1 | iex
39
+ ```
40
+
41
+ That's it. The installer:
42
+
43
+ 1. installs [uv](https://docs.astral.sh/uv/) if you don't have it,
44
+ 2. installs Boba Pet with its own private Python 3.12 (your Python is untouched),
45
+ 3. downloads the offline voice and search models (about 200 MB, one time),
46
+ 4. adds **Boba Pet** to the Start menu and starts the pet.
47
+
48
+ No admin rights, no git clone. To also start the pet with Windows, run
49
+ `$env:BOBA_PET_AUTOSTART="1"` before the line above, or later run
50
+ `boba-pet-setup --autostart`.
51
+
52
+ ### Already have Python 3.11+?
53
+
54
+ ```powershell
55
+ pip install boba-pet
56
+ boba-pet
57
+ ```
58
+
59
+ or, with [uv](https://docs.astral.sh/uv/), just `uvx boba-pet`. The first
60
+ start downloads the voice models in the background; run `boba-pet-setup`
61
+ once to get them right away and add a Start menu shortcut.
62
+ ### Update / uninstall
63
+
64
+ ```powershell
65
+ uv tool upgrade boba-pet # update (or re-run the install line)
66
+ boba-pet-setup --uninstall-shortcuts; uv tool uninstall boba-pet # remove
67
+ ```
68
+
69
+ Your settings and models stay in `%USERPROFILE%\.boba-pet` and
70
+ `%USERPROFILE%\.claude-pet*.json`; delete them to remove everything.
71
+
72
+ ## Requirements
73
+
74
+ - Windows 10 or 11
75
+ - One AI to talk through (the pet has no key of its own; pick it from the
76
+ right-click menu > **AI provider**):
77
+ - [Claude Code](https://docs.claude.com/claude-code) (recommended):
78
+ `irm https://claude.ai/install.ps1 | iex`, then sign in once with `claude`
79
+ - Codex CLI (ChatGPT plan), Antigravity CLI (Google account), or a free
80
+ Groq / Gemini API key
81
+
82
+ ## What it does
83
+
84
+ - **Chat** in a speech bubble; the chat keeps context, shows tokens used
85
+ (↑ input, ↓ output) and has a cheap **Compact** button that rolls the chat
86
+ into a short note.
87
+ - **Quick menu**: click the ✱ in the ask box for ask, talk, screenshot, new
88
+ chat, compact, history, effort level and more.
89
+ - **Voice, fully offline**: talk with the mic button (Whisper), say
90
+ "Hey Boba" to wake it (Vosk), and have replies read aloud (Windows TTS).
91
+ - **Claude Code companion**: it looks busy while a session works, celebrates
92
+ when it finishes, sweats when tests fail and waves when Claude needs your
93
+ permission. A usage meter shows your plan limits and today's tokens.
94
+ - **Projects**: "open my portfolio project" finds the folder and opens it in
95
+ VS Code with Claude Code running.
96
+ - **Tasks, reminders and focus timer**, with a gentle distraction guard.
97
+ - **Hackathons**: track deadlines, and click one for a workspace with a
98
+ checklist, notes, focus sprints, idea/pitch/judge helpers and a prompt coach
99
+ that suggests better Claude Code prompts while you build.
100
+ - **Morning tech briefing** from real news feeds, every item linked to its source.
101
+ - **Screenshots**: snip part of the screen and ask about it.
102
+ - **Computer tools** (optional): the AI can open apps, change volume, type and
103
+ so on. By default it **asks you first** for anything risky; set the mode in
104
+ the menu, or turn it off.
105
+ - **Characters**: several pixel-art pets; add your own with one file (see below).
106
+
107
+ ## Privacy
108
+
109
+ - API keys you paste are saved only in `%USERPROFILE%\.boba-pet\.env` on your PC.
110
+ - Speech recognition and the wake word run locally; audio never leaves the PC.
111
+ - The pet reads Claude Code transcripts locally to react to sessions; their
112
+ text is not sent anywhere.
113
+ - Requests to the AI go through the provider you linked, on your own account.
114
+
115
+ ## Run from source (for contributors)
116
+
117
+ ```powershell
118
+ git clone https://github.com/AbdulRahmanAzam/boba-pet
119
+ cd boba-pet
120
+ uv venv --python 3.12 .venv
121
+ uv pip install --python .venv\Scripts\python.exe -r requirements.txt
122
+ .venv\Scripts\python.exe launch.py --setup # optional: models + Start menu shortcut
123
+ .venv\Scripts\pythonw.exe claude_pet.py
124
+ ```
125
+
126
+ In a clone, the pet keeps `.env`, `models/` and `shots/` next to the code
127
+ (all git-ignored). Copy `.env.example` to `.env` if you use Groq or Gemini keys.
128
+ Set `BOBA_PET_PROJECTS` (folders separated by `;`) to choose where it looks
129
+ for your projects.
130
+
131
+ ### Layout
132
+
133
+ | File | What it is |
134
+ |------|------------|
135
+ | `claude_pet.py` | The pet window, menus, chat and everything that ties the parts together |
136
+ | `providers.py`, `account.py` | Talking to Claude Code, Codex, Antigravity, Groq and Gemini |
137
+ | `chatlog.py` | Chat history, token counts and compaction |
138
+ | `sprites.py`, `sprite_*.py` | Pixel-art characters |
139
+ | `listener.py`, `wake.py`, `speak.ps1` | Mic input (Whisper), wake word (Vosk), text to speech |
140
+ | `cc_watch.py`, `pet_hook.py`, `pet_status.py`, `usage.py` | Claude Code session watching and usage meter |
141
+ | `projects.py`, `vscode-ext/` | Project search and the VS Code launcher extension |
142
+ | `tasks.py`, `focus.py` | Tasks, reminders, focus timer visuals |
143
+ | `hackathons.py`, `hackmode.py` | Hackathon tracker and hackathon mode |
144
+ | `news.py` | Morning briefing from RSS/Atom feeds |
145
+ | `computer.py`, `pet_mcp.py` | Computer tools and their MCP server |
146
+ | `snip.py`, `ui_fx.py` | Screen snipping, fades, markdown and other UI helpers |
147
+ | `launch.py`, `pet_setup.py`, `pet_paths.py` | Installed command, first-run setup, data folders |
148
+
149
+ ### Add a character
150
+
151
+ Drop a `sprite_<name>.py` file next to `sprites.py` with a
152
+ `compose_<name>(...)` function (copy `sprite_bluebot.py` to start), an
153
+ optional `NAME` for the menu and an optional `EXTRA_PALETTE`. It shows up in
154
+ the menu on the next start.
155
+
156
+ ## Contributing
157
+
158
+ Pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
159
+
160
+ ## License
161
+
162
+ [MIT](LICENSE)
@@ -0,0 +1,73 @@
1
+ LICENSE
2
+ README.md
3
+ __init__.py
4
+ __main__.py
5
+ account.py
6
+ cc_watch.py
7
+ chatlog.py
8
+ claude_pet.py
9
+ computer.py
10
+ focus.py
11
+ hackathons.py
12
+ hackmode.py
13
+ launch.py
14
+ listener.py
15
+ news.py
16
+ pet_hook.py
17
+ pet_mcp.py
18
+ pet_paths.py
19
+ pet_setup.py
20
+ pet_status.py
21
+ projects.py
22
+ providers.py
23
+ pyproject.toml
24
+ snip.py
25
+ speak.ps1
26
+ sprite_bluebot.py
27
+ sprite_gentleman.py
28
+ sprite_goggles.py
29
+ sprites.py
30
+ tasks.py
31
+ ui_fx.py
32
+ usage.py
33
+ wake.py
34
+ ./__init__.py
35
+ ./__main__.py
36
+ ./account.py
37
+ ./cc_watch.py
38
+ ./chatlog.py
39
+ ./claude_pet.py
40
+ ./computer.py
41
+ ./focus.py
42
+ ./hackathons.py
43
+ ./hackmode.py
44
+ ./launch.py
45
+ ./listener.py
46
+ ./news.py
47
+ ./pet_hook.py
48
+ ./pet_mcp.py
49
+ ./pet_paths.py
50
+ ./pet_setup.py
51
+ ./pet_status.py
52
+ ./projects.py
53
+ ./providers.py
54
+ ./snip.py
55
+ ./speak.ps1
56
+ ./sprite_bluebot.py
57
+ ./sprite_gentleman.py
58
+ ./sprite_goggles.py
59
+ ./sprites.py
60
+ ./tasks.py
61
+ ./ui_fx.py
62
+ ./usage.py
63
+ ./wake.py
64
+ ./vscode-ext/extension.js
65
+ ./vscode-ext/package.json
66
+ boba_pet.egg-info/PKG-INFO
67
+ boba_pet.egg-info/SOURCES.txt
68
+ boba_pet.egg-info/dependency_links.txt
69
+ boba_pet.egg-info/entry_points.txt
70
+ boba_pet.egg-info/requires.txt
71
+ boba_pet.egg-info/top_level.txt
72
+ vscode-ext/extension.js
73
+ vscode-ext/package.json
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ boba-pet-setup = boba_pet.launch:setup
3
+
4
+ [gui_scripts]
5
+ boba-pet = boba_pet.launch:main
@@ -0,0 +1,6 @@
1
+ numpy>=1.26
2
+ sounddevice>=0.4
3
+ vosk>=0.3.45
4
+ faster-whisper>=1.0
5
+ model2vec>=0.3
6
+ tkinterdnd2>=0.4
@@ -0,0 +1 @@
1
+ boba_pet