akari-cli 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.
- akari_cli-0.1.0/LICENSE +21 -0
- akari_cli-0.1.0/PKG-INFO +251 -0
- akari_cli-0.1.0/README.md +228 -0
- akari_cli-0.1.0/ab_testing.py +289 -0
- akari_cli-0.1.0/actions.py +407 -0
- akari_cli-0.1.0/akari_cli.egg-info/PKG-INFO +251 -0
- akari_cli-0.1.0/akari_cli.egg-info/SOURCES.txt +34 -0
- akari_cli-0.1.0/akari_cli.egg-info/dependency_links.txt +1 -0
- akari_cli-0.1.0/akari_cli.egg-info/entry_points.txt +2 -0
- akari_cli-0.1.0/akari_cli.egg-info/requires.txt +10 -0
- akari_cli-0.1.0/akari_cli.egg-info/top_level.txt +21 -0
- akari_cli-0.1.0/akari_cli.py +395 -0
- akari_cli-0.1.0/calendar_access.py +268 -0
- akari_cli-0.1.0/config.py +89 -0
- akari_cli-0.1.0/conversation.py +252 -0
- akari_cli-0.1.0/dispatch_registry.py +160 -0
- akari_cli-0.1.0/evolution.py +268 -0
- akari_cli-0.1.0/learning.py +193 -0
- akari_cli-0.1.0/mail_access.py +414 -0
- akari_cli-0.1.0/memory.py +450 -0
- akari_cli-0.1.0/monitor.py +172 -0
- akari_cli-0.1.0/notes_access.py +200 -0
- akari_cli-0.1.0/planner.py +763 -0
- akari_cli-0.1.0/pyproject.toml +41 -0
- akari_cli-0.1.0/qa.py +180 -0
- akari_cli-0.1.0/screen.py +249 -0
- akari_cli-0.1.0/server.py +2561 -0
- akari_cli-0.1.0/setup.cfg +4 -0
- akari_cli-0.1.0/suggestions.py +240 -0
- akari_cli-0.1.0/templates.py +238 -0
- akari_cli-0.1.0/tests/test_browser_integration.py +182 -0
- akari_cli-0.1.0/tests/test_classifier.py +105 -0
- akari_cli-0.1.0/tests/test_e2e_pipeline.py +260 -0
- akari_cli-0.1.0/tests/test_feedback_loop.py +249 -0
- akari_cli-0.1.0/tracking.py +185 -0
- akari_cli-0.1.0/work_mode.py +189 -0
akari_cli-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 akariwill
|
|
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.
|
akari_cli-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: akari-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Akari Watanabe AI Assistant - Voice-first CLI & Web Assistant
|
|
5
|
+
Author-email: akariwill <mwildjrs23@example.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: anthropic>=0.39.0
|
|
13
|
+
Requires-Dist: httpx>=0.27.0
|
|
14
|
+
Requires-Dist: fastapi>=0.115.0
|
|
15
|
+
Requires-Dist: uvicorn[standard]>=0.32.0
|
|
16
|
+
Requires-Dist: pydantic>=2.0.0
|
|
17
|
+
Requires-Dist: websockets>=13.0
|
|
18
|
+
Requires-Dist: playwright>=1.40.0
|
|
19
|
+
Requires-Dist: pyyaml>=6.0
|
|
20
|
+
Requires-Dist: rich>=14.3.3
|
|
21
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
<div align="center">
|
|
25
|
+
<img src="data/akari.jpg" alt="logo" width="180" style="border-radius: 50%;"/>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<h1 align="center">
|
|
29
|
+
AKARI WATANABE (渡辺 星)
|
|
30
|
+
</h1>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
A voice-first AI assistant that runs on your Mac. Talk to it, and it talks back -- with an audio-reactive particle orb.
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="data/akari.gif" alt="Akari Animation" width="250" style="border-radius: 12px; border: 1px solid #ec4899;"/>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<i>"おかえりなさい、あなた。"</i>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Screenshots
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<img src="data/welcome.png" alt="Welcome Page" width="45%" style="border-radius: 8px; margin-right: 10px; border: 1px solid #ec4899;"/>
|
|
50
|
+
<img src="data/home.png" alt="Home Page" width="45%" style="border-radius: 8px; border: 1px solid #ec4899;"/>
|
|
51
|
+
</p>
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
<p align="center">
|
|
56
|
+
AKARI connects to your Apple Calendar, Mail, and Notes. It can browse the web, spawn Claude Code sessions to build entire projects, and plan your day -- all through natural voice conversation.
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## AKARI CLI (Terminal Version)
|
|
62
|
+
|
|
63
|
+
<p align="center">
|
|
64
|
+
<img src="data/cli.png" alt="AKARI CLI" width="80%" style="border-radius: 8px; border: 1px solid #ec4899;"/>
|
|
65
|
+
</p>
|
|
66
|
+
|
|
67
|
+
Experience AKARI directly from your terminal! The CLI version is built for developers who want a fast, lightweight, and powerful interaction without opening a browser.
|
|
68
|
+
|
|
69
|
+
### CLI Features
|
|
70
|
+
- **Real-time Voice** -- Just like the web version, AKARI speaks to you using the local high-quality audio files or the Fish Audio API.
|
|
71
|
+
- **Dynamic Typing Effect** -- Responses flow naturally with a typewriter effect, synchronized with AKARI's voice.
|
|
72
|
+
- **Project Awareness** -- Automatically scans your Desktop for git repositories to understand your workspace context.
|
|
73
|
+
- **Autonomous Task Execution** -- Planning and building projects (via Claude Code) happens directly in new terminal windows without needing confirmation.
|
|
74
|
+
- **Integrated Memory** -- Notes, tasks, and facts are saved to the same shared database as the web version.
|
|
75
|
+
|
|
76
|
+
### Slash Commands
|
|
77
|
+
| Command | Description |
|
|
78
|
+
|---------|-------------|
|
|
79
|
+
| `/help` | Show help table with AKARI's voice guidance. |
|
|
80
|
+
| `/clear` | Clear the terminal and reset conversation context. |
|
|
81
|
+
| `/tasks` | List all your open tasks and reminders. |
|
|
82
|
+
| `/projects` | Show all detected projects on your Desktop. |
|
|
83
|
+
| `/restart` | Restart the CLI environment and re-initialize systems. |
|
|
84
|
+
| `/quit` | Sayonara! Closes the CLI with a parting message. |
|
|
85
|
+
|
|
86
|
+
### How to Run
|
|
87
|
+
```bash
|
|
88
|
+
python akari_cli.py
|
|
89
|
+
```
|
|
90
|
+
Or run with a direct command:
|
|
91
|
+
```bash
|
|
92
|
+
python akari_cli.py "build me a python script to scrape news"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## What It Does
|
|
98
|
+
|
|
99
|
+
- **Voice conversation** -- speak naturally, get spoken responses with an AKARI voice.
|
|
100
|
+
- **Builds software** -- say "build me a landing page" and watch Claude Code do the work.
|
|
101
|
+
- **Reads your calendar** -- "What's on my schedule today?"
|
|
102
|
+
- **Reads your email** -- "Any unread messages?" (read-only, by design).
|
|
103
|
+
- **Browses the web** -- "Search for the best restaurants in Austin".
|
|
104
|
+
- **Manages tasks** -- "Remind me to call the client tomorrow".
|
|
105
|
+
- **Takes notes** -- "Save that as a note".
|
|
106
|
+
- **Remembers things** -- "I prefer React over Vue" (it remembers next time).
|
|
107
|
+
- **Plans your day** -- combines calendar, tasks, and priorities into a plan.
|
|
108
|
+
- **Sees your screen** -- knows what apps are open for context-aware responses.
|
|
109
|
+
- **Audio-reactive orb** -- a Three.js particle visualization that pulses with AKARI's voice.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Tech Stack
|
|
114
|
+
|
|
115
|
+
| Layer | Technology |
|
|
116
|
+
|-------|-----------|
|
|
117
|
+
| **Backend** |   |
|
|
118
|
+
| **Frontend** |    |
|
|
119
|
+
| **AI Brain** | **Anthropic Claude (Haiku & Opus)** |
|
|
120
|
+
| **Voice** | **Fish Audio TTS (Akari Model)** |
|
|
121
|
+
| **Bridge** | **AppleScript**, **Claude Code CLI**, **Playwright** |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Architecture & How it Works
|
|
126
|
+
|
|
127
|
+
AKARI operates through a high-performance voice loop and system orchestration layer:
|
|
128
|
+
|
|
129
|
+
```mermaid
|
|
130
|
+
graph TD
|
|
131
|
+
A[User Voice] -->|Web Speech API| B[FastAPI Backend]
|
|
132
|
+
B -->|Intent Detection| C{Action?}
|
|
133
|
+
C -->|Chat| D[Claude Haiku]
|
|
134
|
+
C -->|System Task| E[AppleScript / Shell]
|
|
135
|
+
C -->|Dev Task| F[Claude Code]
|
|
136
|
+
D -->|Text| G[Fish Audio TTS]
|
|
137
|
+
G -->|Stream| H[Three.js Lilac Orb]
|
|
138
|
+
H -->|Voice Out| I[User]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### How the Voice Loop Works
|
|
142
|
+
1. **Microphone**: Chrome's Web Speech API transcribes your speech in real-time.
|
|
143
|
+
2. **Transcript**: The transcript is sent to the server via WebSocket.
|
|
144
|
+
3. **Intent**: AKARI detects intent -- conversation, action, or build request.
|
|
145
|
+
4. **Execution**: Spawns a Claude Code subprocess or runs AppleScript for macOS apps.
|
|
146
|
+
5. **TTS**: Fish Audio converts the response to speech with the AKARI voice model.
|
|
147
|
+
6. **Visualization**: The Three.js lilac orb deforms and pulses in response to the audio frequency.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Installation & Usage
|
|
152
|
+
|
|
153
|
+
For detailed step-by-step instructions, please see **[CLAUDE.md](CLAUDE.md)**.
|
|
154
|
+
|
|
155
|
+
### Prerequisites
|
|
156
|
+
- **macOS** (required for AppleScript integration)
|
|
157
|
+
- **Python 3.11+** & **Node.js 18+**
|
|
158
|
+
- **Anthropic API key** & **Fish Audio API key**
|
|
159
|
+
- **Claude Code CLI** (`npm install -g @anthropic-ai/claude-code`)
|
|
160
|
+
|
|
161
|
+
### Quick Start
|
|
162
|
+
```bash
|
|
163
|
+
# Clone the repo
|
|
164
|
+
git clone https://github.com/akariwill/akari.git
|
|
165
|
+
cd akari
|
|
166
|
+
|
|
167
|
+
# Setup environment
|
|
168
|
+
cp .env.example .env
|
|
169
|
+
# Edit .env with your keys
|
|
170
|
+
|
|
171
|
+
# Install dependencies
|
|
172
|
+
pip install -r requirements.txt
|
|
173
|
+
cd frontend && npm install && cd ..
|
|
174
|
+
|
|
175
|
+
# Generate SSL certs
|
|
176
|
+
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'
|
|
177
|
+
|
|
178
|
+
# Run Backend & Frontend
|
|
179
|
+
# Terminal 1: python server.py
|
|
180
|
+
# Terminal 2: cd frontend && npm run dev
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Key Files
|
|
186
|
+
|
|
187
|
+
| File | Purpose |
|
|
188
|
+
|------|---------|
|
|
189
|
+
| `server.py` | Main server -- WebSocket handler, LLM, action system. |
|
|
190
|
+
| `frontend/src/orb.ts` | Three.js particle orb visualization (Lilac theme). |
|
|
191
|
+
| `frontend/src/voice.ts` | Web Speech API + audio playback management. |
|
|
192
|
+
| `actions.py` | System actions (Terminal, Chrome, Claude Code). |
|
|
193
|
+
| `memory.py` | SQLite memory system with FTS5 search. |
|
|
194
|
+
| `work_mode.py` | Persistent Claude Code development sessions. |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Deployment (Online Demo)
|
|
199
|
+
|
|
200
|
+
**Demo Website**: [akari-assistant.up.railway.app](https://akari-assistant.up.railway.app/)
|
|
201
|
+
|
|
202
|
+
To host AKARI online for demo purposes (e.g., Railway, Render, or VPS):
|
|
203
|
+
|
|
204
|
+
1. **Railway/Render**: Connect your GitHub repo.
|
|
205
|
+
2. **Environment Variables**: Add `ANTHROPIC_API_KEY` and `FISH_API_KEY`.
|
|
206
|
+
3. **Docker**: The provided `Dockerfile` will automatically:
|
|
207
|
+
- Build the Vite frontend.
|
|
208
|
+
- Set up the Python/FastAPI environment.
|
|
209
|
+
- Install Playwright for web automation.
|
|
210
|
+
4. **Public URL**: Ensure you access via **HTTPS** for voice features to work.
|
|
211
|
+
|
|
212
|
+
*Note: macOS-specific features (AppleScript for Calendar/Mail) only work when running locally on a Mac.*
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Features in Detail
|
|
217
|
+
|
|
218
|
+
### Action System
|
|
219
|
+
AKARI uses action tags to trigger real system actions:
|
|
220
|
+
- `[ACTION:BUILD]` -- spawns Claude Code to build a project.
|
|
221
|
+
- `[ACTION:BROWSE]` -- opens Chrome to a URL or search query.
|
|
222
|
+
- `[ACTION:RESEARCH]` -- deep research with Claude Opus, outputs an HTML report.
|
|
223
|
+
- `[ACTION:REMEMBER]` -- stores a fact for future context.
|
|
224
|
+
|
|
225
|
+
### Memory System
|
|
226
|
+
AKARI remembers things you tell it using SQLite with FTS5 full-text search. Preferences, decisions, and facts persist across sessions.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Contributing
|
|
231
|
+
|
|
232
|
+
Contributions are welcome! Please check **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines on adding new integrations, Windows/Linux support, or UI improvements.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Credits & Contact
|
|
243
|
+
|
|
244
|
+
- **Author**: [akariwill](https://github.com/akariwill)
|
|
245
|
+
- **Discord**: `wildanjr_` | **Instagram**: `@akariwill`
|
|
246
|
+
- **Voice**: Powered by [Fish Audio](https://fish.audio).
|
|
247
|
+
- **Brain**: Powered by [Anthropic Claude](https://anthropic.com).
|
|
248
|
+
|
|
249
|
+
<p align="center">
|
|
250
|
+
<i>Inspired by Akari Watanabe (渡辺 星) from "More Than a Married Couple, But Not Lovers".</i>
|
|
251
|
+
</p>
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="data/akari.jpg" alt="logo" width="180" style="border-radius: 50%;"/>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">
|
|
6
|
+
AKARI WATANABE (渡辺 星)
|
|
7
|
+
</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
A voice-first AI assistant that runs on your Mac. Talk to it, and it talks back -- with an audio-reactive particle orb.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img src="data/akari.gif" alt="Akari Animation" width="250" style="border-radius: 12px; border: 1px solid #ec4899;"/>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<i>"おかえりなさい、あなた。"</i>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Screenshots
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="data/welcome.png" alt="Welcome Page" width="45%" style="border-radius: 8px; margin-right: 10px; border: 1px solid #ec4899;"/>
|
|
27
|
+
<img src="data/home.png" alt="Home Page" width="45%" style="border-radius: 8px; border: 1px solid #ec4899;"/>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
AKARI connects to your Apple Calendar, Mail, and Notes. It can browse the web, spawn Claude Code sessions to build entire projects, and plan your day -- all through natural voice conversation.
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## AKARI CLI (Terminal Version)
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="data/cli.png" alt="AKARI CLI" width="80%" style="border-radius: 8px; border: 1px solid #ec4899;"/>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
Experience AKARI directly from your terminal! The CLI version is built for developers who want a fast, lightweight, and powerful interaction without opening a browser.
|
|
45
|
+
|
|
46
|
+
### CLI Features
|
|
47
|
+
- **Real-time Voice** -- Just like the web version, AKARI speaks to you using the local high-quality audio files or the Fish Audio API.
|
|
48
|
+
- **Dynamic Typing Effect** -- Responses flow naturally with a typewriter effect, synchronized with AKARI's voice.
|
|
49
|
+
- **Project Awareness** -- Automatically scans your Desktop for git repositories to understand your workspace context.
|
|
50
|
+
- **Autonomous Task Execution** -- Planning and building projects (via Claude Code) happens directly in new terminal windows without needing confirmation.
|
|
51
|
+
- **Integrated Memory** -- Notes, tasks, and facts are saved to the same shared database as the web version.
|
|
52
|
+
|
|
53
|
+
### Slash Commands
|
|
54
|
+
| Command | Description |
|
|
55
|
+
|---------|-------------|
|
|
56
|
+
| `/help` | Show help table with AKARI's voice guidance. |
|
|
57
|
+
| `/clear` | Clear the terminal and reset conversation context. |
|
|
58
|
+
| `/tasks` | List all your open tasks and reminders. |
|
|
59
|
+
| `/projects` | Show all detected projects on your Desktop. |
|
|
60
|
+
| `/restart` | Restart the CLI environment and re-initialize systems. |
|
|
61
|
+
| `/quit` | Sayonara! Closes the CLI with a parting message. |
|
|
62
|
+
|
|
63
|
+
### How to Run
|
|
64
|
+
```bash
|
|
65
|
+
python akari_cli.py
|
|
66
|
+
```
|
|
67
|
+
Or run with a direct command:
|
|
68
|
+
```bash
|
|
69
|
+
python akari_cli.py "build me a python script to scrape news"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## What It Does
|
|
75
|
+
|
|
76
|
+
- **Voice conversation** -- speak naturally, get spoken responses with an AKARI voice.
|
|
77
|
+
- **Builds software** -- say "build me a landing page" and watch Claude Code do the work.
|
|
78
|
+
- **Reads your calendar** -- "What's on my schedule today?"
|
|
79
|
+
- **Reads your email** -- "Any unread messages?" (read-only, by design).
|
|
80
|
+
- **Browses the web** -- "Search for the best restaurants in Austin".
|
|
81
|
+
- **Manages tasks** -- "Remind me to call the client tomorrow".
|
|
82
|
+
- **Takes notes** -- "Save that as a note".
|
|
83
|
+
- **Remembers things** -- "I prefer React over Vue" (it remembers next time).
|
|
84
|
+
- **Plans your day** -- combines calendar, tasks, and priorities into a plan.
|
|
85
|
+
- **Sees your screen** -- knows what apps are open for context-aware responses.
|
|
86
|
+
- **Audio-reactive orb** -- a Three.js particle visualization that pulses with AKARI's voice.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Tech Stack
|
|
91
|
+
|
|
92
|
+
| Layer | Technology |
|
|
93
|
+
|-------|-----------|
|
|
94
|
+
| **Backend** |   |
|
|
95
|
+
| **Frontend** |    |
|
|
96
|
+
| **AI Brain** | **Anthropic Claude (Haiku & Opus)** |
|
|
97
|
+
| **Voice** | **Fish Audio TTS (Akari Model)** |
|
|
98
|
+
| **Bridge** | **AppleScript**, **Claude Code CLI**, **Playwright** |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Architecture & How it Works
|
|
103
|
+
|
|
104
|
+
AKARI operates through a high-performance voice loop and system orchestration layer:
|
|
105
|
+
|
|
106
|
+
```mermaid
|
|
107
|
+
graph TD
|
|
108
|
+
A[User Voice] -->|Web Speech API| B[FastAPI Backend]
|
|
109
|
+
B -->|Intent Detection| C{Action?}
|
|
110
|
+
C -->|Chat| D[Claude Haiku]
|
|
111
|
+
C -->|System Task| E[AppleScript / Shell]
|
|
112
|
+
C -->|Dev Task| F[Claude Code]
|
|
113
|
+
D -->|Text| G[Fish Audio TTS]
|
|
114
|
+
G -->|Stream| H[Three.js Lilac Orb]
|
|
115
|
+
H -->|Voice Out| I[User]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### How the Voice Loop Works
|
|
119
|
+
1. **Microphone**: Chrome's Web Speech API transcribes your speech in real-time.
|
|
120
|
+
2. **Transcript**: The transcript is sent to the server via WebSocket.
|
|
121
|
+
3. **Intent**: AKARI detects intent -- conversation, action, or build request.
|
|
122
|
+
4. **Execution**: Spawns a Claude Code subprocess or runs AppleScript for macOS apps.
|
|
123
|
+
5. **TTS**: Fish Audio converts the response to speech with the AKARI voice model.
|
|
124
|
+
6. **Visualization**: The Three.js lilac orb deforms and pulses in response to the audio frequency.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Installation & Usage
|
|
129
|
+
|
|
130
|
+
For detailed step-by-step instructions, please see **[CLAUDE.md](CLAUDE.md)**.
|
|
131
|
+
|
|
132
|
+
### Prerequisites
|
|
133
|
+
- **macOS** (required for AppleScript integration)
|
|
134
|
+
- **Python 3.11+** & **Node.js 18+**
|
|
135
|
+
- **Anthropic API key** & **Fish Audio API key**
|
|
136
|
+
- **Claude Code CLI** (`npm install -g @anthropic-ai/claude-code`)
|
|
137
|
+
|
|
138
|
+
### Quick Start
|
|
139
|
+
```bash
|
|
140
|
+
# Clone the repo
|
|
141
|
+
git clone https://github.com/akariwill/akari.git
|
|
142
|
+
cd akari
|
|
143
|
+
|
|
144
|
+
# Setup environment
|
|
145
|
+
cp .env.example .env
|
|
146
|
+
# Edit .env with your keys
|
|
147
|
+
|
|
148
|
+
# Install dependencies
|
|
149
|
+
pip install -r requirements.txt
|
|
150
|
+
cd frontend && npm install && cd ..
|
|
151
|
+
|
|
152
|
+
# Generate SSL certs
|
|
153
|
+
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'
|
|
154
|
+
|
|
155
|
+
# Run Backend & Frontend
|
|
156
|
+
# Terminal 1: python server.py
|
|
157
|
+
# Terminal 2: cd frontend && npm run dev
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Key Files
|
|
163
|
+
|
|
164
|
+
| File | Purpose |
|
|
165
|
+
|------|---------|
|
|
166
|
+
| `server.py` | Main server -- WebSocket handler, LLM, action system. |
|
|
167
|
+
| `frontend/src/orb.ts` | Three.js particle orb visualization (Lilac theme). |
|
|
168
|
+
| `frontend/src/voice.ts` | Web Speech API + audio playback management. |
|
|
169
|
+
| `actions.py` | System actions (Terminal, Chrome, Claude Code). |
|
|
170
|
+
| `memory.py` | SQLite memory system with FTS5 search. |
|
|
171
|
+
| `work_mode.py` | Persistent Claude Code development sessions. |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Deployment (Online Demo)
|
|
176
|
+
|
|
177
|
+
**Demo Website**: [akari-assistant.up.railway.app](https://akari-assistant.up.railway.app/)
|
|
178
|
+
|
|
179
|
+
To host AKARI online for demo purposes (e.g., Railway, Render, or VPS):
|
|
180
|
+
|
|
181
|
+
1. **Railway/Render**: Connect your GitHub repo.
|
|
182
|
+
2. **Environment Variables**: Add `ANTHROPIC_API_KEY` and `FISH_API_KEY`.
|
|
183
|
+
3. **Docker**: The provided `Dockerfile` will automatically:
|
|
184
|
+
- Build the Vite frontend.
|
|
185
|
+
- Set up the Python/FastAPI environment.
|
|
186
|
+
- Install Playwright for web automation.
|
|
187
|
+
4. **Public URL**: Ensure you access via **HTTPS** for voice features to work.
|
|
188
|
+
|
|
189
|
+
*Note: macOS-specific features (AppleScript for Calendar/Mail) only work when running locally on a Mac.*
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Features in Detail
|
|
194
|
+
|
|
195
|
+
### Action System
|
|
196
|
+
AKARI uses action tags to trigger real system actions:
|
|
197
|
+
- `[ACTION:BUILD]` -- spawns Claude Code to build a project.
|
|
198
|
+
- `[ACTION:BROWSE]` -- opens Chrome to a URL or search query.
|
|
199
|
+
- `[ACTION:RESEARCH]` -- deep research with Claude Opus, outputs an HTML report.
|
|
200
|
+
- `[ACTION:REMEMBER]` -- stores a fact for future context.
|
|
201
|
+
|
|
202
|
+
### Memory System
|
|
203
|
+
AKARI remembers things you tell it using SQLite with FTS5 full-text search. Preferences, decisions, and facts persist across sessions.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Contributing
|
|
208
|
+
|
|
209
|
+
Contributions are welcome! Please check **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines on adding new integrations, Windows/Linux support, or UI improvements.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Credits & Contact
|
|
220
|
+
|
|
221
|
+
- **Author**: [akariwill](https://github.com/akariwill)
|
|
222
|
+
- **Discord**: `wildanjr_` | **Instagram**: `@akariwill`
|
|
223
|
+
- **Voice**: Powered by [Fish Audio](https://fish.audio).
|
|
224
|
+
- **Brain**: Powered by [Anthropic Claude](https://anthropic.com).
|
|
225
|
+
|
|
226
|
+
<p align="center">
|
|
227
|
+
<i>Inspired by Akari Watanabe (渡辺 星) from "More Than a Married Couple, But Not Lovers".</i>
|
|
228
|
+
</p>
|