@inetafrica/open-claudia 1.10.0 → 1.10.1
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/README.md +96 -23
- package/bot-agent.js +9 -2
- package/bot.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,41 +1,69 @@
|
|
|
1
1
|
# Open Claudia
|
|
2
2
|
|
|
3
|
-
Your always-on AI coding assistant — Claude Code via Telegram.
|
|
3
|
+
Your always-on AI coding assistant — Claude Code and Cursor Agent via Telegram.
|
|
4
4
|
|
|
5
|
-
Send text, voice notes, screenshots, and files from your phone.
|
|
5
|
+
Send text, voice notes, screenshots, and files from your phone. Your chosen AI agent works on your projects and reports back.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
+
- **Multi-backend** — switch between Claude Code and Cursor Agent on the fly (`/cursor`, `/claude`)
|
|
9
10
|
- **Multi-project sessions** — switch between workspace projects
|
|
10
11
|
- **Per-project conversation history** — auto-resumes last conversation, switch with `/sessions`
|
|
12
|
+
- **Separate session persistence** — Claude and Cursor each maintain their own conversation state
|
|
11
13
|
- **Voice notes** — speak instructions, transcribed locally via Whisper
|
|
12
14
|
- **Screenshots & images** — send UI mockups, errors, or code screenshots
|
|
13
|
-
- **File sharing** — send PDFs, code files, documents — saved and read by
|
|
15
|
+
- **File sharing** — send PDFs, code files, documents — saved and read by the agent
|
|
14
16
|
- **Reply context** — reply to any message (including files) for follow-up
|
|
15
|
-
- **Streaming output** — see
|
|
17
|
+
- **Streaming output** — see the agent working in real-time
|
|
18
|
+
- **Agent mode** — non-blocking side conversations while heavy tasks run in the background
|
|
16
19
|
- **Cron jobs** — scheduled tasks (standups, git digests, health checks)
|
|
17
20
|
- **Encrypted vault** — store API keys and credentials securely
|
|
18
21
|
- **Customizable soul** — define your assistant's personality and knowledge
|
|
19
|
-
- **Model switching** — toggle between
|
|
20
|
-
- **Plan mode, effort levels, budgets** — full
|
|
22
|
+
- **Model switching** — toggle between models on either backend
|
|
23
|
+
- **Plan mode, effort levels, budgets** — full control from Telegram
|
|
21
24
|
- **Auto-updates** — checks for new versions every 5 minutes, upgrade with `/upgrade`
|
|
22
25
|
- **Multi-user auth** — authorize additional users with code verification
|
|
23
26
|
- **Cross-platform** — works on macOS, Linux, and Windows
|
|
24
27
|
|
|
25
28
|
## Prerequisites
|
|
26
29
|
|
|
27
|
-
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) installed and authenticated
|
|
28
30
|
- [Node.js](https://nodejs.org/) 18+
|
|
29
31
|
- A Telegram bot token (from [@BotFather](https://t.me/BotFather))
|
|
32
|
+
- At least one authenticated CLI backend on the host machine (see below)
|
|
30
33
|
- (Optional) [whisper.cpp](https://github.com/ggerganov/whisper.cpp) + ffmpeg for voice notes
|
|
31
34
|
|
|
32
|
-
##
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### 1. Install and authenticate the CLI backends
|
|
38
|
+
|
|
39
|
+
You need **at least one** of these authenticated on the machine where Open Claudia will run.
|
|
40
|
+
|
|
41
|
+
**Claude Code** (required):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g @anthropic-ai/claude-code
|
|
45
|
+
claude # Opens browser to log in
|
|
46
|
+
claude --version # Verify it works
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Cursor Agent** (optional — enables `/cursor` backend):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Install from Cursor IDE: Settings > General > Agent CLI
|
|
53
|
+
# Or download from https://docs.cursor.com/agent
|
|
54
|
+
agent login # Opens browser to authenticate
|
|
55
|
+
agent status # Verify: should show your email and plan
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> **Important**: Both CLIs store authentication locally on the machine. Open Claudia doesn't handle auth itself — it shells out to whichever CLI you've authenticated. If you see auth errors in Telegram, SSH into the machine and re-authenticate the relevant CLI.
|
|
59
|
+
|
|
60
|
+
### 2. Install Open Claudia
|
|
33
61
|
|
|
34
62
|
```bash
|
|
35
63
|
npm install -g @inetafrica/open-claudia
|
|
36
64
|
```
|
|
37
65
|
|
|
38
|
-
|
|
66
|
+
### 3. Run setup
|
|
39
67
|
|
|
40
68
|
```bash
|
|
41
69
|
open-claudia setup
|
|
@@ -43,7 +71,7 @@ open-claudia setup
|
|
|
43
71
|
|
|
44
72
|
The setup wizard will:
|
|
45
73
|
|
|
46
|
-
1. Detect Claude CLI, ffmpeg, and whisper on your system
|
|
74
|
+
1. Detect Claude CLI, Cursor Agent CLI, ffmpeg, and whisper on your system
|
|
47
75
|
2. Verify Claude is authenticated
|
|
48
76
|
3. Ask for your Telegram bot token and verify it
|
|
49
77
|
4. Generate a verification code — send it to your bot to prove your identity
|
|
@@ -69,6 +97,16 @@ If installed as a background service, the bot starts automatically on login and
|
|
|
69
97
|
|
|
70
98
|
## Telegram Commands
|
|
71
99
|
|
|
100
|
+
### Backend Switching
|
|
101
|
+
|
|
102
|
+
| Command | Description |
|
|
103
|
+
|---------|-------------|
|
|
104
|
+
| `/cursor` | Switch to Cursor Agent backend |
|
|
105
|
+
| `/claude` | Switch to Claude Code backend |
|
|
106
|
+
| `/backend` | Show current backend with picker |
|
|
107
|
+
|
|
108
|
+
Each backend keeps its own persistent session. Switching doesn't lose your place — you can go back and forth freely.
|
|
109
|
+
|
|
72
110
|
### Session Management
|
|
73
111
|
|
|
74
112
|
| Command | Description |
|
|
@@ -85,13 +123,14 @@ When you select a project, the last conversation is automatically resumed. Tap "
|
|
|
85
123
|
|
|
86
124
|
| Command | Description |
|
|
87
125
|
|---------|-------------|
|
|
88
|
-
| `/model` | Switch model (opus / sonnet / haiku) |
|
|
126
|
+
| `/model` | Switch model (opus / sonnet / haiku for Claude; any model flag for Cursor) |
|
|
89
127
|
| `/effort` | Set effort level (low / medium / high / max) |
|
|
90
|
-
| `/budget` | Set max spend for next task (e.g. `/budget 0.50`) |
|
|
91
|
-
| `/plan` | Toggle plan mode |
|
|
128
|
+
| `/budget` | Set max spend for next task (e.g. `/budget 0.50`) — Claude only |
|
|
129
|
+
| `/plan` | Toggle plan mode — Claude only |
|
|
92
130
|
| `/compact` | Summarize conversation context |
|
|
93
|
-
| `/worktree` | Toggle isolated git branch |
|
|
94
|
-
| `/
|
|
131
|
+
| `/worktree` | Toggle isolated git branch — Claude only |
|
|
132
|
+
| `/mode` | Switch between direct and agent bot modes |
|
|
133
|
+
| `/status` | Show current session, backend, and settings |
|
|
95
134
|
|
|
96
135
|
### Automation
|
|
97
136
|
|
|
@@ -111,11 +150,27 @@ When you select a project, the last conversation is automatically resumed. Tap "
|
|
|
111
150
|
| `/stop` | Cancel a running task |
|
|
112
151
|
| `/help` | Show all commands |
|
|
113
152
|
|
|
153
|
+
## Backend Comparison
|
|
154
|
+
|
|
155
|
+
| | Claude Code | Cursor Agent |
|
|
156
|
+
|---|---|---|
|
|
157
|
+
| Binary | `claude` | `agent` |
|
|
158
|
+
| Session flag | `--resume <id>` | `--resume <id>` |
|
|
159
|
+
| Auth | `claude auth` | `agent login` |
|
|
160
|
+
| Plan mode | Yes (`--permission-mode plan`) | Yes (`--mode plan`) |
|
|
161
|
+
| Budget control | Yes (`--max-budget-usd`) | No |
|
|
162
|
+
| Effort levels | Yes | No |
|
|
163
|
+
| Worktree | Yes | No |
|
|
164
|
+
| Model switching | Yes | Yes |
|
|
165
|
+
| Dangerously skip permissions | Yes | Yes (`--trust`) |
|
|
166
|
+
|
|
167
|
+
Both backends output `stream-json` which Open Claudia parses for real-time progress updates.
|
|
168
|
+
|
|
114
169
|
## Sending Files
|
|
115
170
|
|
|
116
|
-
Send any file to the bot — PDFs, code files, documents, images. Files are saved to `~/.open-claudia/files/` with their original names.
|
|
171
|
+
Send any file to the bot — PDFs, code files, documents, images. Files are saved to `~/.open-claudia/files/` with their original names. The agent reads the file and responds based on content.
|
|
117
172
|
|
|
118
|
-
Add a caption to your file to give
|
|
173
|
+
Add a caption to your file to give the agent specific instructions:
|
|
119
174
|
- Send a PDF with caption "summarize the key findings"
|
|
120
175
|
- Send a code file with caption "find bugs in this"
|
|
121
176
|
- Send a screenshot with caption "implement this design"
|
|
@@ -152,11 +207,14 @@ This shows authorized chats, pending requests, and lets you approve/deny or add
|
|
|
152
207
|
## How It Works
|
|
153
208
|
|
|
154
209
|
```
|
|
155
|
-
Phone (Telegram) --> Bot (Node.js) --> Claude Code CLI
|
|
210
|
+
Phone (Telegram) --> Bot (Node.js) --> Claude Code CLI --> Your codebase
|
|
211
|
+
--> Cursor Agent CLI -->
|
|
156
212
|
<-- <-- <--
|
|
157
213
|
```
|
|
158
214
|
|
|
159
|
-
The bot spawns `
|
|
215
|
+
The bot spawns the active backend CLI in headless mode (`--print` / `-p`) for each message, streaming `stream-json` output back to Telegram. It maintains conversation context via `--resume` and passes a system prompt that gives the agent awareness of the Telegram environment, configuration files, and the ability to send files/images directly.
|
|
216
|
+
|
|
217
|
+
Use `/cursor` or `/claude` to switch which CLI handles your messages. Each maintains its own session ID, so switching doesn't lose context on either side.
|
|
160
218
|
|
|
161
219
|
## Configuration Files
|
|
162
220
|
|
|
@@ -164,17 +222,30 @@ All stored in `~/.open-claudia/`:
|
|
|
164
222
|
|
|
165
223
|
| File | Purpose |
|
|
166
224
|
|------|---------|
|
|
167
|
-
| `.env` | Telegram token, workspace path, binary paths |
|
|
225
|
+
| `.env` | Telegram token, workspace path, binary paths (`CLAUDE_PATH`, `CURSOR_PATH`) |
|
|
168
226
|
| `auth.json` | Authorized users and pending requests |
|
|
169
227
|
| `vault.enc` | Encrypted credential store |
|
|
170
228
|
| `soul.md` | Assistant identity and personality (editable via `/soul`) |
|
|
171
229
|
| `crons.json` | Scheduled tasks |
|
|
172
230
|
| `sessions.json` | Per-project conversation history |
|
|
173
|
-
| `state.json` | Current session state (survives restarts) |
|
|
231
|
+
| `state.json` | Current session state including active backend (survives restarts) |
|
|
174
232
|
| `bot.log` | Bot logs |
|
|
175
233
|
| `files/` | Files received from Telegram |
|
|
176
234
|
| `media/` | Temporary media (voice notes, photos) |
|
|
177
235
|
|
|
236
|
+
### Environment Variables (.env)
|
|
237
|
+
|
|
238
|
+
| Variable | Required | Description |
|
|
239
|
+
|----------|----------|-------------|
|
|
240
|
+
| `TELEGRAM_BOT_TOKEN` | Yes | Bot token from BotFather |
|
|
241
|
+
| `TELEGRAM_CHAT_ID` | Yes | Comma-separated authorized chat IDs |
|
|
242
|
+
| `WORKSPACE` | Yes | Path to your projects directory |
|
|
243
|
+
| `CLAUDE_PATH` | Yes | Path to Claude Code CLI binary |
|
|
244
|
+
| `CURSOR_PATH` | No | Path to Cursor Agent CLI binary (auto-detected if in PATH) |
|
|
245
|
+
| `WHISPER_CLI` | No | Path to whisper.cpp binary |
|
|
246
|
+
| `WHISPER_MODEL` | No | Whisper model to use |
|
|
247
|
+
| `FFMPEG` | No | Path to ffmpeg binary |
|
|
248
|
+
|
|
178
249
|
## Background Service
|
|
179
250
|
|
|
180
251
|
### macOS (launchd)
|
|
@@ -188,6 +259,8 @@ launchctl load ~/Library/LaunchAgents/com.open-claudia.plist
|
|
|
188
259
|
launchctl unload ~/Library/LaunchAgents/com.open-claudia.plist
|
|
189
260
|
```
|
|
190
261
|
|
|
262
|
+
**Important**: If `agent` is installed in a non-standard location (e.g. `~/.local/bin`), make sure that path is included in the launchd plist's `PATH` environment variable. Otherwise the bot won't detect it at startup.
|
|
263
|
+
|
|
191
264
|
### Linux (systemd)
|
|
192
265
|
|
|
193
266
|
```bash
|
|
@@ -202,7 +275,7 @@ sudo systemctl status claude-telegram-bot
|
|
|
202
275
|
|
|
203
276
|
The bot checks npm for new versions every 5 minutes. When an update is available, you get a Telegram notification:
|
|
204
277
|
|
|
205
|
-
> "Hey! A new version is available (v1.
|
|
278
|
+
> "Hey! A new version is available (v1.10.0). You're on v1.9.2."
|
|
206
279
|
|
|
207
280
|
Send `/upgrade` to update. The bot will:
|
|
208
281
|
1. Download and install the new version
|
|
@@ -232,7 +305,7 @@ Store sensitive credentials encrypted:
|
|
|
232
305
|
/vault lock # Lock vault
|
|
233
306
|
```
|
|
234
307
|
|
|
235
|
-
|
|
308
|
+
The agent can read vault credentials when unlocked — useful for deployment scripts and API calls.
|
|
236
309
|
|
|
237
310
|
## License
|
|
238
311
|
|
package/bot-agent.js
CHANGED
|
@@ -1110,10 +1110,17 @@ bot.onText(/\/sessions$/, (msg) => {
|
|
|
1110
1110
|
|
|
1111
1111
|
bot.onText(/\/model$/, (msg) => {
|
|
1112
1112
|
if (!isAuthorized(msg)) return;
|
|
1113
|
-
|
|
1113
|
+
const keyboard = settings.backend === "cursor" ? [
|
|
1114
|
+
[{ text: "Composer 2", callback_data: "m:composer-2" }, { text: "Composer 2 Fast", callback_data: "m:composer-2-fast" }],
|
|
1115
|
+
[{ text: "Opus 4.6 Thinking", callback_data: "m:claude-4.6-opus-high-thinking" }, { text: "Sonnet 4.6", callback_data: "m:claude-4.6-sonnet-medium" }],
|
|
1116
|
+
[{ text: "GPT-5.4", callback_data: "m:gpt-5.4-medium" }, { text: "GPT-5.4 High", callback_data: "m:gpt-5.4-high" }],
|
|
1117
|
+
[{ text: "Auto", callback_data: "m:auto" }, { text: "Default", callback_data: "m:default" }],
|
|
1118
|
+
] : [
|
|
1114
1119
|
[{ text: "Opus", callback_data: "m:opus" }, { text: "Sonnet", callback_data: "m:sonnet" }, { text: "Haiku", callback_data: "m:haiku" }],
|
|
1115
1120
|
[{ text: "Default", callback_data: "m:default" }],
|
|
1116
|
-
]
|
|
1121
|
+
];
|
|
1122
|
+
const label = settings.backend === "cursor" ? "Cursor Agent" : "Claude Code";
|
|
1123
|
+
send(`${label} model: ${settings.model || "default"}\n\nOr type /model <name> for any model.`, { keyboard: { inline_keyboard: keyboard } });
|
|
1117
1124
|
});
|
|
1118
1125
|
bot.onText(/\/model (.+)/, (msg, match) => { if (!isAuthorized(msg)) return; settings.model = match[1].trim().toLowerCase(); if (settings.model === "default") settings.model = null; send(`Model: ${settings.model || "default"}`); });
|
|
1119
1126
|
|
package/bot.js
CHANGED
|
@@ -1153,10 +1153,17 @@ bot.onText(/\/sessions$/, (msg) => {
|
|
|
1153
1153
|
|
|
1154
1154
|
bot.onText(/\/model$/, (msg) => {
|
|
1155
1155
|
if (!isAuthorized(msg)) return;
|
|
1156
|
-
|
|
1156
|
+
const keyboard = settings.backend === "cursor" ? [
|
|
1157
|
+
[{ text: "Composer 2", callback_data: "m:composer-2" }, { text: "Composer 2 Fast", callback_data: "m:composer-2-fast" }],
|
|
1158
|
+
[{ text: "Opus 4.6 Thinking", callback_data: "m:claude-4.6-opus-high-thinking" }, { text: "Sonnet 4.6", callback_data: "m:claude-4.6-sonnet-medium" }],
|
|
1159
|
+
[{ text: "GPT-5.4", callback_data: "m:gpt-5.4-medium" }, { text: "GPT-5.4 High", callback_data: "m:gpt-5.4-high" }],
|
|
1160
|
+
[{ text: "Auto", callback_data: "m:auto" }, { text: "Default", callback_data: "m:default" }],
|
|
1161
|
+
] : [
|
|
1157
1162
|
[{ text: "Opus", callback_data: "m:opus" }, { text: "Sonnet", callback_data: "m:sonnet" }, { text: "Haiku", callback_data: "m:haiku" }],
|
|
1158
1163
|
[{ text: "Default", callback_data: "m:default" }],
|
|
1159
|
-
]
|
|
1164
|
+
];
|
|
1165
|
+
const label = settings.backend === "cursor" ? "Cursor Agent" : "Claude Code";
|
|
1166
|
+
send(`${label} model: ${settings.model || "default"}\n\nOr type /model <name> for any model.`, { keyboard: { inline_keyboard: keyboard } });
|
|
1160
1167
|
});
|
|
1161
1168
|
bot.onText(/\/model (.+)/, (msg, match) => { if (!isAuthorized(msg)) return; settings.model = match[1].trim().toLowerCase(); if (settings.model === "default") settings.model = null; send(`Model: ${settings.model || "default"}`); });
|
|
1162
1169
|
|