@beeai/cli 0.1.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 +302 -0
- package/bin/bee.js +58 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 bee-cli 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.
|
package/README.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
<div align="center"><img width="495" height="174" alt="Bee Rounded@2x" src="https://github.com/user-attachments/assets/d24ad62a-aad7-487a-a634-efde561194fe" />
|
|
2
|
+
</div>
|
|
3
|
+
|
|
4
|
+
<h1 align="center">
|
|
5
|
+
CLI Client for Bee AI
|
|
6
|
+
</h1>
|
|
7
|
+
|
|
8
|
+
<h4 align="center">
|
|
9
|
+
Connect Bee AI data with your tools
|
|
10
|
+
</h4>
|
|
11
|
+
|
|
12
|
+
CLI client for [Bee](https://www.bee.computer/) — the wearable AI that captures your conversations and learns about you.
|
|
13
|
+
|
|
14
|
+
## How does it work?
|
|
15
|
+
|
|
16
|
+
Bee is an **encrypted** wearable personal AI device that sits quietly in the background, capturing your conversations and experiences throughout the day. It records and encrypts your data making it available only to you. Then inside of the secure compute units it transforms ambient context into:
|
|
17
|
+
|
|
18
|
+
- **Conversation transcripts** with speaker identification
|
|
19
|
+
- **Daily summaries** of your activities and discussions
|
|
20
|
+
- **Facts** — things Bee learns and remembers about you
|
|
21
|
+
- **Todos** — action items extracted from your conversations
|
|
22
|
+
- **Personal insights** and patterns over time
|
|
23
|
+
|
|
24
|
+
Bee understands 40+ languages, features 7-day battery life, and works with the iOS app to give you a searchable, AI-powered memory of your life.
|
|
25
|
+
|
|
26
|
+
## Why Bee CLI?
|
|
27
|
+
|
|
28
|
+
The Bee CLI exports your personal data as markdown files, making it available to:
|
|
29
|
+
|
|
30
|
+
- **AI agents**: Give Claude, GPT, or other assistants your personal context so they can help you more effectively
|
|
31
|
+
- **Local search**: Use grep, ripgrep, or your editor to search across all your conversations
|
|
32
|
+
- **Backup**: Keep a portable, offline copy of your Bee data
|
|
33
|
+
- **Custom integrations**: Build workflows with your conversation history, facts, and todos
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
Install from npm:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g @beeai/cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or download the latest release from the releases page or build from source.
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bee <command> [options]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
By default, data commands return markdown. Use `--json` to print raw JSON.
|
|
54
|
+
|
|
55
|
+
- `login` - Log in interactively, or with `--token <token>` / `--token-stdin`.
|
|
56
|
+
- `status` - Show current authentication status.
|
|
57
|
+
- `logout` - Log out and clear stored credentials.
|
|
58
|
+
|
|
59
|
+
- `me` - Fetch your user profile. Use `--json` for JSON output.
|
|
60
|
+
|
|
61
|
+
- `today` - Fetch today's brief (calendar events and emails). Use `--json` for JSON output.
|
|
62
|
+
|
|
63
|
+
- `now` - Fetch conversations from the last 10 hours with utterances. Use `--json` for JSON output.
|
|
64
|
+
|
|
65
|
+
- `changed` - Fetch recent changes (defaults to last 24 hours). Use `--cursor <cursor>` and `--json` for JSON output.
|
|
66
|
+
|
|
67
|
+
- `facts` - Manage your facts (things Bee remembers about you).
|
|
68
|
+
- `facts list` - List facts. Options: `--limit N`, `--cursor <cursor>`, `--unconfirmed`, `--json`.
|
|
69
|
+
- `facts get <id>` - Get a specific fact. Options: `--json`.
|
|
70
|
+
- `facts create --text <text>` - Create a new fact. Options: `--json`.
|
|
71
|
+
- `facts update <id> --text <text>` - Update a fact. Options: `--confirmed <true|false>`, `--json`.
|
|
72
|
+
- `facts delete <id>` - Delete a fact. Options: `--json`.
|
|
73
|
+
|
|
74
|
+
- `todos` - Manage your todos.
|
|
75
|
+
- `todos list` - List todos. Options: `--limit N`, `--cursor <cursor>`, `--json`.
|
|
76
|
+
- `todos get <id>` - Get a specific todo. Options: `--json`.
|
|
77
|
+
- `todos create --text <text>` - Create a new todo. Options: `--alarm-at <iso>`, `--json`.
|
|
78
|
+
- `todos update <id>` - Update a todo. Options: `--text <text>`, `--completed <true|false>`, `--alarm-at <iso>`, `--clear-alarm`, `--json`.
|
|
79
|
+
- `todos delete <id>` - Delete a todo. Options: `--json`.
|
|
80
|
+
|
|
81
|
+
- `conversations` - Access your recorded conversations.
|
|
82
|
+
- `conversations list` - List conversations. Options: `--limit N`, `--cursor <cursor>`, `--json`.
|
|
83
|
+
- `conversations get <id>` - Get a specific conversation with full transcript. Options: `--json`.
|
|
84
|
+
|
|
85
|
+
- `daily` - Access daily summaries of your activity.
|
|
86
|
+
- `daily list` - List daily summaries. Options: `--limit N`, `--json`.
|
|
87
|
+
- `daily get <id>` - Get a specific daily summary. Options: `--json`.
|
|
88
|
+
|
|
89
|
+
- `journals` - Access your journals.
|
|
90
|
+
- `journals list` - List journals. Options: `--limit N`, `--cursor <cursor>`, `--json`.
|
|
91
|
+
- `journals get <id>` - Get a specific journal. Options: `--json`.
|
|
92
|
+
|
|
93
|
+
- `search` - Search your data.
|
|
94
|
+
- `search conversations --query <text>` - Search conversations. Options: `--limit N`, `--cursor <cursor>`, `--json`.
|
|
95
|
+
|
|
96
|
+
- `sync` - Export your Bee data to markdown files for AI agents. Options: `--output <dir>`, `--recent-days N`, `--only <facts|todos|daily|conversations>`.
|
|
97
|
+
|
|
98
|
+
- `proxy` - Start a local HTTP proxy for the Bee API. Options: `--port N`.
|
|
99
|
+
|
|
100
|
+
- `ping` - Run a quick connectivity check. Use `--count N` to repeat.
|
|
101
|
+
|
|
102
|
+
- `version` - Print the CLI version. Use `--json` for JSON output.
|
|
103
|
+
|
|
104
|
+
## Sync Command
|
|
105
|
+
|
|
106
|
+
The `sync` command exports all your Bee data to a local directory as markdown files.
|
|
107
|
+
|
|
108
|
+
### Usage
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
bee sync [--output <dir>] [--recent-days N] [--only <facts|todos|daily|conversations>]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Options
|
|
115
|
+
|
|
116
|
+
| Option | Default | Description |
|
|
117
|
+
|--------|---------|-------------|
|
|
118
|
+
| `--output <dir>` | `bee-sync` | Output directory for synced files |
|
|
119
|
+
| `--recent-days N` | `3` | Number of recent days to sync with full conversation details |
|
|
120
|
+
| `--only <targets>` | all | Limit sync to a comma-separated list: `facts`, `todos`, `daily`, `conversations` |
|
|
121
|
+
|
|
122
|
+
### Output Structure
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
bee-sync/
|
|
126
|
+
├── facts.md # All facts (confirmed and pending)
|
|
127
|
+
├── todos.md # All todos (open and completed)
|
|
128
|
+
└── daily/
|
|
129
|
+
└── YYYY-MM-DD/ # One folder per day
|
|
130
|
+
├── summary.md # Daily summary
|
|
131
|
+
└── conversations/
|
|
132
|
+
├── 123.md # Individual conversation files
|
|
133
|
+
├── 456.md
|
|
134
|
+
└── ...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### File Formats
|
|
138
|
+
|
|
139
|
+
#### facts.md
|
|
140
|
+
|
|
141
|
+
Contains all your facts organized by confirmation status.
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
# Facts
|
|
145
|
+
|
|
146
|
+
## Confirmed
|
|
147
|
+
|
|
148
|
+
- Fact text here [tag1, tag2] (2024-01-15T10:30:00.000Z, id 42)
|
|
149
|
+
- Another fact (2024-01-14T08:00:00.000Z, id 41)
|
|
150
|
+
|
|
151
|
+
## Pending
|
|
152
|
+
|
|
153
|
+
- Unconfirmed fact (2024-01-16T12:00:00.000Z, id 43)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Each fact entry includes:
|
|
157
|
+
- The fact text
|
|
158
|
+
- Tags (if any) in brackets
|
|
159
|
+
- Creation timestamp in ISO 8601 format
|
|
160
|
+
- Unique fact ID
|
|
161
|
+
|
|
162
|
+
#### todos.md
|
|
163
|
+
|
|
164
|
+
Contains all your todos organized by completion status.
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
# Todos
|
|
168
|
+
|
|
169
|
+
## Open
|
|
170
|
+
|
|
171
|
+
- Buy groceries (id 10, created 2024-01-15T09:00:00.000Z, alarm 2024-01-16T18:00:00.000Z)
|
|
172
|
+
- Call dentist (id 11, created 2024-01-15T10:00:00.000Z)
|
|
173
|
+
|
|
174
|
+
## Completed
|
|
175
|
+
|
|
176
|
+
- Finish report (id 9, created 2024-01-14T08:00:00.000Z)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Each todo entry includes:
|
|
180
|
+
- The todo text
|
|
181
|
+
- Unique todo ID
|
|
182
|
+
- Creation timestamp
|
|
183
|
+
- Alarm time (if set)
|
|
184
|
+
|
|
185
|
+
#### daily/YYYY-MM-DD/summary.md
|
|
186
|
+
|
|
187
|
+
Daily summary containing an overview of the day.
|
|
188
|
+
|
|
189
|
+
```markdown
|
|
190
|
+
# Daily Summary — 2024-01-15
|
|
191
|
+
|
|
192
|
+
- id: 100
|
|
193
|
+
- date_time: 2024-01-15T00:00:00.000Z
|
|
194
|
+
- created_at: 2024-01-16T02:00:00.000Z
|
|
195
|
+
- conversations_count: 5
|
|
196
|
+
|
|
197
|
+
## Short Summary
|
|
198
|
+
|
|
199
|
+
Brief overview of the day's activities.
|
|
200
|
+
|
|
201
|
+
## Summary
|
|
202
|
+
|
|
203
|
+
Detailed summary of conversations and events.
|
|
204
|
+
|
|
205
|
+
## Email Summary
|
|
206
|
+
|
|
207
|
+
Summary of email activity (if available).
|
|
208
|
+
|
|
209
|
+
## Calendar Summary
|
|
210
|
+
|
|
211
|
+
Summary of calendar events (if available).
|
|
212
|
+
|
|
213
|
+
## Locations
|
|
214
|
+
|
|
215
|
+
- 123 Main St, City (37.77490, -122.41940)
|
|
216
|
+
- Coffee Shop (37.78500, -122.40900)
|
|
217
|
+
|
|
218
|
+
## Conversations
|
|
219
|
+
|
|
220
|
+
- 123 (2024-01-15T09:00:00.000Z - 2024-01-15T09:30:00.000Z) — Meeting with team (conversations/123.md)
|
|
221
|
+
- 124 (2024-01-15T14:00:00.000Z - 2024-01-15T14:15:00.000Z) — Quick chat (conversations/124.md)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
#### daily/YYYY-MM-DD/conversations/ID.md
|
|
225
|
+
|
|
226
|
+
Individual conversation transcripts with full details.
|
|
227
|
+
|
|
228
|
+
```markdown
|
|
229
|
+
# Conversation 123
|
|
230
|
+
|
|
231
|
+
- start_time: 2024-01-15T09:00:00.000Z
|
|
232
|
+
- end_time: 2024-01-15T09:30:00.000Z
|
|
233
|
+
- device_type: ios
|
|
234
|
+
- state: processed
|
|
235
|
+
- created_at: 2024-01-15T09:00:00.000Z
|
|
236
|
+
- updated_at: 2024-01-15T10:00:00.000Z
|
|
237
|
+
|
|
238
|
+
## Short Summary
|
|
239
|
+
|
|
240
|
+
Brief description of the conversation.
|
|
241
|
+
|
|
242
|
+
## Summary
|
|
243
|
+
|
|
244
|
+
Detailed summary of what was discussed.
|
|
245
|
+
|
|
246
|
+
## Primary Location
|
|
247
|
+
|
|
248
|
+
- 123 Main St, City (37.77490, -122.41940)
|
|
249
|
+
- created_at: 2024-01-15T09:00:00.000Z
|
|
250
|
+
|
|
251
|
+
## Suggested Links
|
|
252
|
+
|
|
253
|
+
- https://example.com/resource (2024-01-15T09:15:00.000Z)
|
|
254
|
+
|
|
255
|
+
## Transcriptions
|
|
256
|
+
|
|
257
|
+
### Transcription 456
|
|
258
|
+
- realtime: false
|
|
259
|
+
|
|
260
|
+
- Speaker 1: Hello, how are you? (2024-01-15T09:00:00.000Z - 2024-01-15T09:00:05.000Z)
|
|
261
|
+
- Speaker 2: I'm doing well, thanks! (2024-01-15T09:00:06.000Z - 2024-01-15T09:00:10.000Z)
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Each conversation file includes:
|
|
265
|
+
- Metadata (timestamps, device type, state)
|
|
266
|
+
- Short and detailed summaries
|
|
267
|
+
- Primary location with coordinates
|
|
268
|
+
- Suggested links extracted from the conversation
|
|
269
|
+
- Full transcription with speaker labels and timestamps
|
|
270
|
+
|
|
271
|
+
### Examples
|
|
272
|
+
|
|
273
|
+
Sync to the default directory:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
bee sync
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Sync to a custom directory:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
bee sync --output ~/Documents/bee-backup
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Sync with more recent days for full details:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
bee sync --recent-days 7
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Notes
|
|
292
|
+
|
|
293
|
+
- The sync command fetches all facts, todos, and daily summaries
|
|
294
|
+
- Conversations are fetched concurrently (4 at a time) for faster syncing
|
|
295
|
+
- Recent days (controlled by `--recent-days`) get their conversations synced twice to ensure completeness
|
|
296
|
+
- All timestamps are in ISO 8601 format (UTC)
|
|
297
|
+
- The output directory is created if it doesn't exist
|
|
298
|
+
- Existing files are overwritten on subsequent syncs
|
|
299
|
+
|
|
300
|
+
## License
|
|
301
|
+
|
|
302
|
+
MIT
|
package/bin/bee.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const platformMap = {
|
|
9
|
+
darwin: "mac",
|
|
10
|
+
linux: "linux",
|
|
11
|
+
win32: "windows",
|
|
12
|
+
};
|
|
13
|
+
const archMap = {
|
|
14
|
+
arm64: "arm64",
|
|
15
|
+
x64: "x64",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const resolvedPlatform = platformMap[process.platform];
|
|
19
|
+
const resolvedArch = archMap[process.arch];
|
|
20
|
+
|
|
21
|
+
if (!resolvedPlatform || !resolvedArch) {
|
|
22
|
+
console.error(
|
|
23
|
+
`Unsupported platform for Bee CLI: ${process.platform} ${process.arch}`
|
|
24
|
+
);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const binaryName = resolvedPlatform === "windows" ? "bee.exe" : "bee";
|
|
29
|
+
const overridePath = process.env.BEE_CLI_BINARY;
|
|
30
|
+
const binaryPath = overridePath
|
|
31
|
+
? path.resolve(overridePath)
|
|
32
|
+
: path.resolve(
|
|
33
|
+
__dirname,
|
|
34
|
+
"..",
|
|
35
|
+
"dist",
|
|
36
|
+
"platforms",
|
|
37
|
+
`${resolvedPlatform}-${resolvedArch}`,
|
|
38
|
+
binaryName
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
if (!existsSync(binaryPath)) {
|
|
42
|
+
console.error(
|
|
43
|
+
`Bee CLI binary not found for ${resolvedPlatform}-${resolvedArch} at ${binaryPath}`
|
|
44
|
+
);
|
|
45
|
+
console.error("Reinstall the package or rebuild the platform binaries.");
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
50
|
+
stdio: "inherit",
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
if (result.error) {
|
|
54
|
+
console.error("Failed to launch Bee CLI binary:", result.error);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@beeai/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI client for bee.computer",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"bee": "bin/bee.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/bee.js",
|
|
12
|
+
"dist/platforms",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "bun build ./sources/main.ts --compile --outfile ./dist/bee",
|
|
18
|
+
"build:all": "bash ./scripts/build-all.sh",
|
|
19
|
+
"dev": "bun ./sources/main.ts",
|
|
20
|
+
"postinstall": "node ./scripts/postinstall.js",
|
|
21
|
+
"typecheck": "tsc --noEmit"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@inquirer/prompts": "^5.3.2",
|
|
25
|
+
"date-fns": "^4.1.0",
|
|
26
|
+
"qrcode": "^1.5.4",
|
|
27
|
+
"tweetnacl": "^1.0.3"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/qrcode": "^1.5.5",
|
|
31
|
+
"bun-types": "^1.3.8",
|
|
32
|
+
"typescript": "^5.7.3"
|
|
33
|
+
}
|
|
34
|
+
}
|