@flydocs/cli 0.6.0-alpha.1 → 0.6.0-alpha.2

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/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ var CLI_VERSION, CLI_NAME, PACKAGE_NAME, POSTHOG_API_KEY;
15
15
  var init_constants = __esm({
16
16
  "src/lib/constants.ts"() {
17
17
  "use strict";
18
- CLI_VERSION = "0.6.0-alpha.1";
18
+ CLI_VERSION = "0.6.0-alpha.2";
19
19
  CLI_NAME = "flydocs";
20
20
  PACKAGE_NAME = "@flydocs/cli";
21
21
  POSTHOG_API_KEY = "phc_v1MSJTQDFkMS90CBh3mxIz3v8bYCCnKU6v1ir6bz0Xn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flydocs/cli",
3
- "version": "0.6.0-alpha.1",
3
+ "version": "0.6.0-alpha.2",
4
4
  "type": "module",
5
5
  "description": "FlyDocs AI CLI — install, setup, and manage FlyDocs projects",
6
6
  "bin": {
@@ -301,7 +301,7 @@ FLYDOCS_API_KEY is not set. Run `flydocs connect` first to set up your API key.
301
301
 
302
302
  Do not proceed until the key is available.
303
303
 
304
- **Step 2: Select team.**
304
+ **Step 2: Select or create team.**
305
305
 
306
306
  If `provider.teamId` in config is null, discover available teams:
307
307
 
@@ -309,10 +309,23 @@ If `provider.teamId` in config is null, discover available teams:
309
309
  python3 .claude/skills/flydocs-cloud/scripts/list_teams.py
310
310
  ```
311
311
 
312
- Present the teams to the user as a numbered list showing name and key. Let
313
- them select. If only one team exists, confirm it.
312
+ Present the teams to the user as a numbered list showing name and key.
313
+ Add a final option: **"Create a new team"**. If only one team exists,
314
+ confirm it.
314
315
 
315
- After selection, store the preference on the relay and in local config:
316
+ If the user selects **"Create a new team"**:
317
+
318
+ 1. Ask for team name (required) and key (optional — auto-generated if omitted)
319
+ 2. Ask if this should be a sub-team under an existing team (show the list
320
+ again for parent selection, or "None — top-level team")
321
+ 3. Create via:
322
+
323
+ ```bash
324
+ python3 .claude/skills/flydocs-cloud/scripts/create_team.py --name "Team Name" [--key KEY] [--parent <parent_team_id>]
325
+ ```
326
+
327
+ After selection or creation, store the preference on the relay and in local
328
+ config:
316
329
 
317
330
  ```bash
318
331
  python3 .claude/skills/flydocs-cloud/scripts/set_team.py <team_id>
@@ -58,12 +58,13 @@ All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
58
58
 
59
59
  ### Workspace Scripts
60
60
 
61
- | Script | Usage | Output |
62
- | ---------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------- |
63
- | `list_teams.py` | (no args) | `[{id, name, key}]` |
64
- | `set_team.py` | `<team_id>` | `{success}` — updates relay preference and local config `provider.teamId` |
65
- | `list_labels.py` | (no args) | `[{id, name, color}]` — requires team to be set first |
66
- | `set_labels.py` | `--defaults '["a"]' --type-map '{"feature":["F"],...}' \| stdin` | `{success, validated, defaults, typeMap}` — stores label config on relay |
61
+ | Script | Usage | Output |
62
+ | ---------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------- |
63
+ | `list_teams.py` | (no args) | `[{id, name, key}]` |
64
+ | `create_team.py` | `--name "..." [--key KEY] [--description "..."] [--parent <team_id>]` | `{id, name, key}` — `--parent` creates a sub-team |
65
+ | `set_team.py` | `<team_id>` | `{success}` — updates relay preference and local config `provider.teamId` |
66
+ | `list_labels.py` | (no args) | `[{id, name, color}]` — requires team to be set first |
67
+ | `set_labels.py` | `--defaults '["a"]' --type-map '{"feature":["F"],...}' \| stdin` | `{success, validated, defaults, typeMap}` — stores label config on relay |
67
68
 
68
69
  ### Script Notes
69
70
 
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env python3
2
+ """Create a team (or sub-team) via the FlyDocs Relay API."""
3
+
4
+ import argparse
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ sys.path.insert(0, str(Path(__file__).parent))
9
+ from flydocs_api import get_client, output_json
10
+
11
+
12
+ def main():
13
+ parser = argparse.ArgumentParser(description="Create team")
14
+ parser.add_argument("--name", required=True)
15
+ parser.add_argument("--key", default=None, help="Team key (e.g., PROD). Auto-generated if omitted.")
16
+ parser.add_argument("--description", default=None)
17
+ parser.add_argument("--parent", default=None, dest="parent_id", help="Parent team ID to create a sub-team")
18
+ args = parser.parse_args()
19
+
20
+ body: dict = {"name": args.name}
21
+ if args.key:
22
+ body["key"] = args.key
23
+ if args.description:
24
+ body["description"] = args.description
25
+ if args.parent_id:
26
+ body["parentId"] = args.parent_id
27
+
28
+ client = get_client()
29
+ result = client.post("/teams", body)
30
+
31
+ output_json({
32
+ "id": result["id"],
33
+ "name": result["name"],
34
+ "key": result.get("key", ""),
35
+ })
36
+
37
+
38
+ if __name__ == "__main__":
39
+ main()
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.1",
2
+ "version": "0.6.0-alpha.2",
3
3
  "sourceRepo": "github.com/plastrlab/flydocs-core",
4
4
  "tier": "local",
5
5
  "setupComplete": false,
@@ -1 +1 @@
1
- 0.6.0-alpha.1
1
+ 0.6.0-alpha.2
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.1",
2
+ "version": "0.6.0-alpha.2",
3
3
  "description": "FlyDocs Core - Manifest of all managed files",
4
4
  "repository": "github.com/plastrlab/flydocs-core",
5
5