@computesdk/cli 1.0.16 → 2.0.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.
- package/README.md +50 -0
- package/dist/index.d.ts +1 -19
- package/dist/index.js +104 -1482
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @computesdk/cli
|
|
2
|
+
|
|
3
|
+
The `compute` CLI for the ComputeSDK platform — Actions CI, the compute market,
|
|
4
|
+
sandboxes, and the benchmarks toolchain.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm i -g @computesdk/cli # or: pnpm dlx @computesdk/cli <cmd>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Login
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
compute login # OAuth device flow → ~/.benchsdk/credentials.json
|
|
16
|
+
compute logout # clear stored credentials
|
|
17
|
+
compute --login / --logout # same, as flags
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Login uses the same OAuth device flow as `bench auth login` — every first-party
|
|
21
|
+
CLI shares one credential store (`~/.benchsdk/credentials.json`) and refresh
|
|
22
|
+
tokens renew automatically.
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
compute actions … # Actions API — repos, dispatch, runs, logs, vault
|
|
28
|
+
compute market … # sell side of the compute market
|
|
29
|
+
compute sandboxes … # platform sandbox control plane
|
|
30
|
+
compute bench … # benchmarks CLI (run, auth, org, results, …)
|
|
31
|
+
compute providers # sandbox provider credential status
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
All platform commands accept `--api-key` / `COMPUTE_API_KEY` and fall back to
|
|
35
|
+
the stored OAuth credentials.
|
|
36
|
+
|
|
37
|
+
## Migrating from @computesdk/cli 1.x
|
|
38
|
+
|
|
39
|
+
v2 removes the legacy console authentication and its commands:
|
|
40
|
+
|
|
41
|
+
- **Removed commands**: `compute create`, `compute sandbox`, `compute connect`,
|
|
42
|
+
`compute workspace`, `compute run`, and the interactive REPL. Sandbox
|
|
43
|
+
management moved to `compute sandboxes`, which drives the platform's
|
|
44
|
+
`/api/v1/sandboxes` API.
|
|
45
|
+
- **Auth**: `compute login` no longer opens a browser flow against
|
|
46
|
+
console.computesdk.com or writes `~/.computesdk/credentials.json` — that
|
|
47
|
+
credential store is gone. `compute login` now runs the platform's OAuth
|
|
48
|
+
device flow and writes `~/.benchsdk/credentials.json` (the same store `bench
|
|
49
|
+
auth login` uses). Run `compute login` once after upgrading.
|
|
50
|
+
- `compute providers` is unchanged.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @computesdk/cli
|
|
3
|
-
*
|
|
4
|
-
* ComputeSDK CLI - Cloud-native workspace management.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* compute # interactive workspace creation
|
|
8
|
-
* compute owner/repo # create workspace for repo
|
|
9
|
-
* compute --repo owner/repo --branch fix-auth
|
|
10
|
-
* compute workspace # manage existing workspaces
|
|
11
|
-
* compute exec <id> <cmd...> # run command in sandbox
|
|
12
|
-
* compute connect <id> # open REPL against sandbox
|
|
13
|
-
* compute destroy <id...> # destroy sandboxes
|
|
14
|
-
* compute run -- <cmd...> # create + exec + optional destroy
|
|
15
|
-
* compute providers # list configured providers
|
|
16
|
-
*/
|
|
17
1
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export { shellEscape };
|
|
2
|
+
export { }
|