gitspace 0.2.0-rc.23 → 0.2.0-rc.25

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 (2) hide show
  1. package/README.md +94 -113
  2. package/package.json +9 -6
package/README.md CHANGED
@@ -77,7 +77,7 @@ You can also use traditional CLI commands:
77
77
  #### 1. Add Your First Project
78
78
 
79
79
  ```bash
80
- gssh add project
80
+ gssh project add
81
81
  ```
82
82
 
83
83
  Select a GitHub repository, and GitSpace will:
@@ -90,20 +90,20 @@ Select a GitHub repository, and GitSpace will:
90
90
 
91
91
  ```bash
92
92
  # Create a workspace from a Linear issue (if configured)
93
- gssh add
93
+ gssh workspace add --project my-project
94
94
 
95
95
  # Or create a workspace with a custom name
96
- gssh add my-feature
96
+ gssh workspace add my-feature --project my-project
97
97
  ```
98
98
 
99
- #### 3. Switch Between Workspaces
99
+ #### 3. Target a Workspace
100
100
 
101
101
  ```bash
102
- # Interactive selection
103
- gssh switch
102
+ # List workspaces in a project
103
+ gssh workspace list --project <project-name>
104
104
 
105
- # Switch to a specific workspace
106
- gssh switch my-feature
105
+ # Show context for a specific workspace
106
+ gssh workspace context --project my-project --workspace my-feature
107
107
  ```
108
108
 
109
109
  ### Workspace Session Mode (`space`)
@@ -112,7 +112,7 @@ When GitSpace opens a workspace-scoped terminal session, it injects a `space` sh
112
112
 
113
113
  - Use `space ...` for workspace operations without repeating `--project` and `--workspace`
114
114
  - `gssh` commands are restricted in this mode to avoid cross-workspace mistakes
115
- - `gssh tmux ...` is blocked inside workspace sessions
115
+ - `gssh machine tmux ...` is blocked inside workspace sessions
116
116
 
117
117
  Examples:
118
118
 
@@ -226,8 +226,8 @@ fi
226
226
  Bundles can be loaded from:
227
227
 
228
228
  1. **In-repo** (automatic): `.gitspace/` directory in the cloned repository
229
- 2. **Local path**: `gssh add project --bundle-path /path/to/bundle/`
230
- 3. **Remote URL**: `gssh add project --bundle-url https://example.com/bundle.zip`
229
+ 2. **Local path**: `gssh project add --bundle-path /path/to/bundle/`
230
+ 3. **Remote URL**: `gssh project add --bundle-url https://example.com/bundle.zip`
231
231
 
232
232
  ## Commands Reference
233
233
 
@@ -235,12 +235,12 @@ Bundles can be loaded from:
235
235
 
236
236
  Launch the interactive terminal UI.
237
237
 
238
- ### `gssh add project`
238
+ ### `gssh project add`
239
239
 
240
240
  Add a new project from GitHub.
241
241
 
242
242
  ```bash
243
- gssh add project [options]
243
+ gssh project add [options]
244
244
 
245
245
  Options:
246
246
  --bundle-url <url> Load bundle from remote URL (zip archive)
@@ -251,12 +251,12 @@ Options:
251
251
  --linear-key <key> Provide Linear API key via flag
252
252
  ```
253
253
 
254
- ### `gssh add [workspace-name]`
254
+ ### `gssh workspace add [workspace-name] --project <project-name>`
255
255
 
256
256
  Create a new workspace in the current project.
257
257
 
258
258
  ```bash
259
- gssh add [workspace-name] [options]
259
+ gssh workspace add [workspace-name] --project <project-name> [options]
260
260
 
261
261
  Options:
262
262
  --branch <name> Specify different branch name from workspace name
@@ -264,70 +264,52 @@ Options:
264
264
  --no-setup Skip setup commands
265
265
  ```
266
266
 
267
- ### `gssh switch [workspace-name]`
267
+ ### `gssh workspace context --project <project-name> --workspace <workspace-name>`
268
268
 
269
- Switch to a workspace in the current project.
269
+ Show the resolved workspace context.
270
270
 
271
271
  ```bash
272
- gssh switch [workspace-name]
273
- # Alias: gssh sw
272
+ gssh workspace context --project <project-name> --workspace <workspace-name>
274
273
  ```
275
274
 
276
- ### `gssh switch project [project-name]`
275
+ Use `--project` on workspace commands to target a project.
277
276
 
278
- Switch to a different project.
279
-
280
- ### `gssh list [subcommand]`
277
+ ### `gssh project list` / `gssh workspace list --project <project-name>`
281
278
 
282
279
  List projects or workspaces.
283
280
 
284
281
  ```bash
285
- gssh list [subcommand] [options]
286
- # Alias: gssh ls
287
-
288
- Subcommands:
289
- projects List all projects
290
- workspaces List workspaces in current project (default)
282
+ gssh project list [options]
283
+ gssh workspace list --project <project-name> [options]
291
284
 
292
285
  Options:
293
286
  --json Output in JSON format
294
287
  --verbose Show additional details
295
288
  ```
296
289
 
297
- ### `gssh remove workspace [workspace-name]`
290
+ ### `gssh workspace remove [workspace-name] --project <project-name>`
298
291
 
299
292
  Remove a workspace.
300
293
 
301
294
  ```bash
302
- gssh remove workspace [workspace-name] [options]
303
- # Alias: gssh rm workspace
295
+ gssh workspace remove [workspace-name] --project <project-name> [options]
304
296
 
305
297
  Options:
306
298
  --force Skip confirmation prompts
307
299
  --keep-branch Don't delete git branch when removing workspace
308
300
  ```
309
301
 
310
- ### `gssh remove project [project-name]`
302
+ ### `gssh project remove [project-name]`
311
303
 
312
304
  Remove a project.
313
305
 
314
306
  ```bash
315
- gssh remove project [project-name] [options]
316
- # Alias: gssh rm project
307
+ gssh project remove [project-name] [options]
317
308
 
318
309
  Options:
319
310
  --force Skip confirmation prompts
320
311
  ```
321
312
 
322
- ### `gssh directory`
323
-
324
- Print the current project directory path.
325
-
326
- ```bash
327
- gssh directory
328
- # Alias: gssh dir
329
- ```
330
-
331
313
  ## Configuration
332
314
 
333
315
  ### Global Configuration
@@ -405,9 +387,6 @@ inside each workspace so they can vary by branch:
405
387
  ### Environment Variables
406
388
 
407
389
  ```bash
408
- # Set the current project (overrides global config)
409
- export SPACES_CURRENT_PROJECT="my-app"
410
-
411
390
  # Available in scripts (from bundle onboarding):
412
391
  # <KEY> - Value by exact bundle config key name
413
392
  # <NORMALIZED_KEY> - Uppercase snake-case alias (e.g. teamName -> TEAM_NAME)
@@ -444,18 +423,27 @@ GitSpace provides secure remote terminal access with **end-to-end encryption**.
444
423
  The easiest way to get remote access is through [gitspace.sh](https://gitspace.sh):
445
424
 
446
425
  ```bash
447
- # 1. Authenticate with GitHub
448
- gssh auth login
426
+ # 1. Initialize machine identity on your control host
427
+ gssh user identity init
428
+ gssh user identity show
429
+
430
+ # 2. Authenticate with gitspace.sh
431
+ gssh user auth login
449
432
 
450
- # 2. Reserve your subdomain (e.g., yourname.gitspace.sh)
451
- gssh host reserve yourname
433
+ # 3. Reserve your subdomain (e.g., yourname.gitspace.sh)
434
+ gssh user host reserve yourname
435
+ gssh user host status
452
436
 
453
- # 3. Start serving (creates identity if needed)
454
- gssh serve
437
+ # 4. Start serving
438
+ gssh machine serve start
439
+ gssh machine serve status
440
+ gssh status
455
441
 
456
- # 4. Access from browser at https://yourname.gitspace.sh
442
+ # 5. Access from browser at https://yourname.gitspace.sh
457
443
  ```
458
444
 
445
+ In hosted mode, this machine is your control node (owner): it runs the relay path, maintains access state, and is the place cloud-control state/secrets are managed.
446
+
459
447
  ### Self-Hosted Setup
460
448
 
461
449
  For complete control, run your own relay:
@@ -464,14 +452,13 @@ For complete control, run your own relay:
464
452
  # Terminal 1: Start relay server
465
453
  gssh relay start --port 4480
466
454
 
467
- # Terminal 2: Initialize identity and start serving
468
- gssh identity init --label "My MacBook"
469
- gssh serve --relay ws://localhost:4480/ws
470
-
471
- # Terminal 3: Create invite for remote access
472
- gssh share create
455
+ # Terminal 2: Create relay-machine invite token
456
+ gssh invite relay-machine create --relay ws://localhost:4480/ws --machine-signing-key <BASE64_ED25519_PUB> --machine-key-exchange-key <BASE64_X25519_PUB> --label "My MacBook"
473
457
 
474
- # Share the invite URL with collaborators
458
+ # Terminal 3: Initialize identity, enroll, and start serving
459
+ gssh user identity init
460
+ gssh machine enroll --invite "ws://localhost:4480/ws#<TOKEN>" --label "My MacBook"
461
+ gssh machine serve start --relay ws://localhost:4480/ws
475
462
  ```
476
463
 
477
464
  ### Identity Management
@@ -479,68 +466,67 @@ gssh share create
479
466
  Every machine and client has a cryptographic identity (Ed25519 + X25519 keypair):
480
467
 
481
468
  ```bash
482
- # Create machine identity (stored in ~/gitspace/.identity/)
483
- gssh identity init --label "My MacBook"
469
+ # Create machine identity (stored in OS keychain)
470
+ gssh user identity init
484
471
 
485
472
  # View identity fingerprint
486
- gssh identity show
473
+ gssh user identity show
487
474
  ```
488
475
 
489
- ### Access Control
490
-
491
- Control who can connect to your machine:
492
-
493
- ```bash
494
- # List authorized clients
495
- gssh access list
476
+ ### Owner Access Model
496
477
 
497
- # Add a client by public key
498
- gssh access add spcs_pk_abc123... --label "Work Laptop"
478
+ Remote access is owner-only at runtime.
499
479
 
500
- # Remove client access
501
- gssh access remove spcs_pk_abc123...
502
- ```
480
+ - Clients and machines must present device certificates derived from the same owner user root identity.
481
+ - There is no collaborator ACL grant path for relay or machine access.
503
482
 
504
483
  ### Creating Invites
505
484
 
506
- Share access via signed invite tokens:
485
+ Use root-signed invites for machine enrollment only:
507
486
 
508
487
  ```bash
509
- # Create invite (24h default)
510
- gssh share create
488
+ # Create machine enrollment invite token
489
+ gssh invite relay-machine create --relay ws://localhost:4480/ws --machine-signing-key <BASE64_ED25519_PUB> --machine-key-exchange-key <BASE64_X25519_PUB>
511
490
 
512
- # Custom expiration
513
- gssh share create --expires 7d
491
+ # List/revoke enrollment invites
492
+ gssh invite list --relay ws://localhost:4480/ws
493
+ gssh invite revoke <invite-id> --relay ws://localhost:4480/ws
514
494
  ```
515
495
 
516
496
  ### Connecting Remotely
517
497
 
518
498
  ```bash
519
- # Connect using invite token
520
- gssh connect <invite-token>
499
+ # On another owner device: recover the same user root identity
500
+ gssh user identity recover
521
501
 
522
- # Connect via TUI with relay
523
- gssh --relay wss://relay.example.com
502
+ # Connect directly as owner
503
+ gssh client connect <machine-id>
504
+
505
+ # Browse machines on a relay
506
+ gssh client machines list --relay wss://relay.example.com
524
507
  ```
525
508
 
526
509
  ### Remote Access Commands
527
510
 
528
511
  | Command | Description |
529
512
  |---------|-------------|
530
- | `gssh auth login` | Authenticate with gitspace.sh (GitHub OAuth) |
531
- | `gssh auth logout` | Sign out of gitspace.sh |
532
- | `gssh host reserve <name>` | Reserve a subdomain on gitspace.sh |
533
- | `gssh host status` | Show hosting status |
534
- | `gssh identity init` | Create machine/client identity |
535
- | `gssh identity show` | Display identity fingerprint |
536
- | `gssh access add <key>` | Authorize a client |
537
- | `gssh access list` | List authorized clients |
538
- | `gssh access remove <key>` | Revoke client access |
539
- | `gssh serve` | Start machine daemon |
540
- | `gssh serve start` | Start serve as background daemon |
541
- | `gssh serve stop` | Stop background serve daemon |
542
- | `gssh share create` | Create invite token |
543
- | `gssh connect <token>` | Connect to remote machine |
513
+ | `gssh user auth login` | Authenticate with gitspace.sh (GitHub OAuth) |
514
+ | `gssh user auth logout` | Sign out of gitspace.sh |
515
+ | `gssh user host reserve <name>` | Reserve a subdomain on gitspace.sh |
516
+ | `gssh user host status` | Show hosting status |
517
+ | `gssh user identity init` | Create user root identity |
518
+ | `gssh user identity recover` | Recover identity from mnemonic |
519
+ | `gssh user identity show` | Display identity fingerprint |
520
+ | `gssh machine serve start --foreground` | Start machine daemon |
521
+ | `gssh machine serve start` | Start serve as background daemon |
522
+ | `gssh machine serve stop` | Stop background serve daemon |
523
+ | `gssh cloud status` | Show cloud control status on current control node |
524
+ | `gssh cloud list` | List cloud workspaces from control store |
525
+ | `gssh invite relay-machine create --relay <url> --machine-signing-key <k> --machine-key-exchange-key <k>` | Create machine enrollment invite |
526
+ | `gssh invite list --relay <url>` | List root-signed invites |
527
+ | `gssh invite revoke <invite-id> --relay <url>` | Revoke root-signed invite |
528
+ | `gssh client connect <target>` | Connect to remote machine |
529
+ | `gssh client machines list --relay <url>` | List accessible remote machines |
544
530
  | `gssh status` | Show all daemon statuses |
545
531
 
546
532
  ### Relay Server Commands
@@ -550,11 +536,9 @@ For self-hosted relay servers:
550
536
  | Command | Description |
551
537
  |---------|-------------|
552
538
  | `gssh relay start` | Start relay server |
553
- | `gssh relay authorize <key>` | Authorize a machine |
554
- | `gssh relay revoke <key>` | Revoke machine authorization |
555
- | `gssh relay machines` | List registered machines |
556
- | `gssh relay trusted` | List trusted relays |
557
- | `gssh relay untrust <url>` | Remove relay trust |
539
+ | `gssh invite relay-machine create --relay <url> --machine-signing-key <k> --machine-key-exchange-key <k>` | Create machine enrollment invite |
540
+ | `gssh relay machines list` | List registered machines |
541
+ | `gssh relay machines revoke <machine-id>` | Revoke machine registration |
558
542
 
559
543
  ### Terminal Multiplexer (tmux-lite)
560
544
 
@@ -562,12 +546,12 @@ Manage terminal sessions:
562
546
 
563
547
  | Command | Description |
564
548
  |---------|-------------|
565
- | `gssh tmux start` | Start tmux-lite daemon |
566
- | `gssh tmux stop` | Stop tmux-lite daemon |
567
- | `gssh tmux list` | List sessions |
568
- | `gssh tmux attach <id>` | Attach to session |
569
- | `gssh tmux new` | Create new session |
570
- | `gssh tmux kill <id>` | Kill session |
549
+ | `gssh machine tmux start` | Start tmux-lite daemon |
550
+ | `gssh machine tmux stop` | Stop tmux-lite daemon |
551
+ | `gssh machine tmux list` | List sessions |
552
+ | `gssh machine tmux attach <id>` | Attach to session |
553
+ | `gssh machine tmux new` | Create new session |
554
+ | `gssh machine tmux kill <id>` | Kill session |
571
555
 
572
556
  ### Environment Variables
573
557
 
@@ -576,9 +560,6 @@ Manage terminal sessions:
576
560
  RELAY_PORT=4480 # Default relay port
577
561
  RELAY_BIND=0.0.0.0 # Bind address
578
562
 
579
- # Machine identity
580
- GSSH_IDENTITY_PATH=~/gitspace/.identity/ # Identity storage
581
-
582
563
  # gitspace.sh
583
564
  GITSPACE_API_URL=https://api.gitspace.sh # API endpoint
584
565
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitspace",
3
- "version": "0.2.0-rc.23",
3
+ "version": "0.2.0-rc.25",
4
4
  "description": "CLI for managing GitHub workspaces with git worktrees and secure remote terminal access",
5
5
  "bin": {
6
6
  "gssh": "./bin/gssh"
@@ -19,13 +19,14 @@
19
19
  "build": "bun scripts/build.ts",
20
20
  "build:all": "bun scripts/build.ts --all",
21
21
  "build:npm": "bun scripts/build.ts --npm",
22
- "relay": "bun src/relay/index.ts"
22
+ "relay": "bun src/relay/index.ts",
23
+ "e2e:on-demand": "bash scripts/e2e/run-on-demand.sh"
23
24
  },
24
25
  "optionalDependencies": {
25
- "@gitspace/darwin-arm64": "0.2.0-rc.23",
26
- "@gitspace/darwin-x64": "0.2.0-rc.23",
27
- "@gitspace/linux-x64": "0.2.0-rc.23",
28
- "@gitspace/linux-arm64": "0.2.0-rc.23"
26
+ "@gitspace/darwin-arm64": "0.2.0-rc.25",
27
+ "@gitspace/darwin-x64": "0.2.0-rc.25",
28
+ "@gitspace/linux-x64": "0.2.0-rc.25",
29
+ "@gitspace/linux-arm64": "0.2.0-rc.25"
29
30
  },
30
31
  "keywords": [
31
32
  "cli",
@@ -45,6 +46,7 @@
45
46
  "author": "inKibra, Inc.",
46
47
  "license": "SEE LICENSE IN LICENSE",
47
48
  "dependencies": {
49
+ "@fly/sprites": "0.0.1-rc37",
48
50
  "@inquirer/prompts": "^7.10.1",
49
51
  "@linear/sdk": "^29.0.0",
50
52
  "@noble/curves": "^2.0.1",
@@ -52,6 +54,7 @@
52
54
  "@opentui-ui/toast": "^0.0.5",
53
55
  "@opentui/core": "^0.1.77",
54
56
  "@opentui/react": "^0.1.77",
57
+ "@scure/bip39": "^2.0.1",
55
58
  "@types/ws": "^8.18.1",
56
59
  "@xterm/addon-serialize": "^0.13.0",
57
60
  "@xterm/headless": "^5.5.0",