@gobi-ai/cli 0.6.19 → 0.7.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/commands/login.md +17 -0
- package/commands/logout.md +11 -0
- package/commands/space-explore.md +20 -0
- package/commands/space-share.md +45 -0
- package/commands/warp.md +17 -0
- package/dist/commands/space.js +64 -0
- package/package.json +3 -2
- package/skills/gobi/SKILL.md +4 -2
- package/skills/gobi/references/space.md +40 -13
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"name": "gobi-ai"
|
|
5
5
|
},
|
|
6
6
|
"description": "Claude Code plugin for the Gobi collaborative knowledge platform CLI",
|
|
7
|
-
"version": "0.6.
|
|
7
|
+
"version": "0.6.20",
|
|
8
8
|
"plugins": [
|
|
9
9
|
{
|
|
10
10
|
"name": "gobi",
|
|
11
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.6.
|
|
12
|
+
"version": "0.6.20",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "gobi-ai"
|
|
15
15
|
},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: login
|
|
3
|
+
description: Log in to Gobi via Google OAuth
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Always use the globally installed `gobi` binary (not via npx or ts-node).
|
|
8
|
+
|
|
9
|
+
Log the user in to Gobi using device code flow:
|
|
10
|
+
|
|
11
|
+
1. Run `gobi auth login` as a **background task** (use run_in_background).
|
|
12
|
+
2. Poll the task output every 2 seconds until the login URL appears in stdout.
|
|
13
|
+
3. Extract the URL and display it to the user as a clickable markdown link: `[Click here to log in to Gobi](<url>)`. Also show the user code separately.
|
|
14
|
+
4. Tell the user to open the link in their browser and approve the login.
|
|
15
|
+
5. Continue polling the background task until it exits (success or failure).
|
|
16
|
+
6. On success, confirm the user is now logged in.
|
|
17
|
+
7. On failure, show the error and suggest retrying.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: logout
|
|
3
|
+
description: Log out of Gobi and remove stored credentials
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Always use the globally installed `gobi` binary (not via npx or ts-node).
|
|
8
|
+
|
|
9
|
+
Run `gobi auth logout` to log out of Gobi.
|
|
10
|
+
|
|
11
|
+
Confirm to the user that they have been logged out.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: space-explore
|
|
3
|
+
description: Explore what's happening in the active Gobi space — threads and learnings shared by others.
|
|
4
|
+
argument-hint: "[topic or keyword]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Always use the globally installed `gobi` binary (not via npx or ts-node).
|
|
8
|
+
|
|
9
|
+
Explore the active Gobi space to surface discussions, topics, and learnings from others:
|
|
10
|
+
|
|
11
|
+
1. Run these three commands in parallel:
|
|
12
|
+
- `gobi --json space list-threads` — recent discussions in the space
|
|
13
|
+
- `gobi --json space list-topics` — available topics across the platform
|
|
14
|
+
- `gobi --json brain list-updates` — learnings and brain updates shared by members
|
|
15
|
+
2. Display results in a readable summary, grouped by type (Topics / Discussions / Learnings).
|
|
16
|
+
3. If `$ARGUMENTS` is provided, filter or highlight entries relevant to that topic or keyword. If a matching topic is found, also run `gobi --json space list-topic-threads <topicSlug>` to show threads tagged with that topic.
|
|
17
|
+
4. Ask the user if they'd like to read anything in full:
|
|
18
|
+
- For a topic: run `gobi space list-topic-threads <topicSlug>` and show the threads.
|
|
19
|
+
- For a thread: run `gobi space get-thread <threadId>` and show it with replies.
|
|
20
|
+
- For a brain update: show the full content from the list output.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: space-share
|
|
3
|
+
description: Summarize recent learnings from this session and draft a brain update to share to the active Gobi space.
|
|
4
|
+
argument-hint: "[context]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Always use the globally installed `gobi` binary (not via npx or ts-node).
|
|
8
|
+
|
|
9
|
+
## Pre-flight check
|
|
10
|
+
|
|
11
|
+
First, verify the user is warped into a space:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gobi --json auth status
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Check that `.gobi/settings.yaml` exists and contains both `vaultSlug` and `selectedSpaceSlug`. If not warped, stop and ask the user to run `/gobi:warp` first.
|
|
18
|
+
|
|
19
|
+
## Draft a brain update
|
|
20
|
+
|
|
21
|
+
If `$ARGUMENTS` is provided, treat it as additional context or emphasis to guide the draft (e.g. "Emphasize the auth fix" or "Focus on the API design decision").
|
|
22
|
+
|
|
23
|
+
Review the conversation history and extract learnings that meet ALL of these criteria:
|
|
24
|
+
- **Reusable**: Other AI agents or developers could apply this knowledge to do better work
|
|
25
|
+
- **Generalizable**: Not specific to a one-off task — patterns, decisions, constraints, or discoveries
|
|
26
|
+
- **Not sensitive**: Exclude code snippets, file paths, PII, personal information, credentials, internal URLs, and proprietary implementation details
|
|
27
|
+
|
|
28
|
+
Focus on:
|
|
29
|
+
- Architectural decisions and the reasoning behind them
|
|
30
|
+
- Workflow patterns that worked well
|
|
31
|
+
- Constraints or gotchas discovered
|
|
32
|
+
- Tool or API behaviors worth knowing
|
|
33
|
+
- Process improvements
|
|
34
|
+
|
|
35
|
+
## Present to the user
|
|
36
|
+
|
|
37
|
+
Format the draft as a short brain update (2–5 bullet points max). Show it to the user and ask for confirmation before posting.
|
|
38
|
+
|
|
39
|
+
Once confirmed, post it:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
gobi brain post-update --title "<short title>" --content "<confirmed content>"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Confirm success and show the user the result.
|
package/commands/warp.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warp
|
|
3
|
+
description: Warp to a Gobi space. Pass a space slug to warp directly, or omit to choose from available spaces.
|
|
4
|
+
argument-hint: "[spaceSlug]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Warp to a Gobi space:
|
|
8
|
+
|
|
9
|
+
Always use the globally installed `gobi` binary (not npx or ts-node).
|
|
10
|
+
|
|
11
|
+
- If a space slug is provided as `$ARGUMENTS`, run `gobi space warp $ARGUMENTS` directly.
|
|
12
|
+
- If no argument is given:
|
|
13
|
+
1. Run `gobi space list` to get available spaces.
|
|
14
|
+
2. Show the list to the user and ask them to pick one.
|
|
15
|
+
3. Run `gobi space warp <chosen-slug>` with their selection.
|
|
16
|
+
|
|
17
|
+
After warping, confirm the active space to the user.
|
package/dist/commands/space.js
CHANGED
|
@@ -62,6 +62,70 @@ export function registerSpaceCommand(program) {
|
|
|
62
62
|
}
|
|
63
63
|
console.log(`Warped to space "${result.name}" (${result.slug})`);
|
|
64
64
|
});
|
|
65
|
+
// ── Topics ──
|
|
66
|
+
space
|
|
67
|
+
.command("list-topics")
|
|
68
|
+
.description("List topics in a space, ordered by most recent content linkage.")
|
|
69
|
+
.option("--limit <number>", "Max topics to return (0 = all)", "50")
|
|
70
|
+
.action(async (opts) => {
|
|
71
|
+
const spaceSlug = resolveSpaceSlug(space);
|
|
72
|
+
const params = {
|
|
73
|
+
limit: parseInt(opts.limit, 10),
|
|
74
|
+
};
|
|
75
|
+
const resp = (await apiGet(`/spaces/${spaceSlug}/topics`, params));
|
|
76
|
+
const items = (resp.data || []);
|
|
77
|
+
if (isJsonMode(space)) {
|
|
78
|
+
jsonOut(items);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (!items.length) {
|
|
82
|
+
console.log("No topics found.");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const lines = [];
|
|
86
|
+
for (const t of items) {
|
|
87
|
+
const desc = t.description ? ` - ${t.description}` : "";
|
|
88
|
+
lines.push(`- [${t.slug}] ${t.name}${desc}`);
|
|
89
|
+
}
|
|
90
|
+
console.log(`Topics (${items.length}):\n` + lines.join("\n"));
|
|
91
|
+
});
|
|
92
|
+
space
|
|
93
|
+
.command("list-topic-threads <topicSlug>")
|
|
94
|
+
.description("List threads tagged with a topic in a space (cursor-paginated).")
|
|
95
|
+
.option("--limit <number>", "Items per page", "20")
|
|
96
|
+
.option("--cursor <string>", "Pagination cursor from previous response")
|
|
97
|
+
.action(async (topicSlug, opts) => {
|
|
98
|
+
const spaceSlug = resolveSpaceSlug(space);
|
|
99
|
+
const params = {
|
|
100
|
+
limit: parseInt(opts.limit, 10),
|
|
101
|
+
};
|
|
102
|
+
if (opts.cursor)
|
|
103
|
+
params.cursor = opts.cursor;
|
|
104
|
+
const resp = (await apiGet(`/spaces/${spaceSlug}/topics/${topicSlug}/threads`, params));
|
|
105
|
+
const data = unwrapResp(resp);
|
|
106
|
+
const pagination = (resp.pagination || {});
|
|
107
|
+
if (isJsonMode(space)) {
|
|
108
|
+
jsonOut({ ...data, pagination });
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const topic = (data.topic || {});
|
|
112
|
+
const threads = (data.threads || []);
|
|
113
|
+
if (!threads.length) {
|
|
114
|
+
console.log(`No threads found for topic "${topic.name || topicSlug}".`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const lines = [];
|
|
118
|
+
for (const t of threads) {
|
|
119
|
+
const author = t.author?.name || "Unknown";
|
|
120
|
+
const spaceName = t.space?.name || "";
|
|
121
|
+
lines.push(`- [${t.id}] "${t.title}" by ${author} in ${spaceName} (${t.replyCount} replies, ${t.createdAt})`);
|
|
122
|
+
}
|
|
123
|
+
const footer = pagination.hasMore ? `\n Next cursor: ${pagination.nextCursor}` : "";
|
|
124
|
+
console.log(`Topic: ${topic.name || topicSlug}\n` +
|
|
125
|
+
`Threads (${threads.length} items):\n` +
|
|
126
|
+
lines.join("\n") +
|
|
127
|
+
footer);
|
|
128
|
+
});
|
|
65
129
|
// ── Threads (get, list, create, edit, delete) ──
|
|
66
130
|
space
|
|
67
131
|
.command("get-thread <threadId>")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobi-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "CLI client for the Gobi collaborative knowledge platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"dist",
|
|
29
29
|
"!dist/**/*.test.js",
|
|
30
30
|
"skills",
|
|
31
|
-
".claude-plugin"
|
|
31
|
+
".claude-plugin",
|
|
32
|
+
"commands"
|
|
32
33
|
],
|
|
33
34
|
"bin": {
|
|
34
35
|
"gobi": "./dist/index.js"
|
package/skills/gobi/SKILL.md
CHANGED
|
@@ -10,12 +10,12 @@ description: >-
|
|
|
10
10
|
allowed-tools: Bash(gobi:*)
|
|
11
11
|
metadata:
|
|
12
12
|
author: gobi-ai
|
|
13
|
-
version: "0.6.
|
|
13
|
+
version: "0.6.20"
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# gobi-cli
|
|
17
17
|
|
|
18
|
-
A CLI client for the Gobi collaborative knowledge platform (v0.6.
|
|
18
|
+
A CLI client for the Gobi collaborative knowledge platform (v0.6.20).
|
|
19
19
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
@@ -146,6 +146,8 @@ Note: `--space-slug` is not available on other `brain` subcommands or on `sessio
|
|
|
146
146
|
- `gobi space` — Space commands (threads, replies).
|
|
147
147
|
- `gobi space list` — List spaces you are a member of.
|
|
148
148
|
- `gobi space warp` — Select the active space. Pass a slug to warp directly, or omit for interactive selection.
|
|
149
|
+
- `gobi space list-topics` — List topics in a space, ordered by most recent content linkage.
|
|
150
|
+
- `gobi space list-topic-threads` — List threads tagged with a topic in a space (cursor-paginated).
|
|
149
151
|
- `gobi space get-thread` — Get a thread and its replies (paginated).
|
|
150
152
|
- `gobi space list-threads` — List threads in a space (paginated).
|
|
151
153
|
- `gobi space create-thread` — Create a thread in a space.
|
|
@@ -6,21 +6,23 @@ Usage: gobi space [options] [command]
|
|
|
6
6
|
Space commands (threads, replies).
|
|
7
7
|
|
|
8
8
|
Options:
|
|
9
|
-
--space-slug <slug>
|
|
10
|
-
-h, --help
|
|
9
|
+
--space-slug <slug> Space slug (overrides .gobi/settings.yaml)
|
|
10
|
+
-h, --help display help for command
|
|
11
11
|
|
|
12
12
|
Commands:
|
|
13
|
-
list
|
|
14
|
-
warp [spaceSlug]
|
|
15
|
-
|
|
16
|
-
list-threads [options]
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
## list
|
|
@@ -45,6 +47,31 @@ Options:
|
|
|
45
47
|
-h, --help display help for command
|
|
46
48
|
```
|
|
47
49
|
|
|
50
|
+
## list-topics
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Usage: gobi space list-topics [options]
|
|
54
|
+
|
|
55
|
+
List topics in a space, ordered by most recent content linkage.
|
|
56
|
+
|
|
57
|
+
Options:
|
|
58
|
+
--limit <number> Max topics to return (0 = all) (default: "50")
|
|
59
|
+
-h, --help display help for command
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## list-topic-threads
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Usage: gobi space list-topic-threads [options] <topicSlug>
|
|
66
|
+
|
|
67
|
+
List threads tagged with a topic in a space (cursor-paginated).
|
|
68
|
+
|
|
69
|
+
Options:
|
|
70
|
+
--limit <number> Items per page (default: "20")
|
|
71
|
+
--cursor <string> Pagination cursor from previous response
|
|
72
|
+
-h, --help display help for command
|
|
73
|
+
```
|
|
74
|
+
|
|
48
75
|
## get-thread
|
|
49
76
|
|
|
50
77
|
```
|