@gobi-ai/cli 0.8.0 → 0.9.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.
@@ -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.3",
7
+ "version": "0.8.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.7.3",
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.8.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-cli",
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.7.3",
4
+ "version": "0.8.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-cli",
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
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 skills/gobi/scripts/generate-docs.ts",
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-cli
2
+ name: gobi-core
3
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, 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: "{{VERSION}}"
12
+ version: "0.8.0"
14
13
  ---
15
14
 
16
- # gobi-cli
15
+ # gobi-core
17
16
 
18
- A CLI client for the Gobi collaborative knowledge platform (v{{VERSION}}).
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
- {{COMMANDS}}
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
- {{REFERENCE_TOC}}
146
-
147
- ## Discovering Options
148
-
149
- Run `--help` on any command for details:
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
  ```
@@ -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`);