@gobi-ai/cli 1.3.8 → 2.0.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.
Files changed (38) hide show
  1. package/.claude-plugin/marketplace.json +5 -6
  2. package/.claude-plugin/plugin.json +3 -4
  3. package/README.md +174 -82
  4. package/commands/space-explore.md +10 -10
  5. package/commands/space-share.md +13 -7
  6. package/dist/attachments.js +2 -1
  7. package/dist/commands/draft.js +2 -3
  8. package/dist/commands/global.js +212 -72
  9. package/dist/commands/init.js +5 -5
  10. package/dist/commands/{notes.js → saved.js} +115 -23
  11. package/dist/commands/space.js +121 -111
  12. package/dist/commands/sync.js +2 -56
  13. package/dist/commands/update.js +14 -8
  14. package/dist/commands/utils.js +6 -0
  15. package/dist/commands/vault.js +113 -0
  16. package/dist/main.js +4 -8
  17. package/package.json +2 -2
  18. package/skills/gobi-core/SKILL.md +19 -15
  19. package/skills/gobi-core/references/space.md +18 -19
  20. package/skills/gobi-draft/SKILL.md +3 -3
  21. package/skills/gobi-homepage/SKILL.md +21 -19
  22. package/skills/gobi-media/SKILL.md +2 -2
  23. package/skills/gobi-saved/SKILL.md +59 -0
  24. package/skills/gobi-saved/references/saved.md +52 -0
  25. package/skills/gobi-sense/SKILL.md +8 -4
  26. package/skills/gobi-space/SKILL.md +55 -38
  27. package/skills/gobi-space/references/global.md +87 -26
  28. package/skills/gobi-space/references/space.md +49 -61
  29. package/skills/gobi-vault/SKILL.md +92 -0
  30. package/skills/{gobi-core/references/sync.md → gobi-vault/references/vault.md} +41 -2
  31. package/dist/commands/brain.js +0 -141
  32. package/dist/commands/feed.js +0 -148
  33. package/skills/gobi-brain/SKILL.md +0 -100
  34. package/skills/gobi-brain/references/brain.md +0 -66
  35. package/skills/gobi-feed/SKILL.md +0 -43
  36. package/skills/gobi-feed/references/feed.md +0 -80
  37. package/skills/gobi-notes/SKILL.md +0 -52
  38. package/skills/gobi-notes/references/notes.md +0 -82
@@ -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": "1.3.8",
7
+ "version": "2.0.1",
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, generate images and videos.",
12
- "version": "1.3.8",
11
+ "description": "Manage the Gobi collaborative knowledge platform from the command line. Publish vault profiles, create posts and replies, manage saved notes and posts, manage sessions, generate images and videos.",
12
+ "version": "2.0.1",
13
13
  "author": {
14
14
  "name": "gobi-ai"
15
15
  },
@@ -18,9 +18,8 @@
18
18
  "skills": [
19
19
  "./skills/gobi-core",
20
20
  "./skills/gobi-space",
21
- "./skills/gobi-brain",
22
- "./skills/gobi-feed",
23
- "./skills/gobi-notes",
21
+ "./skills/gobi-vault",
22
+ "./skills/gobi-saved",
24
23
  "./skills/gobi-draft",
25
24
  "./skills/gobi-media",
26
25
  "./skills/gobi-sense",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gobi",
3
3
  "description": "Manage the Gobi collaborative knowledge platform from the command line",
4
- "version": "1.3.8",
4
+ "version": "2.0.1",
5
5
  "author": {
6
6
  "name": "gobi-ai"
7
7
  },
@@ -9,9 +9,8 @@
9
9
  "skills": [
10
10
  "./skills/gobi-core",
11
11
  "./skills/gobi-space",
12
- "./skills/gobi-brain",
13
- "./skills/gobi-feed",
14
- "./skills/gobi-notes",
12
+ "./skills/gobi-vault",
13
+ "./skills/gobi-saved",
15
14
  "./skills/gobi-draft",
16
15
  "./skills/gobi-media",
17
16
  "./skills/gobi-sense",
package/README.md CHANGED
@@ -4,7 +4,11 @@
4
4
  [![npm](https://img.shields.io/npm/v/@gobi-ai/cli)](https://www.npmjs.com/package/@gobi-ai/cli)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
6
 
7
- Command-line interface for the [Gobi](https://gobispace.com) collaborative knowledge platform.
7
+ The programmatic interface to [Gobi](https://gobispace.com) the agent-facing surface of the ecosystem. The same capabilities the desktop and web clients use (auth, vault sync and publishing, personal posts and replies, saved knowledge, drafts, media generation, activity reads) exposed as composable shell commands so AI agents and developer scripts can participate in a user's Brain.
8
+
9
+ ## Why a CLI?
10
+
11
+ Most Gobi capabilities are interactive surfaces (Desktop, Web, Mobile). The CLI flips that: every command is scriptable, returns structured JSON when asked, and uses headless device-code auth so an agent can run it on any host. If you're building an agent that needs to read from or write to a user's Brain — capture notes, post to a community space, save a snippet, draft a suggestion, generate an image — this is the surface.
8
12
 
9
13
  ## Installation
10
14
 
@@ -34,26 +38,83 @@ npm link
34
38
  ## Quick start
35
39
 
36
40
  ```sh
37
- # Initialize — logs in and sets up your vault
41
+ # Initialize — log in and set up your vault (creates PUBLISH.md if missing)
38
42
  gobi init
39
43
 
40
- # Select a space
44
+ # Select a community space
41
45
  gobi space warp
42
46
 
43
- # Search brains across your spaces
44
- gobi brain search --query "machine learning"
47
+ # Publish your vault profile (after editing PUBLISH.md frontmatter)
48
+ gobi vault publish
49
+
50
+ # Sync local files with the webdrive
51
+ gobi vault sync
52
+
53
+ # Browse the global feed and create a personal post
54
+ gobi global feed
55
+ gobi global create-post --title "Hello" --content "Trying gobi" --vault-slug my-vault
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Using gobi from an agent
61
+
62
+ Everything below applies whether you're building a Claude Code skill, an autonomous agent, or a shell script. The CLI was designed to be agent-driven first.
63
+
64
+ ### JSON envelope
65
+
66
+ Pass `--json` as a **global flag** (before the subcommand) and every command returns a structured envelope:
67
+
68
+ ```sh
69
+ gobi --json space list-posts
70
+ # {"success": true, "data": [...]}
71
+
72
+ gobi --json space get-post 99999
73
+ # {"success": false, "error": "Post not found"}
74
+ ```
75
+
76
+ `success: true` always carries `data`; `success: false` always carries `error`. Pagination metadata (`pagination: { hasMore, nextCursor }`) ships alongside `data` on list endpoints. Skill docs and the `--help` output describe each command's `data` shape.
77
+
78
+ ### Context discovery
79
+
80
+ The CLI looks up two pieces of state:
81
+
82
+ | Path | What | Who manages |
83
+ |------|------|-------------|
84
+ | `~/.gobi/credentials.json` | Auth tokens (`accessToken`, `refreshToken`) | `gobi auth login` writes; `gobi auth logout` clears |
85
+ | `.gobi/settings.yaml` | Per-project `vaultSlug` and `selectedSpaceSlug` | `gobi init` and `gobi space warp` write |
86
+
87
+ An agent should check these before calling commands that need a vault or space:
88
+
89
+ ```sh
90
+ # Are we authenticated?
91
+ gobi --json auth status
45
92
 
46
- # Ask a brain a question
47
- gobi brain ask --vault-slug my-vault --question "What is RAG?"
93
+ # Discover the project's defaults
94
+ cat .gobi/settings.yaml 2>/dev/null
48
95
  ```
49
96
 
97
+ If `.gobi/settings.yaml` is missing, `gobi init` and `gobi space warp` are the interactive entry points — they require user input, so an agent should hand off to the user rather than trying to drive them silently.
98
+
99
+ Every command that depends on a vault or space accepts an explicit override (`--vault-slug`, `--space-slug`) so an agent can act without ambient state.
100
+
101
+ ### Headless auth
102
+
103
+ `gobi auth login` is a device-code flow: it prints a URL and a user code to stdout, then polls. An agent can run it as a background task, surface the URL to the user as a clickable link, and wait for the process to exit. See [`commands/login.md`](commands/login.md) for the canonical agent recipe.
104
+
105
+ ### Per-session context for drafts
106
+
107
+ When the runtime exports `GOBI_SESSION_ID`, `gobi draft add` picks it up automatically — no need to pass `--session` from inside an agent run. See the **Drafts** section below.
108
+
109
+ ---
110
+
50
111
  ## Commands
51
112
 
52
113
  ### Authentication
53
114
 
54
115
  | Command | Description |
55
116
  |---------|-------------|
56
- | `gobi auth login` | Sign in via device code flow |
117
+ | `gobi auth login` | Sign in via device-code flow |
57
118
  | `gobi auth status` | Show current auth status |
58
119
  | `gobi auth logout` | Sign out and clear credentials |
59
120
 
@@ -61,76 +122,73 @@ gobi brain ask --vault-slug my-vault --question "What is RAG?"
61
122
 
62
123
  | Command | Description |
63
124
  |---------|-------------|
64
- | `gobi init` | Log in (if needed) and select or create a vault |
125
+ | `gobi init` | Log in (if needed) and select or create a vault. Creates `PUBLISH.md` if missing. |
65
126
  | `gobi space list` | List spaces you are a member of |
66
127
  | `gobi space warp [spaceSlug]` | Select the active space (interactive if slug omitted) |
67
128
 
68
- ### Brains
129
+ ### Vault
69
130
 
70
131
  | Command | Description |
71
132
  |---------|-------------|
72
- | `gobi brain search --query <q>` | Search public brains by text and semantic similarity |
73
- | `gobi brain ask --vault-slug <slug> --question <q>` | Ask a brain a question (creates a 1:1 session) |
74
- | `gobi brain publish` | Upload `BRAIN.md` to your vault |
75
- | `gobi brain unpublish` | Remove `BRAIN.md` from your vault |
133
+ | `gobi vault publish` | Upload `PUBLISH.md` to your vault. Triggers profile/metadata refresh. |
134
+ | `gobi vault unpublish` | Remove `PUBLISH.md` from your vault. |
135
+ | `gobi vault sync` | Sync local vault files with Gobi WebDrive. |
76
136
 
77
- Public brains are accessible at `https://gobispace.com/@{vaultSlug}`.
137
+ Public vaults are accessible at `https://gobispace.com/@{vaultSlug}`.
78
138
 
79
- `brain ask` also accepts `--rich-text <json>` (mutually exclusive with `--question`) and `--mode <auto|manual>`.
139
+ `vault sync` options:
140
+
141
+ | Option | Description |
142
+ |--------|-------------|
143
+ | `--upload-only` | Only upload local changes to server |
144
+ | `--download-only` | Only download server changes to local |
145
+ | `--conflict <strategy>` | Conflict resolution: `ask` (default), `server`, `client`, `skip` |
146
+ | `--dir <path>` | Local vault directory (default: current directory) |
147
+ | `--dry-run` | Preview changes without making them |
148
+ | `--full` | Full sync: ignore cursor and hash cache, re-check every file |
149
+ | `--path <path>` | Restrict sync to specific file/folder (repeatable) |
150
+ | `--plan-file <path>` | Write dry-run plan to file, or read plan to execute |
151
+ | `--execute` | Execute a previously written plan file (requires `--plan-file`) |
152
+ | `--conflict-choices <json>` | Per-file conflict resolutions as JSON (use with `--execute`) |
80
153
 
81
154
  ### Spaces
82
155
 
156
+ A *Space* is a community knowledge area. A *Space Post* lives in one space. The same `Post` data type, in a different scope, is a *Personal Post* (see Global feed below) — so anything you can do to a Space Post you can do to a Personal Post.
157
+
83
158
  > Space and member administration (creating spaces, inviting/approving members, joining/leaving) is web-UI only and not available in the CLI.
84
159
 
85
160
  | Command | Description |
86
161
  |---------|-------------|
87
162
  | `gobi space get [spaceSlug]` | Show space details (uses current space if slug omitted) |
88
- | `gobi space messages` | Unified message feed (threads + replies, newest first) |
89
- | `gobi space ancestors <threadId>` | Walk a thread/reply's lineage from root immediate parent |
90
-
91
- ### Feed
92
-
93
- | Command | Description |
94
- |---------|-------------|
95
- | `gobi feed list` | List recent brain updates from the global public feed |
96
- | `gobi feed get <updateId>` | Get a feed brain update and its replies |
97
- | `gobi feed post-reply <updateId> --content <c>` | Post a reply to a brain update in the feed |
98
- | `gobi feed edit-reply <replyId> --content <c>` | Edit a reply you authored |
99
- | `gobi feed delete-reply <replyId>` | Delete a reply you authored |
100
-
101
- `feed list` and `feed get` accept `--limit`/`--cursor` for pagination.
102
-
103
- ### Threads
104
-
105
- > **Migration note:** Brain-update commands have been removed. To post user-level content, use `gobi global create-thread` (global space) or `gobi space create-thread` (a specific space).
106
-
107
- | Command | Description |
108
- |---------|-------------|
109
- | `gobi space list-threads` | List threads in the current space |
110
- | `gobi space get-thread <id>` | Get a thread and its replies |
111
- | `gobi space create-thread --title <t> --content <c>` | Create a thread |
112
- | `gobi space edit-thread <id> [--title <t>] [--content <c>]` | Edit a thread (at least one required) |
113
- | `gobi space delete-thread <id>` | Delete a thread |
114
-
115
- ### Replies
116
-
117
- | Command | Description |
118
- |---------|-------------|
119
- | `gobi space create-reply <threadId> --content <c>` | Reply to a thread |
163
+ | `gobi space feed` | Unified feed (posts + replies, newest first) in the space |
164
+ | `gobi space list-topics` | List topics in the space, ordered by most recent linkage |
165
+ | `gobi space list-topic-posts <topicSlug>` | List posts tagged with a topic |
166
+ | `gobi space list-posts` | List posts in the space |
167
+ | `gobi space get-post <postId>` | Get a post with its ancestors and replies |
168
+ | `gobi space create-post --title <t> --content <c> [--vault-slug <slug>] [--auto-attachments]` | Create a space post. `--vault-slug` attributes it to a vault you own; `--auto-attachments` uploads `[[wikilinks]]` to that vault and uses it as `authorVaultSlug`. |
169
+ | `gobi space edit-post <postId> [--title <t>] [--content <c>] [--vault-slug <slug>] [--auto-attachments]` | Edit a space post. `--vault-slug ""` detaches the vault. |
170
+ | `gobi space delete-post <postId>` | Delete a space post |
171
+ | `gobi space create-reply <postId> --content <c>` | Reply to a space post |
120
172
  | `gobi space edit-reply <replyId> --content <c>` | Edit a reply |
121
173
  | `gobi space delete-reply <replyId>` | Delete a reply |
122
174
 
123
- ### Global thread space
175
+ ### Global feed (personal posts)
124
176
 
125
- The global thread space is a slugless message feed visible across all spaces.
177
+ A *Personal Post* lives on the author's profile (their primary vault) and surfaces in the public global feed. Same `Post` model as a Space Post, scoped to the user instead of a space.
126
178
 
127
179
  | Command | Description |
128
180
  |---------|-------------|
129
- | `gobi global messages` | List the global unified message feed (newest first) |
130
- | `gobi global get-thread <id>` | Get a global thread and its direct replies |
131
- | `gobi global ancestors <id>` | Walk a global thread/reply's lineage |
132
- | `gobi global create-thread [--title <t>] (--content <c> \| --rich-text <json>)` | Create a thread in the global space |
133
- | `gobi global reply <threadId> (--content <c> \| --rich-text <json>)` | Reply to a global thread |
181
+ | `gobi global feed` | List the global public feed (posts + replies, newest first) |
182
+ | `gobi global list-posts [--mine] [--vault-slug <slug>]` | List personal posts; filter to your own or by author vault |
183
+ | `gobi global get-post <postId>` | Get a personal post with its ancestors and replies |
184
+ | `gobi global create-post [--title <t>] (--content <c> \| --rich-text <json>) [--vault-slug <slug>] [--auto-attachments]` | Create a personal post |
185
+ | `gobi global edit-post <postId> [--title <t>] [--content <c>] [--vault-slug <slug>]` | Edit a personal post you authored. `--vault-slug ""` detaches the vault. |
186
+ | `gobi global delete-post <postId>` | Delete a personal post you authored |
187
+ | `gobi global create-reply <postId> (--content <c> \| --rich-text <json>)` | Reply to a personal post |
188
+ | `gobi global edit-reply <replyId> --content <c>` | Edit a reply you authored |
189
+ | `gobi global delete-reply <replyId>` | Delete a reply you authored |
190
+
191
+ `--vault-slug` requires that the caller hold `role: 'owner'` on the target vault. When set, it becomes the post's `authorVaultSlug`. When `--auto-attachments` is set, the same vault is used both as the upload destination for `[[wikilinks]]` and as `authorVaultSlug`.
134
192
 
135
193
  ### Sessions
136
194
 
@@ -144,6 +202,8 @@ The global thread space is a slugless message feed visible across all spaces.
144
202
 
145
203
  ### Sense
146
204
 
205
+ Activity and transcription data captured by Gobi Sense (or the mobile app).
206
+
147
207
  | Command | Description |
148
208
  |---------|-------------|
149
209
  | `gobi sense activities --start-time <iso> --end-time <iso>` | Fetch activity records in a time range |
@@ -151,59 +211,68 @@ The global thread space is a slugless message feed visible across all spaces.
151
211
 
152
212
  Times are ISO 8601 UTC (e.g. `2026-03-20T00:00:00Z`).
153
213
 
154
- ### Notes
214
+ ### Saved
215
+
216
+ `gobi saved` is the user's personal saved-knowledge collection — notes you author and posts you bookmark.
217
+
218
+ #### Saved notes
155
219
 
156
220
  | Command | Description |
157
221
  |---------|-------------|
158
- | `gobi notes list [--date YYYY-MM-DD]` | List your notes (recent via cursor, or all for a day) |
159
- | `gobi notes get <id>` | Get a single note |
160
- | `gobi notes create --content <c>` | Create a note (use `-` to read content from stdin) |
161
- | `gobi notes edit <id> [--content <c>] [--agent-id <id>]` | Edit a note (at least one required; `--agent-id null` clears the link) |
162
- | `gobi notes delete <id>` | Delete a note you authored |
222
+ | `gobi saved note list [--date YYYY-MM-DD]` | List your notes (recent via cursor, or all for a day) |
223
+ | `gobi saved note get <id>` | Get a single note |
224
+ | `gobi saved note create --content <c>` | Create a note (use `-` to read content from stdin) |
225
+ | `gobi saved note edit <id> [--content <c>] [--agent-id <id>]` | Edit a note (`--agent-id null` clears the link) |
226
+ | `gobi saved note delete <id>` | Delete a note you authored |
227
+
228
+ `saved note list` and `saved note create` accept `--timezone <iana>` (default: system timezone).
229
+
230
+ #### Saved posts
163
231
 
164
- `notes list` and `notes create` accept `--timezone <iana>` (default: system timezone) for day boundaries.
165
- `notes list` also accepts `--limit`/`--cursor` for pagination.
232
+ | Command | Description |
233
+ |---------|-------------|
234
+ | `gobi saved post list [--type all\|article\|space-post]` | List posts you've saved |
235
+ | `gobi saved post get <postId>` | Get a saved post snapshot |
236
+ | `gobi saved post create --source <id>` | Save a post or reply by id (records a snapshot) |
237
+ | `gobi saved post delete <postId>` | Remove a post from your saved collection |
166
238
 
167
239
  ### Drafts
168
240
 
169
- Drafts are authored by your agent during chat (or by external agents using `gobi draft add` as their tool layer). Each draft carries 0–3 AI-suggested actions the user can pick from. The top 5 pending drafts (lowest priority first) feed the agent's system prompt every turn. Every draft is anchored to the chat session that produced it.
241
+ A *draft* is a unit of standing guidance authored by an agent. Each draft carries 0–3 AI-suggested action labels the user picks from. The top 5 pending drafts (lowest priority first) are injected into the agent's system prompt every turn drafts turn agent suggestions into running context.
242
+
243
+ When invoked from inside an agent run, the runtime exports `GOBI_SESSION_ID` so `gobi draft add` picks it up automatically; otherwise pass `--session <uuid>`.
170
244
 
171
245
  | Command | Description |
172
246
  |---------|-------------|
173
247
  | `gobi draft list [--limit N]` | List drafts (priority ASC, then newest first) |
174
248
  | `gobi draft get <id>` | Show one draft with its history and suggested actions |
175
- | `gobi draft add <title> <content> [--session <id>] [--priority N] [--action <label>]…` | Add a draft. Pass `--action` up to 3 times to attach AI-suggested actions. `--session` falls back to `$GOBI_SESSION_ID`. Use `-` for content to read from stdin. |
249
+ | `gobi draft add <title> <content> [--session <id>] [--priority N] [--action <label>]…` | Add a draft. Pass `--action` up to 3 times. `--session` falls back to `$GOBI_SESSION_ID`. Use `-` for content to read from stdin. |
176
250
  | `gobi draft delete <id>` | Delete a draft |
177
251
  | `gobi draft prioritize <id> <priority>` | Set priority (lower = higher) |
178
252
  | `gobi draft action <id> <index>` | Take one of the draft's suggested actions by 0-based index. Marks `actioned` and posts the synthesized message into the originating session. |
179
253
  | `gobi draft revise <id> <comment> [--title <t>] [--content <c>] [--action <label>]…` | Bump revision with a comment; optionally replace title / content / actions in the same call |
180
254
 
181
- ### Sync
255
+ ### Media generation
256
+
257
+ Image, video, and avatar generation. See the `gobi-media` skill for full workflows.
182
258
 
183
259
  | Command | Description |
184
260
  |---------|-------------|
185
- | `gobi sync` | Sync local vault files with Gobi Webdrive |
186
-
187
- | Option | Description |
188
- |--------|-------------|
189
- | `--upload-only` | Only upload local changes to server |
190
- | `--download-only` | Only download server changes to local |
191
- | `--conflict <strategy>` | Conflict resolution: `ask` (default), `server`, `client`, `skip` |
192
- | `--dir <path>` | Local vault directory (default: current directory) |
193
- | `--dry-run` | Preview changes without making them |
194
- | `--full` | Full sync: ignore cursor and hash cache, re-check every file |
195
- | `--path <path>` | Restrict sync to specific file/folder (repeatable) |
196
- | `--plan-file <path>` | Write dry-run plan to file, or read plan to execute |
197
- | `--execute` | Execute a previously written plan file (requires `--plan-file`) |
198
- | `--conflict-choices <json>` | Per-file conflict resolutions as JSON (use with `--execute`) |
261
+ | `gobi media image-generate --prompt <p> [--aspect-ratio <r>] [-o <file>]` | Generate an image (use `-o` to wait + download) |
262
+ | `gobi media image-edit --image <f> --prompt <p>` | Edit/inpaint an image |
263
+ | `gobi media video-create --avatar-id <a> --voice-id <v> --script <s>` | Avatar video with voice narration |
264
+ | `gobi media cinematic-create --prompt <p>` | Cinematic video from a text prompt |
265
+ | `gobi media avatar-design / avatar-from-selfie` | Custom avatars from prompts or selfies |
266
+ | `gobi media avatars` / `gobi media voices` | List available avatars and voices |
267
+ | `gobi media upload <file>` | Upload a local file and get a media id |
199
268
 
200
269
  ### Global options
201
270
 
202
271
  | Option | Scope | Description |
203
272
  |--------|-------|-------------|
204
- | `--json` | All commands | Output results as JSON |
273
+ | `--json` | All commands | Output structured JSON (`{success, data}` / `{success, error}`) |
205
274
  | `--space-slug <slug>` | `space` commands | Override the default space (from `.gobi/settings.yaml`) |
206
- | `--vault-slug <slug>` | Per-command | Override the default vault; available on `space create-thread`, `space edit-thread`, `space edit-reply` |
275
+ | `--vault-slug <slug>` | Per-command | Override the default vault see each command's docs |
207
276
 
208
277
  ## Configuration
209
278
 
@@ -213,6 +282,7 @@ Drafts are authored by your agent during chat (or by external agents using `gobi
213
282
  |----------|---------|-------------|
214
283
  | `GOBI_BASE_URL` | `https://api.joingobi.com` | API server URL |
215
284
  | `GOBI_WEBDRIVE_BASE_URL` | `https://webdrive.joingobi.com` | File storage URL |
285
+ | `GOBI_SESSION_ID` | — | Default `--session` for `gobi draft add` (set automatically inside agent runs) |
216
286
 
217
287
  ### Files
218
288
 
@@ -220,6 +290,26 @@ Drafts are authored by your agent during chat (or by external agents using `gobi
220
290
  |------|-------------|
221
291
  | `~/.gobi/credentials.json` | Stored authentication tokens |
222
292
  | `.gobi/settings.yaml` | Per-project vault and space configuration |
293
+ | `.gobi/syncfiles` | Whitelist patterns for `gobi vault sync` (one per line) |
294
+ | `.gobi/sync.db` | Local sync state (cursor, hash cache) — managed by the CLI |
295
+ | `PUBLISH.md` | Vault profile document with YAML frontmatter, published via `gobi vault publish` |
296
+
297
+ ## Claude Code skills
298
+
299
+ The CLI ships a `.claude-plugin/` manifest with eight skills that wrap the command groups for Claude Code agents:
300
+
301
+ | Skill | Covers |
302
+ |-------|--------|
303
+ | `gobi-core` | Auth, init, session, update, space list/warp |
304
+ | `gobi-vault` | `gobi vault publish/unpublish/sync` |
305
+ | `gobi-space` | `gobi space …` and `gobi global …` |
306
+ | `gobi-saved` | `gobi saved note …` and `gobi saved post …` |
307
+ | `gobi-draft` | `gobi draft …` |
308
+ | `gobi-media` | `gobi media …` |
309
+ | `gobi-sense` | `gobi sense activities/transcriptions` |
310
+ | `gobi-homepage` | Building custom HTML homepages with `window.gobi` |
311
+
312
+ Each skill's `SKILL.md` is hand-written orientation; `references/` is regenerated from `--help` output by `npm run generate-skill-docs`.
223
313
 
224
314
  ## Development
225
315
 
@@ -237,6 +327,8 @@ Run from source without compiling:
237
327
  npm run dev -- auth status
238
328
  ```
239
329
 
330
+ Tests run against `dist/*.test.js` (built JS), so `npm run build` is a prerequisite for `npm test`.
331
+
240
332
  ## License
241
333
 
242
334
  [MIT](LICENSE)
@@ -1,20 +1,20 @@
1
1
  ---
2
2
  name: space-explore
3
- description: Explore what's happening in the active Gobi space — threads and learnings shared by others.
3
+ description: Explore what's happening in the active Gobi space — posts and learnings shared by others.
4
4
  argument-hint: "[topic or keyword]"
5
5
  ---
6
6
 
7
7
  Always use the globally installed `gobi` binary (not via npx or ts-node).
8
8
 
9
- Explore the active Gobi space to surface discussions, topics, and learnings from others:
9
+ Explore the active Gobi space to surface posts, topics, and learnings from others:
10
10
 
11
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 feed list` — learnings and brain updates shared by members across the platform
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.
12
+ - `gobi --json space list-posts` — recent posts in the space
13
+ - `gobi --json space list-topics` — available topics in the space
14
+ - `gobi --json global feed` — recent posts and replies shared by members across the platform
15
+ 2. Display results in a readable summary, grouped by type (Topics / Space posts / Global feed).
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-posts <topicSlug>` to show posts tagged with that topic.
17
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 feed brain update: run `gobi feed get <updateId>` to show the update with its replies.
18
+ - For a topic: run `gobi space list-topic-posts <topicSlug>` and show the posts.
19
+ - For a space post: run `gobi space get-post <postId>` and show it with ancestors and replies.
20
+ - For a global feed post: run `gobi global get-post <postId>` to show it with ancestors and replies.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: space-share
3
- description: Summarize recent learnings from this session and draft a brain update to share to the active Gobi space.
3
+ description: Summarize recent learnings from this session and draft a personal post to share to the global feed.
4
4
  argument-hint: "[context]"
5
5
  ---
6
6
 
@@ -8,15 +8,15 @@ Always use the globally installed `gobi` binary (not via npx or ts-node).
8
8
 
9
9
  ## Pre-flight check
10
10
 
11
- First, verify the user is warped into a space:
11
+ First, verify the user is set up:
12
12
 
13
13
  ```bash
14
14
  gobi --json auth status
15
15
  ```
16
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.
17
+ Check that `.gobi/settings.yaml` exists and contains both `vaultSlug` and `selectedSpaceSlug`. If not, stop and ask the user to run `gobi init` and `gobi space warp` first.
18
18
 
19
- ## Draft a brain update
19
+ ## Draft a personal post
20
20
 
21
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
22
 
@@ -34,12 +34,18 @@ Focus on:
34
34
 
35
35
  ## Present to the user
36
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.
37
+ Format the draft as a short post (2–5 bullet points max). Show it to the user and ask for confirmation before posting.
38
38
 
39
- Once confirmed, post it:
39
+ Once confirmed, post it to the global feed:
40
40
 
41
41
  ```bash
42
- gobi brain post-update --title "<short title>" --content "<confirmed content>"
42
+ gobi global create-post --title "<short title>" --content "<confirmed content>"
43
+ ```
44
+
45
+ Or to the active space:
46
+
47
+ ```bash
48
+ gobi space create-post --title "<short title>" --content "<confirmed content>"
43
49
  ```
44
50
 
45
51
  Confirm success and show the user the result.
@@ -1,4 +1,5 @@
1
1
  import { existsSync, readFileSync, appendFileSync } from "fs";
2
+ import { EOL } from "os";
2
3
  import { join, extname } from "path";
3
4
  import ignore from "ignore";
4
5
  import { WEBDRIVE_BASE_URL } from "./constants.js";
@@ -33,7 +34,7 @@ function addToLocalSyncfiles(gobiDir, filePath) {
33
34
  if (isPathCovered(filePath, patterns))
34
35
  return;
35
36
  const syncfilesPath = join(gobiDir, "syncfiles");
36
- appendFileSync(syncfilesPath, `\n${filePath}`);
37
+ appendFileSync(syncfilesPath, `${EOL}${filePath}`);
37
38
  console.log(`Added to syncfiles: ${filePath}`);
38
39
  }
39
40
  export async function uploadAttachments(vaultSlug, links, token, options) {
@@ -1,9 +1,8 @@
1
- import { readFileSync } from "fs";
2
1
  import { apiDelete, apiGet, apiPatch, apiPost } from "../client.js";
3
- import { isJsonMode, jsonOut, unwrapResp } from "./utils.js";
2
+ import { isJsonMode, jsonOut, readStdin, unwrapResp } from "./utils.js";
4
3
  function readContent(value) {
5
4
  if (value === "-")
6
- return readFileSync("/dev/stdin", "utf8");
5
+ return readStdin();
7
6
  return value;
8
7
  }
9
8
  function snippet(content, max = 80) {