@cloudglue/tinycloud 0.3.9 → 0.3.10

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 CHANGED
@@ -17,11 +17,11 @@ The npm package is a small launcher: on first run it downloads the matching
17
17
  platform distribution from Cloudglue's CDN (cached under
18
18
  `~/.tinycloud/versions/<version>/`), verifies its checksum, and execs the real
19
19
  binary. The package version pins the binary version, so
20
- `npx @cloudglue/tinycloud@0.3.9` always runs tinycloud 0.3.9. It also adds two
20
+ `npx @cloudglue/tinycloud@0.3.10` always runs tinycloud 0.3.10. It also adds two
21
21
  wrapper commands:
22
22
 
23
23
  ```bash
24
- tinycloud install --version 0.3.9 # pre-download a version
24
+ tinycloud install --version 0.3.10 # pre-download a version
25
25
  tinycloud install --latest # install latest stable and pin to it
26
26
  tinycloud update # move to latest stable, prune old versions
27
27
  ```
@@ -38,9 +38,12 @@ supported — use WSL2.
38
38
 
39
39
  ### Setup
40
40
 
41
- Cloud features need a Cloudglue API key:
41
+ Cloud features need a Cloudglue API key. The quickest way is browser sign-in
42
+ (0.3.10+) — it provisions a key for you, no copy-paste:
42
43
 
43
44
  ```bash
45
+ tinycloud login # browser sign-in → provisions & saves a key (0.3.10+)
46
+ # or paste a key yourself:
44
47
  tinycloud setup cloudglue --api-key <key> # or: export CLOUDGLUE_API_KEY=...
45
48
  tinycloud setup --check --json # verify
46
49
  ```
@@ -131,6 +134,7 @@ go to stderr) — pass `--json`.
131
134
  | `workflow` | Run packaged pipeline recipes (see below) |
132
135
  | `publish` | Publish HTML artifacts as Cloudglue Sites; share videos |
133
136
  | `setup` | Configure the Cloudglue API key and service connections |
137
+ | `login` | Browser sign-in — provisions & saves a Cloudglue API key (0.3.10+) |
134
138
 
135
139
  A few common invocations:
136
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudglue/tinycloud",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "Agent CLI for deep video and image work, by Cloudglue. Downloads the tinycloud binary on first run.",
5
5
  "bin": {
6
6
  "tinycloud": "bin/tinycloud.js"
@@ -37,8 +37,9 @@ npm install -g @cloudglue/tinycloud
37
37
  ```
38
38
 
39
39
  Credentials (required for cloud verbs): `tinycloud setup cloudglue --api-key <key>`
40
- (or `export CLOUDGLUE_API_KEY=...`). Verify with
41
- `tinycloud setup --check --json` `data.ok == true`.
40
+ (or `export CLOUDGLUE_API_KEY=...`), or, for a human at a terminal,
41
+ `tinycloud login` (0.3.10+) for browser sign-in that provisions and saves a key.
42
+ Verify with `tinycloud setup --check --json` → `data.ok == true`.
42
43
 
43
44
  ## 1. The envelope contract
44
45
 
@@ -51,7 +52,7 @@ credentials), `error` (`{code, message, retryable}`).
51
52
  |---|---|
52
53
  | `ready` | consume `data` / `ref` / file paths and continue |
53
54
  | `pending` | async job started — `tinycloud jobs wait <meta.job_id> --timeout 120s --json` |
54
- | `needs_credentials` | run the command in `setup.command` or set the env in `setup.env` |
55
+ | `needs_credentials` | run the command in `setup.command` (or `setup.login_command`, `tinycloud login`, for browser sign-in — 0.3.10+) or set the env in `setup.env` |
55
56
  | `needs_upload` | cloud upload required (runs through the user's Cloudglue account) — rerun without `--no-upload` or confirm with the user |
56
57
  | `needs_download` | fetch locally first: `tinycloud grab <url> --json` |
57
58
  | `paused` | stop; surface `resume` info to the user (resume is not automated in 0.3.x) |
@@ -16,7 +16,7 @@ Envelope schema version: `"1"` (reported in `--version --json` as
16
16
  "meta": { "elapsed_ms": 1234, "requires": "cloud", "cache": { "identity": "hit" } },
17
17
  "summary": "one-line human summary",
18
18
  "next": [ { "…": "suggested follow-up commands" } ],
19
- "setup": { "service": "cloudglue", "env": ["CLOUDGLUE_API_KEY"], "command": "tinycloud setup cloudglue" },
19
+ "setup": { "service": "cloudglue", "env": ["CLOUDGLUE_API_KEY"], "command": "tinycloud setup cloudglue", "login_command": "tinycloud login" },
20
20
  "resume": { "run_id": "…", "paused_step": "…", "resume_command": "…" },
21
21
  "error": { "code": "validation", "message": "…", "retryable": false }
22
22
  }
@@ -44,7 +44,7 @@ Envelope schema version: `"1"` (reported in `--version --json` as
44
44
  | `ready` | 0 | `data` usable | consume and continue |
45
45
  | `pending` | 0 | `meta.job_id` set | `tinycloud jobs wait <id> --timeout 120s --json`; do NOT start downstream work |
46
46
  | `paused` | 0 | `resume` present | stop; surface resume info (resume not automated in 0.3.x) |
47
- | `needs_credentials` | 2 | `setup` present | run `setup.command` or set `setup.env` |
47
+ | `needs_credentials` | 2 | `setup` present | run `setup.command` (or `setup.login_command`, `tinycloud login`, browser sign-in — 0.3.10+) or set `setup.env` |
48
48
  | `needs_upload` | 3 | — | cloud upload required (runs through the user's Cloudglue account); rerun without `--no-upload` after confirming |
49
49
  | `needs_download` | 3 | — | materialize locally first (`tinycloud grab …`) |
50
50
  | `error` | 1 | `error` present | stop; report `error.message`; retry only if `error.retryable` |
@@ -14,6 +14,12 @@ connector?" or an envelope field needs explaining.
14
14
  - **tinycloud** — the agent CLI distributed from this repo
15
15
  (https://tinycloud.sh). Local verbs (`clip`, `search`, `setup`) run on your
16
16
  machine; cloud verbs call Cloudglue with your API key.
17
+ - **Browser sign-in / device login (0.3.10+)** — `tinycloud login` runs an
18
+ OAuth-style device-authorization flow: it prints a short code + verification
19
+ URL, opens the Cloudglue dashboard, and on approval mints a normal `cg-` API
20
+ key saved to config exactly like a pasted key (the raw key is never printed).
21
+ The interactive counterpart of `setup cloudglue --api-key`; paste-key and
22
+ `$CLOUDGLUE_API_KEY` remain fully supported for headless/scripted setup.
17
23
 
18
24
  ## Media and identity
19
25
 
@@ -31,11 +31,22 @@ Usage is billed to that key per the
31
31
  [rate card](https://app.cloudglue.dev/home/billing/rate-card).
32
32
 
33
33
  ```bash
34
+ tinycloud login # browser sign-in → provisions & saves a key (0.3.10+)
35
+ # or paste/point at a key yourself:
34
36
  tinycloud setup cloudglue --api-key <key> # persist the key
35
37
  # or
36
38
  export CLOUDGLUE_API_KEY=<key> # env only, nothing persisted
37
39
  ```
38
40
 
41
+ `tinycloud login` (0.3.10+) runs an OAuth-style device sign-in: it best-effort
42
+ opens the Cloudglue dashboard, you approve a short code, and a normal `cg-` API
43
+ key is minted and saved to config exactly like a pasted key — you never handle
44
+ the key. It blocks on a browser flow (~minutes), so for headless or scripted
45
+ setup prefer `setup cloudglue --api-key` / `$CLOUDGLUE_API_KEY`. When a cloud
46
+ verb hits missing credentials, the `needs_credentials` envelope's `setup` object
47
+ now carries both `setup.command` (`tinycloud setup cloudglue`) and
48
+ `setup.login_command` (`tinycloud login`).
49
+
39
50
  `frameio` is an optional service and requires interactive OAuth
40
51
  (`tinycloud setup frameio` inside the tinycloud agent TUI).
41
52
 
@@ -21,6 +21,7 @@ every verb. Regenerate doubts from it instead of trusting prose.
21
21
  | `workflow` | varies | no | Validate/plan/run workflow recipes |
22
22
  | `publish` | cloud | yes | Publish HTML/code artifacts as Cloudglue Sites; share videos |
23
23
  | `setup` | local | no | Credentials and service connections |
24
+ | `login` | network | no | Browser sign-in → provisions & saves a Cloudglue API key (0.3.10+) |
24
25
 
25
26
  Cloud verbs run through the configured Cloudglue API key.
26
27
  `caption`/`library`/`workflow` vary by what they end up doing.
@@ -427,6 +428,26 @@ tinycloud setup --list --json # known services
427
428
  tinycloud setup cloudglue --api-key <key> # or --stdin
428
429
  ```
429
430
 
431
+ ### login — browser sign-in (network, 0.3.10+)
432
+
433
+ ```bash
434
+ tinycloud login [--no-browser] [--web-url <url>] [--label <text>] --json
435
+ ```
436
+
437
+ An OAuth-style **device-authorization** sign-in — the interactive counterpart of
438
+ `tinycloud setup cloudglue --api-key`. It prints a short code + a verification
439
+ URL, best-effort opens the Cloudglue dashboard, and polls until you approve;
440
+ approval mints a normal `cg-` API key that is saved to `~/.tinycloud/config.json`
441
+ (0600) exactly like a pasted key. The **raw key is never printed** — the `ready`
442
+ envelope's `data` carries only `{account, api_base_url, key_masked, config_path,
443
+ replaced_existing}` (progress code + URL go to **stderr**). `--no-browser` prints
444
+ the URL only (SSH/containers); `--web-url` (or `$CLOUDGLUE_WEB_URL`) points at a
445
+ non-default dashboard; `--label` names the provisioned key (default: hostname).
446
+ Revoke by deleting the key in the dashboard. Because it blocks on a
447
+ ~10-minute human flow, `login` is a manual/onboarding command — don't script it
448
+ into an agent's tool loop; for headless/automated setup keep using
449
+ `tinycloud setup cloudglue --api-key <key>` or `$CLOUDGLUE_API_KEY`.
450
+
430
451
  ## Shared flags
431
452
 
432
453
  Output: `--json` (force JSONL envelopes), `--pretty` (one JSON array),
@@ -1,5 +1,5 @@
1
1
  {
2
- "skill_version": "0.3.9",
2
+ "skill_version": "0.3.10",
3
3
  "tinycloud": {
4
4
  "min_version": "0.3.7",
5
5
  "supported_range": ">=0.3.7 <0.4.0",
@@ -43,18 +43,26 @@ at https://tinycloud.sh. Windows is unsupported — use WSL2.
43
43
  tinycloud setup --check --json </dev/null
44
44
  ```
45
45
 
46
- If `data.ok` is `true`, go to step 3. Otherwise tell the user: cloud
47
- features run through a Cloudglue account keys live at
48
- [app.cloudglue.dev](https://app.cloudglue.dev) (usage billed per the
49
- [rate card](https://app.cloudglue.dev/home/billing/rate-card)). Ask them to
50
- paste their API key, then configure it via stdin so the key never lands in
51
- shell history or process args:
52
-
53
- ```bash
54
- printf '%s' "<key>" | tinycloud setup cloudglue --stdin
55
- ```
56
-
57
- Re-run `tinycloud setup --check --json` and confirm `data.ok == true`.
46
+ If `data.ok` is `true`, go to step 3. Otherwise cloud features run through a
47
+ Cloudglue account (usage billed per the
48
+ [rate card](https://app.cloudglue.dev/home/billing/rate-card)) connect one of
49
+ two ways:
50
+
51
+ - **Browser sign-in (recommended; tinycloud 0.3.10+).** Ask the user to run
52
+ `tinycloud login` **themselves in their terminal** — it's an interactive
53
+ browser flow you can't drive from here. It opens the Cloudglue dashboard, they
54
+ approve a short code, and a key is provisioned and saved automatically (no
55
+ copy-pasting keys).
56
+ - **Paste an API key.** If they'd rather paste an existing key (or their
57
+ tinycloud predates `login`), have them get one at
58
+ [app.cloudglue.dev](https://app.cloudglue.dev) and configure it via stdin so
59
+ the key never lands in shell history or process args — this path you can run:
60
+
61
+ ```bash
62
+ printf '%s' "<key>" | tinycloud setup cloudglue --stdin
63
+ ```
64
+
65
+ Then re-run `tinycloud setup --check --json` and confirm `data.ok == true`.
58
66
 
59
67
  ## 3. Prove it works (free)
60
68