@gitterm/cli 0.1.0 → 0.2.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 +38 -2
- package/dist/index.js +138435 -10628
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,42 @@ gitterm workspace pause <workspaceId>
|
|
|
27
27
|
gitterm workspace restart <workspaceId>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Remote sandboxes
|
|
31
|
+
|
|
32
|
+
Run builds, tests, and previews in a sandbox without a remote agent. Accounts live in
|
|
33
|
+
`~/.config/gitterm/sandbox.json`, which holds names only. Keys come from environment
|
|
34
|
+
variables:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"account": "e2b",
|
|
39
|
+
"accounts": {
|
|
40
|
+
"e2b": { "mode": "direct", "provider": "e2b", "apiKeyEnv": "E2B_API_KEY" },
|
|
41
|
+
"gitterm": { "mode": "managed" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
gitterm sandbox account # selected mode, account, who is charged
|
|
48
|
+
gitterm sandbox create --lifetime 30
|
|
49
|
+
gitterm sandbox list # live sandboxes for the account
|
|
50
|
+
gitterm sandbox sync <id> # current checkout, including uncommitted changes
|
|
51
|
+
gitterm sandbox exec <id> "npm test" --wait 300
|
|
52
|
+
gitterm sandbox job <id> <jobId> --offset 0 --limit 65536
|
|
53
|
+
gitterm sandbox cancel <id> <jobId>
|
|
54
|
+
gitterm sandbox preview <id> 3000 --command "npm run dev" --serve
|
|
55
|
+
gitterm sandbox artifact <id> <jobId> dist/app.tar.gz
|
|
56
|
+
gitterm sandbox apply <id> <localPath> dist/app.tar.gz # checked against that job's snapshot
|
|
57
|
+
gitterm sandbox resume <id> # managed sandboxes paused for inactivity
|
|
58
|
+
gitterm sandbox destroy <id>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Add `--account <name>` to use another account. Direct accounts need no Gitterm login.
|
|
62
|
+
`exec` and `job` exit with the job's exit code when it fails (1 if it timed out or was
|
|
63
|
+
cancelled), so scripts and CI see the failure.
|
|
64
|
+
See [Agent sandboxes](../../docs/agent-sandboxes.md).
|
|
65
|
+
|
|
30
66
|
## Switching servers (hosted vs self-hosted)
|
|
31
67
|
|
|
32
68
|
By default the CLI talks to the hosted GitTerm API at `https://api.gitterm.dev`.
|
|
@@ -53,7 +89,7 @@ Env vars override the saved config (useful for CI or one-off commands):
|
|
|
53
89
|
|
|
54
90
|
```bash
|
|
55
91
|
export GITTERM_SERVER_URL=https://gitterm.example.com
|
|
56
|
-
export GITTERM_API_TOKEN=gt_... # from
|
|
92
|
+
export GITTERM_API_TOKEN=gt_... # from API tokens in the dashboard
|
|
57
93
|
|
|
58
94
|
gitterm auth status
|
|
59
95
|
gitterm workspace list
|
|
@@ -98,7 +134,7 @@ code, you approve the device in your browser, and the CLI receives a user API to
|
|
|
98
134
|
- Credentials are stored in `~/.config/gitterm/cli.json`
|
|
99
135
|
- The same token works with [`@gitterm/sdk`](https://www.npmjs.com/package/@gitterm/sdk)
|
|
100
136
|
and other GitTerm integrations
|
|
101
|
-
- Create revocable tokens
|
|
137
|
+
- Create revocable tokens under **API tokens** in the dashboard
|
|
102
138
|
and pass them via `GITTERM_API_TOKEN` (with optional `GITTERM_SERVER_URL`)
|
|
103
139
|
|
|
104
140
|
## Inside a GitTerm workspace
|