gbos 1.3.17 → 1.3.19
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/README.md +268 -2
- package/package.json +1 -1
- package/src/commands/tasks.js +8 -5
package/README.md
CHANGED
|
@@ -1,2 +1,268 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# GBOS CLI
|
|
2
|
+
|
|
3
|
+
Command-line interface for the **Generative Business Operating System (GBOS)** - a task management platform that connects AI coding agents to development workflows.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g gbos
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 1. Authenticate with GBOS
|
|
15
|
+
gbos auth
|
|
16
|
+
|
|
17
|
+
# 2. Connect to a development node (automatic after auth)
|
|
18
|
+
gbos connect
|
|
19
|
+
|
|
20
|
+
# 3. Start working on tasks
|
|
21
|
+
gbos continue
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
### Authentication & Connection
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
|---------|-------------|
|
|
30
|
+
| `gbos auth` | Authenticate with GBOS (opens browser for OAuth) |
|
|
31
|
+
| `gbos auth --force` | Force re-authentication |
|
|
32
|
+
| `gbos connect` | Connect to a development node |
|
|
33
|
+
| `gbos disconnect` | Disconnect from the current node |
|
|
34
|
+
| `gbos logout` | Log out and clear credentials |
|
|
35
|
+
| `gbos status` | Show current authentication and connection status |
|
|
36
|
+
|
|
37
|
+
### Task Management
|
|
38
|
+
|
|
39
|
+
| Command | Description |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| `gbos tasks` | List all tasks assigned to this node |
|
|
42
|
+
| `gbos next` | Preview the next task in the queue |
|
|
43
|
+
| `gbos continue` | Get the next task and output prompt for coding agent |
|
|
44
|
+
| `gbos fallback` | Cancel current task and revert changes |
|
|
45
|
+
| `gbos add_task` | Create a new task interactively |
|
|
46
|
+
|
|
47
|
+
### Help
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `gbos -h` | Show help and all available commands |
|
|
52
|
+
| `gbos <command> -h` | Show help for a specific command |
|
|
53
|
+
|
|
54
|
+
## How It Works
|
|
55
|
+
|
|
56
|
+
### 1. Authentication Flow
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
gbos auth
|
|
60
|
+
│
|
|
61
|
+
├─→ Opens browser for GBOS OAuth
|
|
62
|
+
├─→ Saves session to ~/.gbos/session.json
|
|
63
|
+
├─→ Registers MCP server for coding tools
|
|
64
|
+
└─→ Automatically proceeds to connect
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 2. Task Workflow
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
gbos continue
|
|
71
|
+
│
|
|
72
|
+
├─→ Checks for in-progress task (GET /cli/tasks/current)
|
|
73
|
+
├─→ If none, fetches next task with auto-assign (GET /cli/tasks/next?auto_assign=true)
|
|
74
|
+
├─→ Marks task as in_progress (POST /cli/tasks/:id/start)
|
|
75
|
+
└─→ Outputs task prompt for coding agent
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 3. Working with Coding Agents
|
|
79
|
+
|
|
80
|
+
After connecting, run your favorite coding agent in the same terminal:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Claude Code
|
|
84
|
+
claude
|
|
85
|
+
|
|
86
|
+
# Gemini CLI
|
|
87
|
+
gemini
|
|
88
|
+
|
|
89
|
+
# OpenAI Codex
|
|
90
|
+
codex
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Then simply ask the agent to work on GBOS tasks:
|
|
94
|
+
- "Fetch and work on the next task from GBOS"
|
|
95
|
+
- "Run gbos continue and complete the task"
|
|
96
|
+
- "Check gbos tasks and work on the highest priority one"
|
|
97
|
+
|
|
98
|
+
## Supported Coding Agents
|
|
99
|
+
|
|
100
|
+
GBOS CLI automatically configures MCP servers for:
|
|
101
|
+
|
|
102
|
+
- **Claude Code** - `~/.claude/settings.json`
|
|
103
|
+
- **Claude Desktop** - `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
104
|
+
- **Gemini CLI** - `~/.gemini/settings.json`
|
|
105
|
+
- **Codex CLI** - `~/.codex/config.json`
|
|
106
|
+
- **Cursor IDE** - `~/.cursor/mcp.json`
|
|
107
|
+
- **VS Code** - `~/.vscode/mcp.json`
|
|
108
|
+
- **AntiGravity IDE** - `~/.antigravity/mcp.json`
|
|
109
|
+
|
|
110
|
+
## Project Integration
|
|
111
|
+
|
|
112
|
+
When you run `gbos connect` in a project directory, it creates:
|
|
113
|
+
|
|
114
|
+
### Skill Files
|
|
115
|
+
|
|
116
|
+
| File | Purpose |
|
|
117
|
+
|------|---------|
|
|
118
|
+
| `CLAUDE.md` | Instructions for Claude Code |
|
|
119
|
+
| `.cursorrules` | Instructions for Cursor IDE |
|
|
120
|
+
| `GEMINI.md` | Instructions for Gemini CLI |
|
|
121
|
+
| `AGENTS.md` | Instructions for other agents |
|
|
122
|
+
| `.claude/skills/gbos/SKILL.md` | Claude Code `/gbos` slash command |
|
|
123
|
+
|
|
124
|
+
### VS Code Tasks
|
|
125
|
+
|
|
126
|
+
`.vscode/tasks.json` with quick-access tasks:
|
|
127
|
+
- GBOS: Status
|
|
128
|
+
- GBOS: Tasks
|
|
129
|
+
- GBOS: Continue
|
|
130
|
+
- GBOS: Fallback
|
|
131
|
+
|
|
132
|
+
## Configuration
|
|
133
|
+
|
|
134
|
+
### Session File
|
|
135
|
+
|
|
136
|
+
Stored at `~/.gbos/session.json`:
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"access_token": "gbos_...",
|
|
141
|
+
"refresh_token": "gbos_refresh_...",
|
|
142
|
+
"user_id": 1,
|
|
143
|
+
"user_name": "John Doe",
|
|
144
|
+
"account_id": 2,
|
|
145
|
+
"account_name": "My Account",
|
|
146
|
+
"connection": {
|
|
147
|
+
"node": { "id": 72, "name": "my-node" },
|
|
148
|
+
"application": { "id": 48, "name": "My App" }
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Environment Variables
|
|
154
|
+
|
|
155
|
+
| Variable | Description |
|
|
156
|
+
|----------|-------------|
|
|
157
|
+
| `DEBUG=1` | Enable debug output |
|
|
158
|
+
|
|
159
|
+
## API Endpoints
|
|
160
|
+
|
|
161
|
+
The CLI communicates with the GBOS API:
|
|
162
|
+
|
|
163
|
+
| Endpoint | Method | Description |
|
|
164
|
+
|----------|--------|-------------|
|
|
165
|
+
| `/cli/auth/init` | POST | Initialize device auth flow |
|
|
166
|
+
| `/cli/auth/status/:code` | GET | Check auth status |
|
|
167
|
+
| `/cli/applications` | GET | List available applications |
|
|
168
|
+
| `/cli/nodes` | GET | List available nodes |
|
|
169
|
+
| `/cli/connect/:nodeId` | POST | Connect to a node |
|
|
170
|
+
| `/cli/tasks` | GET | List tasks for node |
|
|
171
|
+
| `/cli/tasks` | POST | Create a task |
|
|
172
|
+
| `/cli/tasks/current` | GET | Get in-progress task |
|
|
173
|
+
| `/cli/tasks/next` | GET | Get next task (supports `?auto_assign=true`) |
|
|
174
|
+
| `/cli/tasks/:id/start` | POST | Start a task |
|
|
175
|
+
| `/cli/tasks/:id/complete` | POST | Complete a task |
|
|
176
|
+
| `/cli/tasks/:id/fail` | POST | Fail a task |
|
|
177
|
+
| `/cli/tasks/:id/cancel` | POST | Cancel a task |
|
|
178
|
+
|
|
179
|
+
## MCP Server
|
|
180
|
+
|
|
181
|
+
GBOS provides an MCP (Model Context Protocol) server that coding agents can use directly:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
https://gbos-mcp-server-579767694933.us-south1.run.app/mcp
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
This is automatically configured when you run `gbos auth`.
|
|
188
|
+
|
|
189
|
+
## Examples
|
|
190
|
+
|
|
191
|
+
### Basic Workflow
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Install
|
|
195
|
+
npm install -g gbos
|
|
196
|
+
|
|
197
|
+
# Authenticate and connect
|
|
198
|
+
gbos auth
|
|
199
|
+
|
|
200
|
+
# Check status
|
|
201
|
+
gbos status
|
|
202
|
+
|
|
203
|
+
# See available tasks
|
|
204
|
+
gbos tasks
|
|
205
|
+
|
|
206
|
+
# Start working on next task
|
|
207
|
+
gbos continue
|
|
208
|
+
|
|
209
|
+
# If task fails or needs to be cancelled
|
|
210
|
+
gbos fallback
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Create a Task
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
gbos add_task
|
|
217
|
+
# Follow interactive prompts:
|
|
218
|
+
# - Title
|
|
219
|
+
# - Description
|
|
220
|
+
# - Priority (low/medium/high/critical)
|
|
221
|
+
# - Task type (feature/bug/refactor/test/docs)
|
|
222
|
+
# - Prompt for agent
|
|
223
|
+
# - Attachments
|
|
224
|
+
# - Due date
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Debug Mode
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
DEBUG=1 gbos connect
|
|
231
|
+
DEBUG=1 gbos tasks
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Troubleshooting
|
|
235
|
+
|
|
236
|
+
### Token Expired
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
gbos auth --force
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Not Connected
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
gbos connect
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Tasks Not Showing
|
|
249
|
+
|
|
250
|
+
Tasks may need to be assigned to your node. Use `gbos next` which auto-assigns pending tasks, or assign from the GBOS dashboard.
|
|
251
|
+
|
|
252
|
+
### MCP Server Not Working
|
|
253
|
+
|
|
254
|
+
Re-run authentication to re-register MCP servers:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
gbos auth --force
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Links
|
|
261
|
+
|
|
262
|
+
- **GBOS Platform**: [https://gbos.io](https://gbos.io)
|
|
263
|
+
- **API Documentation**: [https://gbos-api-579767694933.us-south1.run.app/docs](https://gbos-api-579767694933.us-south1.run.app/docs)
|
|
264
|
+
- **Issues**: [https://github.com/mystroanalytics/gbos-node-local/issues](https://github.com/mystroanalytics/gbos-node-local/issues)
|
|
265
|
+
|
|
266
|
+
## License
|
|
267
|
+
|
|
268
|
+
MIT
|
package/package.json
CHANGED
package/src/commands/tasks.js
CHANGED
|
@@ -216,7 +216,8 @@ async function nextTaskCommand() {
|
|
|
216
216
|
try {
|
|
217
217
|
console.log('\nFetching next task...\n');
|
|
218
218
|
const response = await api.getNextTask();
|
|
219
|
-
|
|
219
|
+
// API returns { data: { task, node } } or { data: task }
|
|
220
|
+
const task = response.data?.task || response.data;
|
|
220
221
|
|
|
221
222
|
if (!task) {
|
|
222
223
|
if (response.pending_tasks_count > 0) {
|
|
@@ -271,7 +272,8 @@ async function continueCommand() {
|
|
|
271
272
|
let task;
|
|
272
273
|
try {
|
|
273
274
|
const currentResponse = await api.getCurrentTask();
|
|
274
|
-
task
|
|
275
|
+
// API returns { data: { task, node } } or { data: task }
|
|
276
|
+
task = currentResponse.data?.task || currentResponse.data;
|
|
275
277
|
} catch (e) {
|
|
276
278
|
// No current task, get next one
|
|
277
279
|
}
|
|
@@ -280,7 +282,8 @@ async function continueCommand() {
|
|
|
280
282
|
let nextResponse;
|
|
281
283
|
if (!task) {
|
|
282
284
|
nextResponse = await api.getNextTask();
|
|
283
|
-
task
|
|
285
|
+
// API returns { data: { task, node } } or { data: task }
|
|
286
|
+
task = nextResponse.data?.task || nextResponse.data;
|
|
284
287
|
}
|
|
285
288
|
|
|
286
289
|
if (!task) {
|
|
@@ -294,8 +297,8 @@ async function continueCommand() {
|
|
|
294
297
|
return;
|
|
295
298
|
}
|
|
296
299
|
|
|
297
|
-
// Mark task as in progress if it's pending
|
|
298
|
-
if (task.status === 'pending') {
|
|
300
|
+
// Mark task as in progress if it's pending or assigned
|
|
301
|
+
if (task.status === 'pending' || task.status === 'assigned') {
|
|
299
302
|
await api.startTask(task.id);
|
|
300
303
|
}
|
|
301
304
|
|