@gobi-ai/cli 0.8.0 → 0.9.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/.claude-plugin/marketplace.json +8 -4
- package/.claude-plugin/plugin.json +6 -2
- package/dist/commands/media.js +76 -12
- package/package.json +2 -2
- package/skills/gobi-brain/SKILL.md +56 -0
- package/skills/{gobi-cli/SKILL.template.md → gobi-core/SKILL.md} +27 -63
- package/skills/gobi-core/references/space.md +48 -0
- package/skills/gobi-media/SKILL.md +57 -0
- package/skills/{gobi-cli → gobi-media}/references/media.md +0 -17
- package/skills/gobi-sense/SKILL.md +34 -0
- package/skills/gobi-space/SKILL.md +58 -0
- package/skills/{gobi-cli → gobi-space}/references/space.md +0 -22
- package/skills/gobi-cli/SKILL.md +0 -240
- package/skills/gobi-cli/scripts/generate-docs.ts +0 -199
- /package/skills/{gobi-cli → gobi-brain}/references/brain.md +0 -0
- /package/skills/{gobi-cli → gobi-core}/references/auth.md +0 -0
- /package/skills/{gobi-cli → gobi-core}/references/init.md +0 -0
- /package/skills/{gobi-cli → gobi-core}/references/session.md +0 -0
- /package/skills/{gobi-cli → gobi-core}/references/sync.md +0 -0
- /package/skills/{gobi-cli → gobi-core}/references/update.md +0 -0
- /package/skills/{gobi-cli → gobi-sense}/references/sense.md +0 -0
|
@@ -4,19 +4,23 @@
|
|
|
4
4
|
"name": "gobi-ai"
|
|
5
5
|
},
|
|
6
6
|
"description": "Claude Code plugin for the Gobi collaborative knowledge platform CLI",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.9.0",
|
|
8
8
|
"plugins": [
|
|
9
9
|
{
|
|
10
10
|
"name": "gobi",
|
|
11
|
-
"description": "Manage the Gobi collaborative knowledge platform from the command line. Search and ask brains, publish brain documents, create threads, manage sessions.",
|
|
12
|
-
"version": "0.
|
|
11
|
+
"description": "Manage the Gobi collaborative knowledge platform from the command line. Search and ask brains, publish brain documents, create threads, manage sessions, generate images and videos.",
|
|
12
|
+
"version": "0.9.0",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "gobi-ai"
|
|
15
15
|
},
|
|
16
16
|
"homepage": "https://github.com/gobi-ai/gobi-cli",
|
|
17
17
|
"source": "./",
|
|
18
18
|
"skills": [
|
|
19
|
-
"./skills/gobi-
|
|
19
|
+
"./skills/gobi-core",
|
|
20
|
+
"./skills/gobi-space",
|
|
21
|
+
"./skills/gobi-brain",
|
|
22
|
+
"./skills/gobi-media",
|
|
23
|
+
"./skills/gobi-sense",
|
|
20
24
|
"./skills/gobi-homepage"
|
|
21
25
|
],
|
|
22
26
|
"commands": "./commands"
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gobi",
|
|
3
3
|
"description": "Manage the Gobi collaborative knowledge platform from the command line",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "gobi-ai"
|
|
7
7
|
},
|
|
8
8
|
"homepage": "https://github.com/gobi-ai/gobi-cli",
|
|
9
9
|
"skills": [
|
|
10
|
-
"./skills/gobi-
|
|
10
|
+
"./skills/gobi-core",
|
|
11
|
+
"./skills/gobi-space",
|
|
12
|
+
"./skills/gobi-brain",
|
|
13
|
+
"./skills/gobi-media",
|
|
14
|
+
"./skills/gobi-sense",
|
|
11
15
|
"./skills/gobi-homepage"
|
|
12
16
|
],
|
|
13
17
|
"commands": "./commands"
|
package/dist/commands/media.js
CHANGED
|
@@ -3,7 +3,7 @@ import { BASE_URL, POLL_MAX_DURATION_MS } from "../constants.js";
|
|
|
3
3
|
import { getValidToken } from "../auth/manager.js";
|
|
4
4
|
import { ApiError } from "../errors.js";
|
|
5
5
|
import { isJsonMode, jsonOut, unwrapResp } from "./utils.js";
|
|
6
|
-
// ──
|
|
6
|
+
// ── Helpers ──
|
|
7
7
|
async function pollStatus(path, terminalStates, intervalMs = 3000) {
|
|
8
8
|
const start = Date.now();
|
|
9
9
|
while (Date.now() - start < POLL_MAX_DURATION_MS) {
|
|
@@ -12,10 +12,16 @@ async function pollStatus(path, terminalStates, intervalMs = 3000) {
|
|
|
12
12
|
const status = data.status || "";
|
|
13
13
|
if (terminalStates.includes(status))
|
|
14
14
|
return data;
|
|
15
|
+
// If no status field but downloadUrl exists, treat as completed
|
|
16
|
+
if (!status && extractImageUrl(data))
|
|
17
|
+
return data;
|
|
15
18
|
await new Promise((r) => setTimeout(r, intervalMs));
|
|
16
19
|
}
|
|
17
20
|
throw new Error(`Polling timed out after ${POLL_MAX_DURATION_MS / 1000}s`);
|
|
18
21
|
}
|
|
22
|
+
function extractImageUrl(data) {
|
|
23
|
+
return (data.downloadUrl || data.download_url || data.url);
|
|
24
|
+
}
|
|
19
25
|
export function registerMediaCommand(program) {
|
|
20
26
|
const media = program
|
|
21
27
|
.command("media")
|
|
@@ -278,10 +284,17 @@ export function registerMediaCommand(program) {
|
|
|
278
284
|
jsonOut(data);
|
|
279
285
|
return;
|
|
280
286
|
}
|
|
287
|
+
const imgUrl = extractImageUrl(data);
|
|
288
|
+
const status = data.status || "queued";
|
|
281
289
|
console.log(`Image generation started!\n` +
|
|
282
290
|
` Job ID: ${jobId}\n` +
|
|
283
|
-
` Status: ${
|
|
284
|
-
|
|
291
|
+
` Status: ${status}`);
|
|
292
|
+
if (imgUrl) {
|
|
293
|
+
console.log(` Download URL: ${imgUrl}`);
|
|
294
|
+
}
|
|
295
|
+
else if (status === "queued" || status === "inference_started" || status === "inference_working") {
|
|
296
|
+
console.log(` Check: gobi media image-status ${jobId}`);
|
|
297
|
+
}
|
|
285
298
|
});
|
|
286
299
|
media
|
|
287
300
|
.command("image-edit")
|
|
@@ -311,9 +324,13 @@ export function registerMediaCommand(program) {
|
|
|
311
324
|
jsonOut(data);
|
|
312
325
|
return;
|
|
313
326
|
}
|
|
327
|
+
const imgUrl = extractImageUrl(data);
|
|
314
328
|
console.log(`Image edit started!\n` +
|
|
315
329
|
` Job ID: ${jobId}\n` +
|
|
316
330
|
` Status: ${data.status || "queued"}`);
|
|
331
|
+
if (imgUrl) {
|
|
332
|
+
console.log(` Download URL: ${imgUrl}`);
|
|
333
|
+
}
|
|
317
334
|
});
|
|
318
335
|
media
|
|
319
336
|
.command("image-inpaint")
|
|
@@ -345,35 +362,82 @@ export function registerMediaCommand(program) {
|
|
|
345
362
|
jsonOut(data);
|
|
346
363
|
return;
|
|
347
364
|
}
|
|
365
|
+
const imgUrl = extractImageUrl(data);
|
|
348
366
|
console.log(`Inpainting started!\n` +
|
|
349
367
|
` Job ID: ${jobId}\n` +
|
|
350
368
|
` Status: ${data.status || "queued"}`);
|
|
369
|
+
if (imgUrl) {
|
|
370
|
+
console.log(` Download URL: ${imgUrl}`);
|
|
371
|
+
}
|
|
351
372
|
});
|
|
352
373
|
media
|
|
353
374
|
.command("image-status <jobId>")
|
|
354
375
|
.description("Check image generation job status.")
|
|
355
376
|
.option("--wait", "Poll until a terminal state is reached")
|
|
356
377
|
.action(async (jobId, opts) => {
|
|
378
|
+
let data;
|
|
357
379
|
if (opts.wait) {
|
|
358
|
-
|
|
380
|
+
data = await pollStatus(`/media-gen/images/${jobId}`, [
|
|
359
381
|
"completed",
|
|
360
382
|
"failed",
|
|
361
383
|
"inference_complete",
|
|
362
384
|
"inference_failed",
|
|
363
385
|
]);
|
|
364
|
-
if (isJsonMode(media)) {
|
|
365
|
-
jsonOut(data);
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
console.log(`Image job ${jobId} — status: ${data.status}`);
|
|
369
|
-
return;
|
|
370
386
|
}
|
|
371
|
-
|
|
372
|
-
|
|
387
|
+
else {
|
|
388
|
+
const resp = (await apiGet(`/media-gen/images/${jobId}`));
|
|
389
|
+
data = unwrapResp(resp);
|
|
390
|
+
}
|
|
373
391
|
if (isJsonMode(media)) {
|
|
374
392
|
jsonOut(data);
|
|
375
393
|
return;
|
|
376
394
|
}
|
|
395
|
+
const imgUrl = extractImageUrl(data);
|
|
377
396
|
console.log(`Image job ${jobId} — status: ${data.status || "unknown"}`);
|
|
397
|
+
if (imgUrl) {
|
|
398
|
+
console.log(` Download URL: ${imgUrl}`);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
media
|
|
402
|
+
.command("image-download <jobId>")
|
|
403
|
+
.description("Download a generated image.")
|
|
404
|
+
.option("--wait", "Poll until generation completes before downloading")
|
|
405
|
+
.option("--type <type>", "Image type (image, thumbnail, asset)")
|
|
406
|
+
.action(async (jobId, opts) => {
|
|
407
|
+
if (opts.wait) {
|
|
408
|
+
console.log(`Waiting for image job ${jobId} to complete…`);
|
|
409
|
+
await pollStatus(`/media-gen/images/${jobId}`, [
|
|
410
|
+
"completed",
|
|
411
|
+
"failed",
|
|
412
|
+
"inference_complete",
|
|
413
|
+
"inference_failed",
|
|
414
|
+
]);
|
|
415
|
+
}
|
|
416
|
+
const token = await getValidToken();
|
|
417
|
+
const query = opts.type ? `?type=${opts.type}` : "";
|
|
418
|
+
const url = `${BASE_URL}/media-gen/images/${jobId}/download${query}`;
|
|
419
|
+
const res = await fetch(url, {
|
|
420
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
421
|
+
});
|
|
422
|
+
if (!res.ok) {
|
|
423
|
+
const text = (await res.text()) || "(no body)";
|
|
424
|
+
throw new ApiError(res.status, `/media-gen/images/${jobId}/download`, text);
|
|
425
|
+
}
|
|
426
|
+
const contentType = res.headers.get("content-type") || "image/png";
|
|
427
|
+
const ext = contentType.includes("jpeg") || contentType.includes("jpg") ? "jpg"
|
|
428
|
+
: contentType.includes("webp") ? "webp"
|
|
429
|
+
: "png";
|
|
430
|
+
const filename = `${jobId}.${ext}`;
|
|
431
|
+
if (isJsonMode(media)) {
|
|
432
|
+
// In JSON mode, return base64-encoded image
|
|
433
|
+
const buffer = Buffer.from(await res.arrayBuffer());
|
|
434
|
+
jsonOut({ filename, contentType, size: buffer.length, base64: buffer.toString("base64") });
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
// Write to file
|
|
438
|
+
const { writeFile } = await import("fs/promises");
|
|
439
|
+
const buffer = Buffer.from(await res.arrayBuffer());
|
|
440
|
+
await writeFile(filename, buffer);
|
|
441
|
+
console.log(`Image saved to ${filename} (${buffer.length} bytes)`);
|
|
378
442
|
});
|
|
379
443
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobi-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "CLI client for the Gobi collaborative knowledge platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dev": "tsx src/index.ts",
|
|
41
41
|
"start": "node dist/index.js",
|
|
42
42
|
"test": "node --test dist/*.test.js dist/**/*.test.js",
|
|
43
|
-
"generate-skill-docs": "npm run build && npx tsx
|
|
43
|
+
"generate-skill-docs": "npm run build && npx tsx scripts/generate-skill-docs.ts",
|
|
44
44
|
"prepare": "npm run build",
|
|
45
45
|
"prepublishOnly": "npm run build"
|
|
46
46
|
},
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gobi-brain
|
|
3
|
+
description: >-
|
|
4
|
+
Gobi brain commands for knowledge management: search public brains by text
|
|
5
|
+
and semantic similarity, ask brains questions, publish/unpublish BRAIN.md,
|
|
6
|
+
and manage brain updates (list/post/edit/delete). Use when the user wants
|
|
7
|
+
to search knowledge, ask a brain, publish their brain document, or manage
|
|
8
|
+
brain updates.
|
|
9
|
+
allowed-tools: Bash(gobi:*)
|
|
10
|
+
metadata:
|
|
11
|
+
author: gobi-ai
|
|
12
|
+
version: "0.8.0"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# gobi-brain
|
|
16
|
+
|
|
17
|
+
Gobi brain commands for knowledge management (v0.8.0).
|
|
18
|
+
|
|
19
|
+
Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
|
|
20
|
+
|
|
21
|
+
## Gobi Brain — Knowledge Management
|
|
22
|
+
|
|
23
|
+
`gobi brain` commands manage your vault's brain: search across all spaces, ask brains questions, and publish/unpublish your BRAIN.md. Public brains are accessible at `https://gobispace.com/@{vaultSlug}`.
|
|
24
|
+
|
|
25
|
+
## Space Slug Override
|
|
26
|
+
|
|
27
|
+
For `gobi brain list-updates`, you can filter by space with a subcommand option:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
gobi brain list-updates --space-slug <slug>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Note: `--space-slug` is not available on other `brain` subcommands.
|
|
34
|
+
|
|
35
|
+
## Important: JSON Mode
|
|
36
|
+
|
|
37
|
+
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
gobi --json brain search --query "machine learning"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Available Commands
|
|
44
|
+
|
|
45
|
+
- `gobi brain search` — Search public brains by text and semantic similarity.
|
|
46
|
+
- `gobi brain ask` — Ask a brain a question. Creates a targeted session (1:1 conversation).
|
|
47
|
+
- `gobi brain publish` — Upload BRAIN.md to the vault root on webdrive. Triggers post-processing (brain sync, metadata update, Discord notification).
|
|
48
|
+
- `gobi brain unpublish` — Delete BRAIN.md from the vault on webdrive.
|
|
49
|
+
- `gobi brain list-updates` — List recent brain updates. Without --space-slug, lists all updates for you. With --space-slug, lists updates for that space. Use --mine to show only updates by you.
|
|
50
|
+
- `gobi brain post-update` — Post a brain update for a vault.
|
|
51
|
+
- `gobi brain edit-update` — Edit a published brain update. You must be the author.
|
|
52
|
+
- `gobi brain delete-update` — Delete a published brain update. You must be the author.
|
|
53
|
+
|
|
54
|
+
## Reference Documentation
|
|
55
|
+
|
|
56
|
+
- [gobi brain](references/brain.md)
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: gobi-
|
|
2
|
+
name: gobi-core
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
sessions, or brain updates.
|
|
4
|
+
Core Gobi CLI: authentication (login/logout/status), vault initialization
|
|
5
|
+
(gobi init), space selection (gobi space warp/list), file sync (gobi sync),
|
|
6
|
+
CLI updates (gobi update), and session management (list/get/reply to
|
|
7
|
+
conversations). Use when the user needs to set up Gobi, authenticate,
|
|
8
|
+
sync files, manage sessions, or update the CLI.
|
|
10
9
|
allowed-tools: Bash(gobi:*)
|
|
11
10
|
metadata:
|
|
12
11
|
author: gobi-ai
|
|
13
|
-
version: "
|
|
12
|
+
version: "0.8.0"
|
|
14
13
|
---
|
|
15
14
|
|
|
16
|
-
# gobi-
|
|
15
|
+
# gobi-core
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Core CLI commands for the Gobi collaborative knowledge platform (v0.8.0).
|
|
19
18
|
|
|
20
19
|
## Prerequisites
|
|
21
20
|
|
|
@@ -89,74 +88,39 @@ gobi auth status
|
|
|
89
88
|
|
|
90
89
|
**Important for agents**: Before running any `space` command, check if `.gobi/settings.yaml` exists in the current directory with both `vaultSlug` and `selectedSpaceSlug`. If the vault is missing, guide the user through `gobi init`. If only the space is missing, guide the user through `gobi space warp`. These commands require user input (interactive prompts), so the agent cannot run them silently.
|
|
91
90
|
|
|
92
|
-
## Gobi Space — Community Channel
|
|
93
|
-
|
|
94
|
-
`gobi space` is the main interface for interacting with the user's Gobi community. When the user asks about what's happening, what others are discussing, or wants to engage with their community — use `gobi space` commands. Think of it as the user's community feed and communication hub.
|
|
95
|
-
|
|
96
|
-
- When the user wants to explore or catch up on what's happening in their space, invoke `/gobi:space-explore`.
|
|
97
|
-
- When the user wants to share or post learnings from the current session, invoke `/gobi:space-share`.
|
|
98
|
-
|
|
99
|
-
## Gobi Brain — Knowledge Management
|
|
100
|
-
|
|
101
|
-
`gobi brain` commands manage your vault's brain: search across all spaces, ask brains questions, and publish/unpublish your BRAIN.md. Public brains are accessible at `https://gobispace.com/@{vaultSlug}`.
|
|
102
|
-
|
|
103
|
-
## Gobi Session — Conversations
|
|
104
|
-
|
|
105
|
-
`gobi session` commands manage your conversations: list, read, and reply to sessions.
|
|
106
|
-
|
|
107
91
|
## Important: JSON Mode
|
|
108
92
|
|
|
109
93
|
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand) to get structured JSON output:
|
|
110
94
|
|
|
111
|
-
```bash
|
|
112
|
-
gobi --json space list-threads
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
or
|
|
116
|
-
|
|
117
95
|
```bash
|
|
118
96
|
gobi --json session list
|
|
119
97
|
```
|
|
120
98
|
|
|
121
99
|
JSON responses have the shape `{ "success": true, "data": ... }` on success or `{ "success": false, "error": "..." }` on failure.
|
|
122
100
|
|
|
123
|
-
## Space Slug Override
|
|
124
|
-
|
|
125
|
-
`gobi space` commands use the space from `.gobi/settings.yaml`. Override it with a parent-level flag:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
gobi space --space-slug <slug> list-threads
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
For `gobi brain list-updates`, you can filter by space with a subcommand option:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
gobi brain list-updates --space-slug <slug>
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Note: `--space-slug` is not available on other `brain` subcommands or on `session` commands.
|
|
138
|
-
|
|
139
101
|
## Available Commands
|
|
140
102
|
|
|
141
|
-
|
|
103
|
+
- `gobi auth` — Authentication commands.
|
|
104
|
+
- `gobi auth login` — Log in to Gobi. Opens a browser URL for Google OAuth, then polls until authentication is complete.
|
|
105
|
+
- `gobi auth status` — Check whether you are currently authenticated with Gobi.
|
|
106
|
+
- `gobi auth logout` — Log out of Gobi and remove stored credentials.
|
|
107
|
+
- `gobi init` — Log in (if needed) and select or create the vault for the current directory.
|
|
108
|
+
- `gobi space list` — List spaces you are a member of.
|
|
109
|
+
- `gobi space warp` — Select the active space. Pass a slug to warp directly, or omit for interactive selection.
|
|
110
|
+
- `gobi session` — Session commands (get, list, reply).
|
|
111
|
+
- `gobi session get` — Get a session and its messages (paginated).
|
|
112
|
+
- `gobi session list` — List all sessions you are part of, sorted by most recent activity.
|
|
113
|
+
- `gobi session reply` — Send a human reply to a session you are a member of.
|
|
114
|
+
- `gobi sync` — Sync local vault files with Gobi Webdrive.
|
|
115
|
+
- `gobi update` — Update gobi-cli to the latest version.
|
|
142
116
|
|
|
143
117
|
## Reference Documentation
|
|
144
118
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
gobi --help
|
|
153
|
-
gobi auth --help
|
|
154
|
-
gobi space --help
|
|
155
|
-
gobi brain --help
|
|
156
|
-
gobi session --help
|
|
157
|
-
gobi sense --help
|
|
158
|
-
gobi sync --help
|
|
159
|
-
```
|
|
119
|
+
- [gobi auth](references/auth.md)
|
|
120
|
+
- [gobi init](references/init.md)
|
|
121
|
+
- [gobi session](references/session.md)
|
|
122
|
+
- [gobi sync](references/sync.md)
|
|
123
|
+
- [gobi update](references/update.md)
|
|
160
124
|
|
|
161
125
|
## Configuration Files
|
|
162
126
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# gobi space
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Usage: gobi space [options] [command]
|
|
5
|
+
|
|
6
|
+
Space commands (threads, replies).
|
|
7
|
+
|
|
8
|
+
Options:
|
|
9
|
+
--space-slug <slug> Space slug (overrides .gobi/settings.yaml)
|
|
10
|
+
-h, --help display help for command
|
|
11
|
+
|
|
12
|
+
Commands:
|
|
13
|
+
list List spaces you are a member of.
|
|
14
|
+
warp [spaceSlug] Select the active space. Pass a slug to warp directly, or omit for interactive selection.
|
|
15
|
+
list-topics [options] List topics in a space, ordered by most recent content linkage.
|
|
16
|
+
list-topic-threads [options] <topicSlug> List threads tagged with a topic in a space (cursor-paginated).
|
|
17
|
+
get-thread [options] <threadId> Get a thread and its replies (paginated).
|
|
18
|
+
list-threads [options] List threads in a space (paginated).
|
|
19
|
+
create-thread [options] Create a thread in a space.
|
|
20
|
+
edit-thread [options] <threadId> Edit a thread. You must be the author.
|
|
21
|
+
delete-thread <threadId> Delete a thread. You must be the author.
|
|
22
|
+
create-reply [options] <threadId> Create a reply to a thread in a space.
|
|
23
|
+
edit-reply [options] <replyId> Edit a reply. You must be the author.
|
|
24
|
+
delete-reply <replyId> Delete a reply. You must be the author.
|
|
25
|
+
help [command] display help for command
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## list
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Usage: gobi space list [options]
|
|
32
|
+
|
|
33
|
+
List spaces you are a member of.
|
|
34
|
+
|
|
35
|
+
Options:
|
|
36
|
+
-h, --help display help for command
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## warp
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Usage: gobi space warp [options] [spaceSlug]
|
|
43
|
+
|
|
44
|
+
Select the active space. Pass a slug to warp directly, or omit for interactive selection.
|
|
45
|
+
|
|
46
|
+
Options:
|
|
47
|
+
-h, --help display help for command
|
|
48
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gobi-media
|
|
3
|
+
description: >-
|
|
4
|
+
Gobi media generation: generate images from text prompts (thumbnails,
|
|
5
|
+
assets, logos), edit and inpaint images, create avatar videos with voice
|
|
6
|
+
narration, list available avatars and voices, upload media files. Use when
|
|
7
|
+
the user wants to generate images, create videos, or manage media.
|
|
8
|
+
allowed-tools: Bash(gobi:*)
|
|
9
|
+
metadata:
|
|
10
|
+
author: gobi-ai
|
|
11
|
+
version: "0.8.0"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# gobi-media
|
|
15
|
+
|
|
16
|
+
Gobi media generation commands (v0.8.0).
|
|
17
|
+
|
|
18
|
+
Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
|
|
19
|
+
|
|
20
|
+
## Important: JSON Mode
|
|
21
|
+
|
|
22
|
+
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
gobi --json media image-generate --prompt "a sunset over mountains"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Available Commands
|
|
29
|
+
|
|
30
|
+
### Upload
|
|
31
|
+
|
|
32
|
+
- `gobi media upload-init` — Get a presigned upload URL for a media file.
|
|
33
|
+
- `gobi media upload-finalize` — Confirm that a media upload is complete.
|
|
34
|
+
|
|
35
|
+
### Avatars & Voices
|
|
36
|
+
|
|
37
|
+
- `gobi media avatars` — List available avatars.
|
|
38
|
+
- `gobi media voices` — List available voices.
|
|
39
|
+
|
|
40
|
+
### Videos
|
|
41
|
+
|
|
42
|
+
- `gobi media video-create` — Create an avatar video generation job.
|
|
43
|
+
- `gobi media video-list` — List all videos.
|
|
44
|
+
- `gobi media video-get` — Get video metadata.
|
|
45
|
+
- `gobi media video-status` — Poll video generation status.
|
|
46
|
+
- `gobi media video-download` — Get the download URL for a completed video.
|
|
47
|
+
|
|
48
|
+
### Images
|
|
49
|
+
|
|
50
|
+
- `gobi media image-generate` — Generate an image from a text prompt. Types: image (default), thumbnail (YouTube-optimized), asset (logo/product). Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:4
|
|
51
|
+
- `gobi media image-edit` — Edit an existing image with a prompt (image-to-image).
|
|
52
|
+
- `gobi media image-inpaint` — Inpaint an image region using a mask.
|
|
53
|
+
- `gobi media image-status` — Check image generation job status.
|
|
54
|
+
|
|
55
|
+
## Reference Documentation
|
|
56
|
+
|
|
57
|
+
- [gobi media](references/media.md)
|
|
@@ -25,23 +25,6 @@ Commands:
|
|
|
25
25
|
help [command] display help for command
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
## Async Workflow
|
|
29
|
-
|
|
30
|
-
Video and image generation are async:
|
|
31
|
-
1. Call the create/generate endpoint — receive a job ID
|
|
32
|
-
2. Poll with `--wait` or manually check status until terminal state
|
|
33
|
-
3. Retrieve or download the result
|
|
34
|
-
|
|
35
|
-
## Media Upload
|
|
36
|
-
|
|
37
|
-
Upload media files (images, videos) for use as backgrounds, references, or masks:
|
|
38
|
-
|
|
39
|
-
1. `gobi media upload-init` — get a presigned S3 upload URL
|
|
40
|
-
2. PUT your file to the returned `uploadUrl`
|
|
41
|
-
3. `gobi media upload-finalize` — confirm the upload
|
|
42
|
-
|
|
43
|
-
The returned `mediaId` can then be used with `--background-media-id`, `--reference-media-id`, `--media-id`, or `--mask-media-id`.
|
|
44
|
-
|
|
45
28
|
## upload-init
|
|
46
29
|
|
|
47
30
|
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gobi-sense
|
|
3
|
+
description: >-
|
|
4
|
+
Gobi sense commands for activity and transcription data: fetch activity
|
|
5
|
+
records and transcription records within a time range. Use when the user
|
|
6
|
+
wants to review their activities or transcriptions from Gobi Sense.
|
|
7
|
+
allowed-tools: Bash(gobi:*)
|
|
8
|
+
metadata:
|
|
9
|
+
author: gobi-ai
|
|
10
|
+
version: "0.8.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# gobi-sense
|
|
14
|
+
|
|
15
|
+
Gobi sense commands for activity and transcription data (v0.8.0).
|
|
16
|
+
|
|
17
|
+
Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
|
|
18
|
+
|
|
19
|
+
## Important: JSON Mode
|
|
20
|
+
|
|
21
|
+
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
gobi --json sense activities --from 2024-01-01 --to 2024-01-31
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Available Commands
|
|
28
|
+
|
|
29
|
+
- `gobi sense activities` — Fetch activity records within a time range.
|
|
30
|
+
- `gobi sense transcriptions` — Fetch transcription records within a time range.
|
|
31
|
+
|
|
32
|
+
## Reference Documentation
|
|
33
|
+
|
|
34
|
+
- [gobi sense](references/sense.md)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gobi-space
|
|
3
|
+
description: >-
|
|
4
|
+
Gobi space commands for community interaction: list/create/edit/delete
|
|
5
|
+
threads and replies, browse topics and topic threads, explore what's
|
|
6
|
+
happening in a space. Use when the user wants to read, write, or manage
|
|
7
|
+
threads and replies in their Gobi community spaces.
|
|
8
|
+
allowed-tools: Bash(gobi:*)
|
|
9
|
+
metadata:
|
|
10
|
+
author: gobi-ai
|
|
11
|
+
version: "0.8.0"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# gobi-space
|
|
15
|
+
|
|
16
|
+
Gobi space commands for community interaction (v0.8.0).
|
|
17
|
+
|
|
18
|
+
Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
|
|
19
|
+
|
|
20
|
+
## Gobi Space — Community Channel
|
|
21
|
+
|
|
22
|
+
`gobi space` is the main interface for interacting with the user's Gobi community. When the user asks about what's happening, what others are discussing, or wants to engage with their community — use `gobi space` commands. Think of it as the user's community feed and communication hub.
|
|
23
|
+
|
|
24
|
+
- When the user wants to explore or catch up on what's happening in their space, invoke `/gobi:space-explore`.
|
|
25
|
+
- When the user wants to share or post learnings from the current session, invoke `/gobi:space-share`.
|
|
26
|
+
|
|
27
|
+
## Space Slug Override
|
|
28
|
+
|
|
29
|
+
`gobi space` commands use the space from `.gobi/settings.yaml`. Override it with a parent-level flag:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
gobi space --space-slug <slug> list-threads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Important: JSON Mode
|
|
36
|
+
|
|
37
|
+
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
gobi --json space list-threads
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Available Commands
|
|
44
|
+
|
|
45
|
+
- `gobi space list-topics` — List topics in a space, ordered by most recent content linkage.
|
|
46
|
+
- `gobi space list-topic-threads` — List threads tagged with a topic in a space (cursor-paginated).
|
|
47
|
+
- `gobi space get-thread` — Get a thread and its replies (paginated).
|
|
48
|
+
- `gobi space list-threads` — List threads in a space (paginated).
|
|
49
|
+
- `gobi space create-thread` — Create a thread in a space.
|
|
50
|
+
- `gobi space edit-thread` — Edit a thread. You must be the author.
|
|
51
|
+
- `gobi space delete-thread` — Delete a thread. You must be the author.
|
|
52
|
+
- `gobi space create-reply` — Create a reply to a thread in a space.
|
|
53
|
+
- `gobi space edit-reply` — Edit a reply. You must be the author.
|
|
54
|
+
- `gobi space delete-reply` — Delete a reply. You must be the author.
|
|
55
|
+
|
|
56
|
+
## Reference Documentation
|
|
57
|
+
|
|
58
|
+
- [gobi space](references/space.md)
|
|
@@ -25,28 +25,6 @@ Commands:
|
|
|
25
25
|
help [command] display help for command
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
## list
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
Usage: gobi space list [options]
|
|
32
|
-
|
|
33
|
-
List spaces you are a member of.
|
|
34
|
-
|
|
35
|
-
Options:
|
|
36
|
-
-h, --help display help for command
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## warp
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
Usage: gobi space warp [options] [spaceSlug]
|
|
43
|
-
|
|
44
|
-
Select the active space. Pass a slug to warp directly, or omit for interactive selection.
|
|
45
|
-
|
|
46
|
-
Options:
|
|
47
|
-
-h, --help display help for command
|
|
48
|
-
```
|
|
49
|
-
|
|
50
28
|
## list-topics
|
|
51
29
|
|
|
52
30
|
```
|
package/skills/gobi-cli/SKILL.md
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gobi-cli
|
|
3
|
-
description: >-
|
|
4
|
-
Manage the Gobi collaborative knowledge platform from the command line.
|
|
5
|
-
Gobi space is the user's main channel for social interactions and engaging with
|
|
6
|
-
the outside world — checking what's happening, reading and writing threads,
|
|
7
|
-
and collaborating with others.
|
|
8
|
-
Use when the user wants to interact with Gobi spaces, vaults, brains, threads,
|
|
9
|
-
sessions, brain updates, or media generation (images, videos, thumbnails).
|
|
10
|
-
allowed-tools: Bash(gobi:*)
|
|
11
|
-
metadata:
|
|
12
|
-
author: gobi-ai
|
|
13
|
-
version: "0.7.3"
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# gobi-cli
|
|
17
|
-
|
|
18
|
-
A CLI client for the Gobi collaborative knowledge platform (v0.7.3).
|
|
19
|
-
|
|
20
|
-
## Prerequisites
|
|
21
|
-
|
|
22
|
-
Verify the CLI is installed:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
gobi --version
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
If not installed:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install -g @gobi-ai/cli
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Or via Homebrew:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
brew tap gobi-ai/tap && brew install gobi
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Key Concepts
|
|
41
|
-
|
|
42
|
-
- **Space**: A shared space for a group or community. A logged-in user can be a member of one or more spaces. A space contains threads, sessions, brain updates, and connected vaults.
|
|
43
|
-
- **Vault**: A filetree storage of information and knowledge. A local directory becomes a vault when it contains `.gobi/settings.yaml` with a vault slug and a space slug. Each vault is identified by a slug (e.g. `brave-path-zr962w`).
|
|
44
|
-
- **Brain**: Another name for a vault when referring to its AI-searchable knowledge. You can search brains, ask them questions, and publish a `BRAIN.md` document to configure your vault's brain.
|
|
45
|
-
|
|
46
|
-
## First-Time Setup
|
|
47
|
-
|
|
48
|
-
The CLI requires three setup steps: authentication, vault initialization, and space selection.
|
|
49
|
-
|
|
50
|
-
### Step 1: Initialize (Login + Vault)
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
gobi init
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This is an **interactive** command that:
|
|
57
|
-
1. Logs in automatically if not already authenticated (opens a browser URL for Google OAuth)
|
|
58
|
-
2. Prompts the user to select an existing vault or create a new one
|
|
59
|
-
3. Writes `.gobi/settings.yaml` in the current directory with the chosen vault slug
|
|
60
|
-
4. Creates a `BRAIN.md` file if one doesn't exist
|
|
61
|
-
|
|
62
|
-
### Step 2: Select a Space
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
gobi space warp
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
This is an **interactive** command that prompts the user to select a space from their available spaces, then saves it to `.gobi/settings.yaml`.
|
|
69
|
-
|
|
70
|
-
After both steps, `.gobi/settings.yaml` will contain:
|
|
71
|
-
```yaml
|
|
72
|
-
vaultSlug: brave-path-zr962w
|
|
73
|
-
selectedSpaceSlug: cmds
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Standalone Login
|
|
77
|
-
|
|
78
|
-
If the user only needs to log in (without vault setup):
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
gobi auth login
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Check auth status anytime:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
gobi auth status
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Important for agents**: Before running any `space` command, check if `.gobi/settings.yaml` exists in the current directory with both `vaultSlug` and `selectedSpaceSlug`. If the vault is missing, guide the user through `gobi init`. If only the space is missing, guide the user through `gobi space warp`. These commands require user input (interactive prompts), so the agent cannot run them silently.
|
|
91
|
-
|
|
92
|
-
## Gobi Space — Community Channel
|
|
93
|
-
|
|
94
|
-
`gobi space` is the main interface for interacting with the user's Gobi community. When the user asks about what's happening, what others are discussing, or wants to engage with their community — use `gobi space` commands. Think of it as the user's community feed and communication hub.
|
|
95
|
-
|
|
96
|
-
- When the user wants to explore or catch up on what's happening in their space, invoke `/gobi:space-explore`.
|
|
97
|
-
- When the user wants to share or post learnings from the current session, invoke `/gobi:space-share`.
|
|
98
|
-
|
|
99
|
-
## Gobi Brain — Knowledge Management
|
|
100
|
-
|
|
101
|
-
`gobi brain` commands manage your vault's brain: search across all spaces, ask brains questions, and publish/unpublish your BRAIN.md. Public brains are accessible at `https://gobispace.com/@{vaultSlug}`.
|
|
102
|
-
|
|
103
|
-
## Gobi Media — Image & Video Generation
|
|
104
|
-
|
|
105
|
-
`gobi media` commands generate images, thumbnails, assets, and avatar videos using AI. All generation is async: create a job, poll for status (or use `--wait`), then retrieve the result.
|
|
106
|
-
|
|
107
|
-
- **Images**: Generate from text prompts, edit existing images, or inpaint with masks. Supports types: `image` (default), `thumbnail` (YouTube-optimized), `asset` (logo/product).
|
|
108
|
-
- **Videos**: Create avatar videos with script narration. Choose an avatar and voice, provide a script, and generate a talking-head video.
|
|
109
|
-
- **Upload**: Upload custom media files (backgrounds, references, masks) via presigned S3 URLs for use in generation.
|
|
110
|
-
|
|
111
|
-
## Gobi Session — Conversations
|
|
112
|
-
|
|
113
|
-
`gobi session` commands manage your conversations: list, read, and reply to sessions.
|
|
114
|
-
|
|
115
|
-
## Important: JSON Mode
|
|
116
|
-
|
|
117
|
-
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand) to get structured JSON output:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
gobi --json space list-threads
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
or
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
gobi --json session list
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
JSON responses have the shape `{ "success": true, "data": ... }` on success or `{ "success": false, "error": "..." }` on failure.
|
|
130
|
-
|
|
131
|
-
## Space Slug Override
|
|
132
|
-
|
|
133
|
-
`gobi space` commands use the space from `.gobi/settings.yaml`. Override it with a parent-level flag:
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
gobi space --space-slug <slug> list-threads
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
For `gobi brain list-updates`, you can filter by space with a subcommand option:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
gobi brain list-updates --space-slug <slug>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Note: `--space-slug` is not available on other `brain` subcommands or on `session` commands.
|
|
146
|
-
|
|
147
|
-
## Available Commands
|
|
148
|
-
|
|
149
|
-
- `gobi auth` — Authentication commands.
|
|
150
|
-
- `gobi auth login` — Log in to Gobi. Opens a browser URL for Google OAuth, then polls until authentication is complete.
|
|
151
|
-
- `gobi auth status` — Check whether you are currently authenticated with Gobi.
|
|
152
|
-
- `gobi auth logout` — Log out of Gobi and remove stored credentials.
|
|
153
|
-
- `gobi init` — Log in (if needed) and select or create the vault for the current directory.
|
|
154
|
-
- `gobi space` — Space commands (threads, replies).
|
|
155
|
-
- `gobi space list` — List spaces you are a member of.
|
|
156
|
-
- `gobi space warp` — Select the active space. Pass a slug to warp directly, or omit for interactive selection.
|
|
157
|
-
- `gobi space list-topics` — List topics in a space, ordered by most recent content linkage.
|
|
158
|
-
- `gobi space list-topic-threads` — List threads tagged with a topic in a space (cursor-paginated).
|
|
159
|
-
- `gobi space get-thread` — Get a thread and its replies (paginated).
|
|
160
|
-
- `gobi space list-threads` — List threads in a space (paginated).
|
|
161
|
-
- `gobi space create-thread` — Create a thread in a space.
|
|
162
|
-
- `gobi space edit-thread` — Edit a thread. You must be the author.
|
|
163
|
-
- `gobi space delete-thread` — Delete a thread. You must be the author.
|
|
164
|
-
- `gobi space create-reply` — Create a reply to a thread in a space.
|
|
165
|
-
- `gobi space edit-reply` — Edit a reply. You must be the author.
|
|
166
|
-
- `gobi space delete-reply` — Delete a reply. You must be the author.
|
|
167
|
-
- `gobi brain` — Brain commands (search, ask, publish, unpublish, updates).
|
|
168
|
-
- `gobi brain search` — Search public brains by text and semantic similarity.
|
|
169
|
-
- `gobi brain ask` — Ask a brain a question. Creates a targeted session (1:1 conversation).
|
|
170
|
-
- `gobi brain publish` — Upload BRAIN.md to the vault root on webdrive. Triggers post-processing (brain sync, metadata update, Discord notification).
|
|
171
|
-
- `gobi brain unpublish` — Delete BRAIN.md from the vault on webdrive.
|
|
172
|
-
- `gobi brain list-updates` — List recent brain updates. Without --space-slug, lists all updates for you. With --space-slug, lists updates for that space. Use --mine to show only updates by you.
|
|
173
|
-
- `gobi brain post-update` — Post a brain update for a vault.
|
|
174
|
-
- `gobi brain edit-update` — Edit a published brain update. You must be the author.
|
|
175
|
-
- `gobi brain delete-update` — Delete a published brain update. You must be the author.
|
|
176
|
-
- `gobi session` — Session commands (get, list, reply).
|
|
177
|
-
- `gobi session get` — Get a session and its messages (paginated).
|
|
178
|
-
- `gobi session list` — List all sessions you are part of, sorted by most recent activity.
|
|
179
|
-
- `gobi session reply` — Send a human reply to a session you are a member of.
|
|
180
|
-
- `gobi media` — Media generation commands (images, videos).
|
|
181
|
-
- `gobi media upload-init` — Get a presigned upload URL for a media file. Requires `--file-name`, `--content-type`, `--file-size`.
|
|
182
|
-
- `gobi media upload-finalize` — Confirm that a media upload is complete.
|
|
183
|
-
- `gobi media avatars` — List available avatars.
|
|
184
|
-
- `gobi media voices` — List available voices.
|
|
185
|
-
- `gobi media video-create` — Create an avatar video generation job. Requires `--name`, `--avatar-id`, `--voice-id`, `--script`.
|
|
186
|
-
- `gobi media video-list` — List all videos.
|
|
187
|
-
- `gobi media video-get <id>` — Get video metadata.
|
|
188
|
-
- `gobi media video-status <id>` — Poll video generation status. Use `--wait` to block until complete.
|
|
189
|
-
- `gobi media video-download <id>` — Get the download URL for a completed video.
|
|
190
|
-
- `gobi media image-generate` — Generate an image from a text prompt. Requires `--prompt`, `--name`. Optional: `--type` (image|thumbnail|asset), `--aspect-ratio`, `--negative-prompt`, `--seed`, `--reference-media-id`. Use `--wait` to block until complete.
|
|
191
|
-
- `gobi media image-edit` — Edit an existing image with a prompt. Requires `--media-id`, `--prompt`, `--name`.
|
|
192
|
-
- `gobi media image-inpaint` — Inpaint an image region using a mask. Requires `--media-id`, `--mask-media-id`, `--prompt`, `--name`.
|
|
193
|
-
- `gobi media image-status <jobId>` — Check image generation job status. Use `--wait` to block until complete.
|
|
194
|
-
- `gobi sense` — Sense commands (activities, transcriptions).
|
|
195
|
-
- `gobi sense activities` — Fetch activity records within a time range.
|
|
196
|
-
- `gobi sense transcriptions` — Fetch transcription records within a time range.
|
|
197
|
-
- `gobi sync` — Sync local vault files with Gobi Webdrive.
|
|
198
|
-
- `gobi update` — Update gobi-cli to the latest version.
|
|
199
|
-
|
|
200
|
-
## Reference Documentation
|
|
201
|
-
|
|
202
|
-
- [gobi auth](references/auth.md)
|
|
203
|
-
- [gobi init](references/init.md)
|
|
204
|
-
- [gobi space](references/space.md)
|
|
205
|
-
- [gobi brain](references/brain.md)
|
|
206
|
-
- [gobi session](references/session.md)
|
|
207
|
-
- [gobi media](references/media.md)
|
|
208
|
-
- [gobi sense](references/sense.md)
|
|
209
|
-
- [gobi sync](references/sync.md)
|
|
210
|
-
- [gobi update](references/update.md)
|
|
211
|
-
|
|
212
|
-
## Discovering Options
|
|
213
|
-
|
|
214
|
-
Run `--help` on any command for details:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
gobi --help
|
|
218
|
-
gobi auth --help
|
|
219
|
-
gobi space --help
|
|
220
|
-
gobi brain --help
|
|
221
|
-
gobi session --help
|
|
222
|
-
gobi media --help
|
|
223
|
-
gobi sense --help
|
|
224
|
-
gobi sync --help
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Configuration Files
|
|
228
|
-
|
|
229
|
-
| Path | Description |
|
|
230
|
-
|------|-------------|
|
|
231
|
-
| `~/.gobi/credentials.json` | Stored authentication tokens (auto-managed) |
|
|
232
|
-
| `.gobi/settings.yaml` | Per-project vault and space configuration |
|
|
233
|
-
| `BRAIN.md` | Brain document with YAML frontmatter, published via `gobi brain publish` |
|
|
234
|
-
|
|
235
|
-
## Environment Variables
|
|
236
|
-
|
|
237
|
-
| Variable | Default | Description |
|
|
238
|
-
|----------|---------|-------------|
|
|
239
|
-
| `GOBI_BASE_URL` | `https://api.joingobi.com` | API server URL |
|
|
240
|
-
| `GOBI_WEBDRIVE_BASE_URL` | `https://webdrive.joingobi.com` | File storage URL |
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { execSync } from "node:child_process";
|
|
2
|
-
import {
|
|
3
|
-
readFileSync,
|
|
4
|
-
writeFileSync,
|
|
5
|
-
mkdirSync,
|
|
6
|
-
existsSync,
|
|
7
|
-
readdirSync,
|
|
8
|
-
unlinkSync,
|
|
9
|
-
} from "node:fs";
|
|
10
|
-
import { join, dirname } from "node:path";
|
|
11
|
-
import { fileURLToPath } from "node:url";
|
|
12
|
-
import { createRequire } from "node:module";
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = dirname(__filename);
|
|
16
|
-
const SKILL_DIR = join(__dirname, "..");
|
|
17
|
-
const REFERENCES_DIR = join(SKILL_DIR, "references");
|
|
18
|
-
const TEMPLATE_PATH = join(SKILL_DIR, "SKILL.template.md");
|
|
19
|
-
const OUTPUT_PATH = join(SKILL_DIR, "SKILL.md");
|
|
20
|
-
const PROJECT_ROOT = join(SKILL_DIR, "..", "..");
|
|
21
|
-
// Read version from package.json
|
|
22
|
-
const require = createRequire(import.meta.url);
|
|
23
|
-
const { version } = require(join(PROJECT_ROOT, "package.json")) as {
|
|
24
|
-
version: string;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// Use the built dist/index.js so this works in CI without global install
|
|
28
|
-
const GOBI_BIN = join(PROJECT_ROOT, "dist", "index.js");
|
|
29
|
-
|
|
30
|
-
if (!existsSync(GOBI_BIN)) {
|
|
31
|
-
console.error(
|
|
32
|
-
"Error: dist/index.js not found. Run 'npm run build' first."
|
|
33
|
-
);
|
|
34
|
-
process.exit(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// ---------------------------------------------------------------------------
|
|
38
|
-
// Helpers
|
|
39
|
-
// ---------------------------------------------------------------------------
|
|
40
|
-
|
|
41
|
-
function runHelp(args: string[]): string {
|
|
42
|
-
const cmd = `node ${GOBI_BIN} ${args.join(" ")} --help`;
|
|
43
|
-
return execSync(cmd, {
|
|
44
|
-
encoding: "utf-8",
|
|
45
|
-
env: { ...process.env, NO_COLOR: "1" },
|
|
46
|
-
timeout: 10_000,
|
|
47
|
-
}).trim();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface CommandInfo {
|
|
51
|
-
name: string;
|
|
52
|
-
description: string;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Parse Commander.js help output to extract the Commands section.
|
|
57
|
-
* Commander format:
|
|
58
|
-
* Commands:
|
|
59
|
-
* name [options] description
|
|
60
|
-
* help [command] display help for command
|
|
61
|
-
*/
|
|
62
|
-
function parseCommands(helpText: string): CommandInfo[] {
|
|
63
|
-
const commands: CommandInfo[] = [];
|
|
64
|
-
const lines = helpText.split("\n");
|
|
65
|
-
let inCommands = false;
|
|
66
|
-
|
|
67
|
-
for (const line of lines) {
|
|
68
|
-
if (line.trim() === "Commands:") {
|
|
69
|
-
inCommands = true;
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
if (inCommands) {
|
|
73
|
-
// Match: leading whitespace, command name, possible args, 2+ spaces, description
|
|
74
|
-
const match = line.match(/^\s{2,}(\S+)\s+.*?\s{2,}(.+)$/);
|
|
75
|
-
if (match) {
|
|
76
|
-
const [, name, desc] = match;
|
|
77
|
-
if (name !== "help") {
|
|
78
|
-
commands.push({ name, description: desc.trim() });
|
|
79
|
-
}
|
|
80
|
-
} else if (line.trim() === "") {
|
|
81
|
-
break;
|
|
82
|
-
} else if (commands.length > 0 && line.match(/^\s{10,}\S/)) {
|
|
83
|
-
// Continuation line of the previous command's wrapped description
|
|
84
|
-
commands[commands.length - 1].description += " " + line.trim();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return commands;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// ---------------------------------------------------------------------------
|
|
93
|
-
// Generate reference docs
|
|
94
|
-
// ---------------------------------------------------------------------------
|
|
95
|
-
|
|
96
|
-
function generateReferenceDoc(
|
|
97
|
-
commandPath: string[],
|
|
98
|
-
helpText: string,
|
|
99
|
-
subcommands: { name: string; helpText: string }[]
|
|
100
|
-
): string {
|
|
101
|
-
const lines: string[] = [];
|
|
102
|
-
const fullCommand = ["gobi", ...commandPath].join(" ");
|
|
103
|
-
|
|
104
|
-
lines.push(`# ${fullCommand}`);
|
|
105
|
-
lines.push("");
|
|
106
|
-
lines.push("```");
|
|
107
|
-
lines.push(helpText);
|
|
108
|
-
lines.push("```");
|
|
109
|
-
|
|
110
|
-
for (const sub of subcommands) {
|
|
111
|
-
lines.push("");
|
|
112
|
-
lines.push(`## ${sub.name}`);
|
|
113
|
-
lines.push("");
|
|
114
|
-
lines.push("```");
|
|
115
|
-
lines.push(sub.helpText);
|
|
116
|
-
lines.push("```");
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return lines.join("\n") + "\n";
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// ---------------------------------------------------------------------------
|
|
123
|
-
// Main
|
|
124
|
-
// ---------------------------------------------------------------------------
|
|
125
|
-
|
|
126
|
-
// Ensure references directory exists
|
|
127
|
-
if (!existsSync(REFERENCES_DIR)) {
|
|
128
|
-
mkdirSync(REFERENCES_DIR, { recursive: true });
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Clean existing generated reference files
|
|
132
|
-
for (const file of readdirSync(REFERENCES_DIR)) {
|
|
133
|
-
if (file.endsWith(".md")) {
|
|
134
|
-
unlinkSync(join(REFERENCES_DIR, file));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// 1. Get top-level commands
|
|
139
|
-
const topHelp = runHelp([]);
|
|
140
|
-
const topCommands = parseCommands(topHelp);
|
|
141
|
-
|
|
142
|
-
// 2. Generate reference files for each command group
|
|
143
|
-
const referenceFiles: { name: string; path: string; title: string }[] = [];
|
|
144
|
-
const commandLines: string[] = [];
|
|
145
|
-
|
|
146
|
-
for (const cmd of topCommands) {
|
|
147
|
-
let cmdHelp: string;
|
|
148
|
-
try {
|
|
149
|
-
cmdHelp = runHelp([cmd.name]);
|
|
150
|
-
} catch {
|
|
151
|
-
// Leaf command with no subcommands — use top-level help
|
|
152
|
-
cmdHelp = `${cmd.description}`;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const subCommands = parseCommands(cmdHelp);
|
|
156
|
-
|
|
157
|
-
// Build command listing
|
|
158
|
-
commandLines.push(`- \`gobi ${cmd.name}\` — ${cmd.description}`);
|
|
159
|
-
|
|
160
|
-
const subHelpTexts: { name: string; helpText: string }[] = [];
|
|
161
|
-
for (const sub of subCommands) {
|
|
162
|
-
try {
|
|
163
|
-
const subHelp = runHelp([cmd.name, sub.name]);
|
|
164
|
-
subHelpTexts.push({ name: sub.name, helpText: subHelp });
|
|
165
|
-
commandLines.push(
|
|
166
|
-
` - \`gobi ${cmd.name} ${sub.name}\` — ${sub.description}`
|
|
167
|
-
);
|
|
168
|
-
} catch {
|
|
169
|
-
// Skip commands that fail (e.g. interactive-only)
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const refContent = generateReferenceDoc([cmd.name], cmdHelp, subHelpTexts);
|
|
174
|
-
const refFile = `${cmd.name}.md`;
|
|
175
|
-
writeFileSync(join(REFERENCES_DIR, refFile), refContent);
|
|
176
|
-
referenceFiles.push({
|
|
177
|
-
name: refFile,
|
|
178
|
-
path: `references/${refFile}`,
|
|
179
|
-
title: `gobi ${cmd.name}`,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// 3. Build placeholders
|
|
184
|
-
const COMMANDS = commandLines.join("\n");
|
|
185
|
-
const REFERENCE_TOC = referenceFiles
|
|
186
|
-
.map((ref) => `- [${ref.title}](${ref.path})`)
|
|
187
|
-
.join("\n");
|
|
188
|
-
|
|
189
|
-
// 4. Read template and fill placeholders
|
|
190
|
-
let template = readFileSync(TEMPLATE_PATH, "utf-8");
|
|
191
|
-
template = template.replace(/\{\{VERSION\}\}/g, version);
|
|
192
|
-
template = template.replace("{{COMMANDS}}", COMMANDS);
|
|
193
|
-
template = template.replace("{{REFERENCE_TOC}}", REFERENCE_TOC);
|
|
194
|
-
|
|
195
|
-
// 5. Write generated SKILL.md
|
|
196
|
-
writeFileSync(OUTPUT_PATH, template);
|
|
197
|
-
|
|
198
|
-
console.log(`Generated SKILL.md (v${version})`);
|
|
199
|
-
console.log(`Generated ${referenceFiles.length} reference files`);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|