@jive-ai/cli 0.0.26 → 0.0.31
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/LICENSE +1 -1
- package/dist/index.mjs +4832 -1718
- package/package.json +20 -6
- package/dist/config-BP7v03In.mjs +0 -3
- package/docs/auth.md +0 -378
- package/docs/getting-started.md +0 -263
- package/docs/init.md +0 -591
- package/docs/mcp.md +0 -899
- package/docs/subagents.md +0 -702
- package/docs/sync.md +0 -673
- package/docs/team.md +0 -514
package/docs/team.md
DELETED
|
@@ -1,514 +0,0 @@
|
|
|
1
|
-
# Team Management Commands
|
|
2
|
-
|
|
3
|
-
Teams are the organizational unit in Jive. All subagents and MCP servers belong to a team, and team members can collaborate on shared AI resources.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
Team management in Jive allows you to:
|
|
8
|
-
- Create and manage teams
|
|
9
|
-
- Invite team members
|
|
10
|
-
- Switch between teams in a project
|
|
11
|
-
- View team membership
|
|
12
|
-
|
|
13
|
-
Each user can be a member of multiple teams, and each project can be associated with one active team at a time.
|
|
14
|
-
|
|
15
|
-
## Commands
|
|
16
|
-
|
|
17
|
-
### `jive team create`
|
|
18
|
-
|
|
19
|
-
Create a new team.
|
|
20
|
-
|
|
21
|
-
**Usage:**
|
|
22
|
-
```bash
|
|
23
|
-
jive team create
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Requirements:**
|
|
27
|
-
- Must be authenticated (run `jive login` first)
|
|
28
|
-
|
|
29
|
-
**Interactive Prompts:**
|
|
30
|
-
- **Team name:** Name for the team (minimum 3 characters)
|
|
31
|
-
- **Description:** Optional description of the team's purpose
|
|
32
|
-
|
|
33
|
-
**Process:**
|
|
34
|
-
1. Prompts for team name and description
|
|
35
|
-
2. Validates team name (minimum 3 characters)
|
|
36
|
-
3. Calls the Jive API to create team (`POST /api/teams`)
|
|
37
|
-
4. Updates credentials if a new API token is issued
|
|
38
|
-
5. Displays success message with team ID
|
|
39
|
-
|
|
40
|
-
**Output:**
|
|
41
|
-
```
|
|
42
|
-
Team created successfully!
|
|
43
|
-
Team ID: team-abc123
|
|
44
|
-
|
|
45
|
-
Next step: Initialize Jive in your project
|
|
46
|
-
Run: jive init
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Team Structure:**
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"id": "team-abc123",
|
|
53
|
-
"name": "My Team",
|
|
54
|
-
"description": "Team for AI development",
|
|
55
|
-
"createdAt": "2025-01-15T10:30:00.000Z",
|
|
56
|
-
"members": [
|
|
57
|
-
{
|
|
58
|
-
"id": "user-123",
|
|
59
|
-
"email": "user@example.com",
|
|
60
|
-
"role": "owner"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**Notes:**
|
|
67
|
-
- You are automatically added as the team owner
|
|
68
|
-
- The team creator has full permissions
|
|
69
|
-
- You can create multiple teams
|
|
70
|
-
|
|
71
|
-
**Error Conditions:**
|
|
72
|
-
- Not authenticated
|
|
73
|
-
- Team name too short (< 3 characters)
|
|
74
|
-
- Network connectivity issues
|
|
75
|
-
|
|
76
|
-
**Implementation:** `src/commands/team.ts` (teamCommands.create)
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
### `jive team list`
|
|
81
|
-
|
|
82
|
-
List all teams you're a member of.
|
|
83
|
-
|
|
84
|
-
**Usage:**
|
|
85
|
-
```bash
|
|
86
|
-
jive team list
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Requirements:**
|
|
90
|
-
- Must be authenticated
|
|
91
|
-
|
|
92
|
-
**Process:**
|
|
93
|
-
1. Fetches teams from Jive API (`GET /api/teams`)
|
|
94
|
-
2. Displays team information in a formatted list
|
|
95
|
-
3. Highlights the active team (if in a Jive-initialized project)
|
|
96
|
-
|
|
97
|
-
**Output:**
|
|
98
|
-
```
|
|
99
|
-
Your teams:
|
|
100
|
-
* My Team (team-abc123) [Active]
|
|
101
|
-
Engineering Team (team-xyz789)
|
|
102
|
-
Design Team (team-def456)
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**Notes:**
|
|
106
|
-
- Green asterisk (*) indicates the active team in the current project
|
|
107
|
-
- "Active" label shows which team is selected for the current project
|
|
108
|
-
- If not in a Jive project, no team is marked as active
|
|
109
|
-
|
|
110
|
-
**Related Commands:**
|
|
111
|
-
- `jive team switch` - Change the active team
|
|
112
|
-
- `jive init` - Set the active team during project initialization
|
|
113
|
-
|
|
114
|
-
**Error Conditions:**
|
|
115
|
-
- Not authenticated
|
|
116
|
-
- Network connectivity issues
|
|
117
|
-
- No teams found (displays "You are not a member of any teams")
|
|
118
|
-
|
|
119
|
-
**Implementation:** `src/commands/team.ts` (teamCommands.list)
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
### `jive team switch`
|
|
124
|
-
|
|
125
|
-
Switch the active team for the current project.
|
|
126
|
-
|
|
127
|
-
**Usage:**
|
|
128
|
-
```bash
|
|
129
|
-
jive team switch
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**Requirements:**
|
|
133
|
-
- Must be authenticated
|
|
134
|
-
- Must be in a Jive-initialized project (`.jive/config.json` exists)
|
|
135
|
-
|
|
136
|
-
**Interactive Prompts:**
|
|
137
|
-
- **Select a team:** Interactive menu of available teams
|
|
138
|
-
|
|
139
|
-
**Process:**
|
|
140
|
-
1. Fetches all teams you're a member of
|
|
141
|
-
2. Displays interactive selection menu
|
|
142
|
-
3. Updates `activeTeamId` in `.jive/config.json`
|
|
143
|
-
4. Displays success message
|
|
144
|
-
|
|
145
|
-
**Output:**
|
|
146
|
-
```
|
|
147
|
-
? Select a team: (Use arrow keys)
|
|
148
|
-
❯ My Team (team-abc123)
|
|
149
|
-
Engineering Team (team-xyz789)
|
|
150
|
-
Design Team (team-def456)
|
|
151
|
-
|
|
152
|
-
Switched to team: My Team
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Configuration Update:**
|
|
156
|
-
|
|
157
|
-
Before:
|
|
158
|
-
```json
|
|
159
|
-
{
|
|
160
|
-
"activeTeamId": "team-xyz789",
|
|
161
|
-
"apiUrl": "https://next.getjive.app"
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
After:
|
|
166
|
-
```json
|
|
167
|
-
{
|
|
168
|
-
"activeTeamId": "team-abc123",
|
|
169
|
-
"apiUrl": "https://next.getjive.app"
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Notes:**
|
|
174
|
-
- Switching teams changes which subagents and MCP servers you're working with
|
|
175
|
-
- The same API authentication token works for all teams
|
|
176
|
-
- You may want to run `jive sync` after switching to pull the new team's resources
|
|
177
|
-
|
|
178
|
-
**Workflow:**
|
|
179
|
-
```bash
|
|
180
|
-
# Switch to a different team
|
|
181
|
-
jive team switch
|
|
182
|
-
|
|
183
|
-
# Pull the new team's resources
|
|
184
|
-
jive sync
|
|
185
|
-
|
|
186
|
-
# Restart Claude Code to apply changes
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Error Conditions:**
|
|
190
|
-
- Not authenticated
|
|
191
|
-
- Project not initialized (no `.jive/config.json`)
|
|
192
|
-
- No teams available
|
|
193
|
-
- User cancels selection
|
|
194
|
-
|
|
195
|
-
**Implementation:** `src/commands/team.ts` (teamCommands.switch)
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
### `jive team invite <email>`
|
|
200
|
-
|
|
201
|
-
Invite a user to join your team.
|
|
202
|
-
|
|
203
|
-
**Usage:**
|
|
204
|
-
```bash
|
|
205
|
-
jive team invite <email>
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Arguments:**
|
|
209
|
-
- `<email>` (required) - Email address of the user to invite
|
|
210
|
-
|
|
211
|
-
**Requirements:**
|
|
212
|
-
- Must be authenticated
|
|
213
|
-
- Must be in a Jive-initialized project
|
|
214
|
-
- Must have permission to invite users (typically team owner/admin)
|
|
215
|
-
|
|
216
|
-
**Process:**
|
|
217
|
-
1. Gets the active team ID from `.jive/config.json`
|
|
218
|
-
2. Validates email format
|
|
219
|
-
3. Calls the Jive API to send invitation (`POST /api/teams/{teamId}/invite`)
|
|
220
|
-
4. Server sends invitation email to the user
|
|
221
|
-
|
|
222
|
-
**Output:**
|
|
223
|
-
```
|
|
224
|
-
Invitation sent to user@example.com
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Examples:**
|
|
228
|
-
```bash
|
|
229
|
-
# Invite a user by email
|
|
230
|
-
jive team invite colleague@example.com
|
|
231
|
-
|
|
232
|
-
# Invite multiple users (run command multiple times)
|
|
233
|
-
jive team invite user1@example.com
|
|
234
|
-
jive team invite user2@example.com
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
**Invitation Email:**
|
|
238
|
-
|
|
239
|
-
The invited user receives an email with:
|
|
240
|
-
- Team name and description
|
|
241
|
-
- Invitation link to accept
|
|
242
|
-
- Instructions for joining
|
|
243
|
-
|
|
244
|
-
**Accepting Invitations:**
|
|
245
|
-
|
|
246
|
-
Users can accept invitations by:
|
|
247
|
-
1. Clicking the link in the invitation email
|
|
248
|
-
2. Logging in or signing up for Jive
|
|
249
|
-
3. Accepting the team invitation
|
|
250
|
-
|
|
251
|
-
After accepting:
|
|
252
|
-
- User appears in `jive team list`
|
|
253
|
-
- User can access team resources
|
|
254
|
-
- User can run `jive init` to connect projects to the team
|
|
255
|
-
|
|
256
|
-
**Notes:**
|
|
257
|
-
- Invitations are sent via email
|
|
258
|
-
- Users must have a Jive account (or create one) to accept
|
|
259
|
-
- There's no limit to the number of team members
|
|
260
|
-
|
|
261
|
-
**Error Conditions:**
|
|
262
|
-
- Not authenticated
|
|
263
|
-
- Project not initialized
|
|
264
|
-
- Invalid email format
|
|
265
|
-
- User already on the team
|
|
266
|
-
- Network connectivity issues
|
|
267
|
-
- Insufficient permissions
|
|
268
|
-
|
|
269
|
-
**Implementation:** `src/commands/team.ts` (teamCommands.invite)
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
## Team Workflows
|
|
274
|
-
|
|
275
|
-
### Creating a Team and Onboarding Members
|
|
276
|
-
|
|
277
|
-
1. **Create the team:**
|
|
278
|
-
```bash
|
|
279
|
-
jive team create
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
2. **Initialize in your project:**
|
|
283
|
-
```bash
|
|
284
|
-
cd my-project
|
|
285
|
-
jive init
|
|
286
|
-
```
|
|
287
|
-
Select the newly created team when prompted.
|
|
288
|
-
|
|
289
|
-
3. **Add team resources:**
|
|
290
|
-
```bash
|
|
291
|
-
# Create subagents
|
|
292
|
-
jive subagents create
|
|
293
|
-
|
|
294
|
-
# Add MCP servers
|
|
295
|
-
jive mcp add my-server
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
4. **Invite team members:**
|
|
299
|
-
```bash
|
|
300
|
-
jive team invite teammate1@example.com
|
|
301
|
-
jive team invite teammate2@example.com
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
5. **Team members join:**
|
|
305
|
-
- Accept email invitation
|
|
306
|
-
- Run `jive login` (or `jive signup` if new)
|
|
307
|
-
- Run `jive init` in their local project
|
|
308
|
-
- Select the team
|
|
309
|
-
- Run `jive sync` to pull resources
|
|
310
|
-
|
|
311
|
-
### Working Across Multiple Teams
|
|
312
|
-
|
|
313
|
-
1. **List your teams:**
|
|
314
|
-
```bash
|
|
315
|
-
jive team list
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
2. **Switch teams in a project:**
|
|
319
|
-
```bash
|
|
320
|
-
jive team switch
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
3. **Sync resources:**
|
|
324
|
-
```bash
|
|
325
|
-
jive sync
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
4. **Verify the active team:**
|
|
329
|
-
```bash
|
|
330
|
-
jive status
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### Managing Team Resources
|
|
334
|
-
|
|
335
|
-
**View team resources:**
|
|
336
|
-
```bash
|
|
337
|
-
# List team subagents
|
|
338
|
-
jive subagents list
|
|
339
|
-
|
|
340
|
-
# List team MCP servers
|
|
341
|
-
jive mcp list
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
**Share resources with the team:**
|
|
345
|
-
```bash
|
|
346
|
-
# Push local subagents
|
|
347
|
-
jive subagents push
|
|
348
|
-
|
|
349
|
-
# Push local MCP servers
|
|
350
|
-
jive mcp push
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
**Get resources from the team:**
|
|
354
|
-
```bash
|
|
355
|
-
# Pull team subagents
|
|
356
|
-
jive subagents pull
|
|
357
|
-
|
|
358
|
-
# Pull team MCP servers
|
|
359
|
-
jive mcp pull
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
## Team Configuration
|
|
363
|
-
|
|
364
|
-
### Project-Level Configuration
|
|
365
|
-
|
|
366
|
-
Each project stores its active team in `.jive/config.json`:
|
|
367
|
-
|
|
368
|
-
```json
|
|
369
|
-
{
|
|
370
|
-
"activeTeamId": "team-abc123",
|
|
371
|
-
"apiUrl": "https://next.getjive.app",
|
|
372
|
-
"telemetry": {
|
|
373
|
-
"enabled": true
|
|
374
|
-
},
|
|
375
|
-
"lastSync": "2025-01-15T10:30:00.000Z"
|
|
376
|
-
}
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
**Important:** This file should be in `.gitignore` to prevent committing team IDs to version control.
|
|
380
|
-
|
|
381
|
-
### User-Level Authentication
|
|
382
|
-
|
|
383
|
-
Team access is controlled by authentication credentials in `~/.jive/credentials.json`:
|
|
384
|
-
|
|
385
|
-
```json
|
|
386
|
-
{
|
|
387
|
-
"token": "auth-token-here",
|
|
388
|
-
"userId": "user-123",
|
|
389
|
-
"email": "user@example.com"
|
|
390
|
-
}
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
The same token provides access to all teams you're a member of.
|
|
394
|
-
|
|
395
|
-
## Team Permissions
|
|
396
|
-
|
|
397
|
-
### Roles (Conceptual)
|
|
398
|
-
|
|
399
|
-
While not fully implemented in the current version, teams typically have:
|
|
400
|
-
|
|
401
|
-
- **Owner:** Full control, can manage members and settings
|
|
402
|
-
- **Admin:** Can invite members and manage resources
|
|
403
|
-
- **Member:** Can access and contribute to team resources
|
|
404
|
-
|
|
405
|
-
### Current Behavior
|
|
406
|
-
|
|
407
|
-
In the current implementation:
|
|
408
|
-
- Team creators have full permissions
|
|
409
|
-
- All team members can access team resources
|
|
410
|
-
- All members can push/pull subagents and MCP servers
|
|
411
|
-
|
|
412
|
-
## Troubleshooting
|
|
413
|
-
|
|
414
|
-
### "Project not initialized" Error
|
|
415
|
-
|
|
416
|
-
**Symptom:** Team commands fail with "Project not initialized in this directory"
|
|
417
|
-
|
|
418
|
-
**Solution:**
|
|
419
|
-
```bash
|
|
420
|
-
jive init
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
This creates `.jive/config.json` with the active team ID.
|
|
424
|
-
|
|
425
|
-
### "Not a member of any teams" Error
|
|
426
|
-
|
|
427
|
-
**Symptom:** `jive team list` shows no teams
|
|
428
|
-
|
|
429
|
-
**Solutions:**
|
|
430
|
-
1. Create a team:
|
|
431
|
-
```bash
|
|
432
|
-
jive team create
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
2. Accept an invitation (check email)
|
|
436
|
-
|
|
437
|
-
3. Verify authentication:
|
|
438
|
-
```bash
|
|
439
|
-
jive login
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
### Wrong Team Selected
|
|
443
|
-
|
|
444
|
-
**Symptom:** Wrong team's resources are being pulled
|
|
445
|
-
|
|
446
|
-
**Solutions:**
|
|
447
|
-
1. Check active team:
|
|
448
|
-
```bash
|
|
449
|
-
jive team list
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
2. Switch teams:
|
|
453
|
-
```bash
|
|
454
|
-
jive team switch
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
3. Verify change:
|
|
458
|
-
```bash
|
|
459
|
-
jive status
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
### Cannot Invite Users
|
|
463
|
-
|
|
464
|
-
**Symptom:** Invitation fails or email not sent
|
|
465
|
-
|
|
466
|
-
**Solutions:**
|
|
467
|
-
1. Verify you're in a Jive project:
|
|
468
|
-
```bash
|
|
469
|
-
ls .jive/config.json
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
2. Check authentication:
|
|
473
|
-
```bash
|
|
474
|
-
jive doctor
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
3. Verify email format is correct
|
|
478
|
-
|
|
479
|
-
4. Check network connectivity
|
|
480
|
-
|
|
481
|
-
## Related Commands
|
|
482
|
-
|
|
483
|
-
- [`jive init`](./init.md#jive-init) - Initialize project and select team
|
|
484
|
-
- [`jive sync`](./sync.md#jive-sync) - Sync team resources
|
|
485
|
-
- [`jive status`](./sync.md#jive-status) - View active team
|
|
486
|
-
- [`jive doctor`](./init.md#jive-doctor) - Verify team configuration
|
|
487
|
-
|
|
488
|
-
## API Endpoints
|
|
489
|
-
|
|
490
|
-
**Team Management:**
|
|
491
|
-
- `POST /api/teams` - Create team
|
|
492
|
-
- `GET /api/teams` - List user's teams
|
|
493
|
-
- `POST /api/teams/{teamId}/invite` - Invite user
|
|
494
|
-
|
|
495
|
-
**Team Resources:**
|
|
496
|
-
- `GET /api/teams/{teamId}/subagents` - List team subagents
|
|
497
|
-
- `GET /api/teams/{teamId}/mcp-servers` - List team MCP servers
|
|
498
|
-
- `POST /api/teams/{teamId}/subagents` - Create subagent for team
|
|
499
|
-
- `POST /api/teams/{teamId}/mcp-servers` - Create MCP server for team
|
|
500
|
-
|
|
501
|
-
## Implementation Details
|
|
502
|
-
|
|
503
|
-
**Source Files:**
|
|
504
|
-
- Main implementation: `src/commands/team.ts`
|
|
505
|
-
- Configuration helpers: `src/lib/config.ts`
|
|
506
|
-
- API client: `src/lib/api-client.ts`
|
|
507
|
-
|
|
508
|
-
**Key Functions:**
|
|
509
|
-
- `teamCommands.create()` - Creates new team
|
|
510
|
-
- `teamCommands.list()` - Lists user's teams
|
|
511
|
-
- `teamCommands.switch()` - Changes active team
|
|
512
|
-
- `teamCommands.invite()` - Invites user to team
|
|
513
|
-
- `getActiveTeamId()` - Gets team ID from project config
|
|
514
|
-
- `requireProjectConfig()` - Ensures project is initialized
|