@cloudglue/tinycloud 0.3.2 → 0.3.3
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 +114 -7
- package/lib/skills.js +115 -20
- package/package.json +1 -1
- package/skills/tinycloud/SKILL.md +8 -1
- package/skills/tinycloud/reference/glossary.md +14 -0
- package/skills/tinycloud/reference/setup.md +48 -0
- package/skills/tinycloud/reference/verbs.md +18 -0
- package/skills/tinycloud/reference/workflow-authoring.md +4 -0
- package/skills/tinycloud-init/SKILL.md +3 -0
- package/skills/tinycloud-skill-creator/SKILL.md +2 -0
package/README.md
CHANGED
|
@@ -16,11 +16,11 @@ The npm package is a small launcher: on first run it downloads the matching
|
|
|
16
16
|
platform distribution from Cloudglue's CDN (cached under
|
|
17
17
|
`~/.tinycloud/versions/<version>/`), verifies its checksum, and execs the real
|
|
18
18
|
binary. The package version pins the binary version, so
|
|
19
|
-
`npx @cloudglue/tinycloud@0.3.
|
|
19
|
+
`npx @cloudglue/tinycloud@0.3.3` always runs tinycloud 0.3.3. It also adds two
|
|
20
20
|
wrapper commands:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
tinycloud install --version 0.3.
|
|
23
|
+
tinycloud install --version 0.3.3 # pre-download a version
|
|
24
24
|
tinycloud install --latest # install latest stable and pin to it
|
|
25
25
|
tinycloud update # move to latest stable, prune old versions
|
|
26
26
|
```
|
|
@@ -50,14 +50,21 @@ This repo also distributes agent skills that teach coding agents (Claude
|
|
|
50
50
|
Code, Codex, and anything else following the
|
|
51
51
|
[Agent Skills](https://agentskills.io) standard) to drive the tinycloud CLI.
|
|
52
52
|
|
|
53
|
-
**One command** (
|
|
53
|
+
**One command** (in a terminal it prompts you to pick the target agents):
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx @cloudglue/tinycloud skills install
|
|
57
|
-
npx @cloudglue/tinycloud skills install --
|
|
56
|
+
npx @cloudglue/tinycloud skills install # menu: claude-code, agents, codex, cursor
|
|
57
|
+
npx @cloudglue/tinycloud skills install --harness cursor,codex # pick targets non-interactively
|
|
58
|
+
npx @cloudglue/tinycloud skills install --global # ~/.claude/skills (Claude Code only)
|
|
58
59
|
npx @cloudglue/tinycloud skills install --skill tinycloud,blog-post # just some
|
|
59
60
|
```
|
|
60
61
|
|
|
62
|
+
Each agent reads skills from its own `<dir>/skills`: `claude-code` → `.claude`,
|
|
63
|
+
`agents` → `.agents` (the universal [Agent Skills](https://agentskills.io)
|
|
64
|
+
layout), `codex` → `.codex`, `cursor` → `.cursor`. The menu preselects dirs
|
|
65
|
+
that already exist; piped/CI runs (or `--yes`) skip it and install into
|
|
66
|
+
whichever dirs exist, defaulting to `.claude/skills` when none do.
|
|
67
|
+
|
|
61
68
|
**Claude Code** (as a plugin):
|
|
62
69
|
|
|
63
70
|
```text
|
|
@@ -91,14 +98,114 @@ To give every agent session in a repo the same skills, commit them:
|
|
|
91
98
|
|
|
92
99
|
```bash
|
|
93
100
|
cd your-project
|
|
94
|
-
npx @cloudglue/tinycloud skills install
|
|
95
|
-
git add .claude .agents 2>/dev/null; git commit -m "Add tinycloud agent skills"
|
|
101
|
+
npx @cloudglue/tinycloud skills install --harness claude-code,agents # or pick from the menu
|
|
102
|
+
git add .claude .agents .codex .cursor 2>/dev/null; git commit -m "Add tinycloud agent skills"
|
|
96
103
|
```
|
|
97
104
|
|
|
98
105
|
Optionally add a line to your project's `CLAUDE.md` so agents reach for them:
|
|
99
106
|
`Video work (analysis, captions, clips, workflows) goes through the tinycloud
|
|
100
107
|
CLI — see the tinycloud skill; run tinycloud-init if the CLI isn't set up.`
|
|
101
108
|
|
|
109
|
+
## Commands
|
|
110
|
+
|
|
111
|
+
Cloud commands run through your configured Cloudglue API key (billed per the
|
|
112
|
+
[rate card](https://app.cloudglue.dev/home/billing/rate-card)); local and
|
|
113
|
+
network commands are free. Every command prints a JSON envelope on stdout (logs
|
|
114
|
+
go to stderr) — pass `--json`.
|
|
115
|
+
|
|
116
|
+
| Command | What it does |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `watch` | Analyze a video → reusable cached context + Cloudglue-ready ref |
|
|
119
|
+
| `extract` | Pull structured facts, entities, or moments (free-form or JSON-schema) |
|
|
120
|
+
| `caption` | Subtitles and transcripts (SRT/VTT/ASS) |
|
|
121
|
+
| `search` | Keyword search over cached video context |
|
|
122
|
+
| `probe` | Semantic moment/video search over a Cloudglue scope |
|
|
123
|
+
| `ask` | Grounded Q&A over one or more videos |
|
|
124
|
+
| `clip` | ffmpeg-backed cut, thumbs, stitch, transcode, burn, split, audio, info |
|
|
125
|
+
| `grab` | Download a remote video (YouTube, TikTok, Loom, direct) |
|
|
126
|
+
| `library` | Browse and sync Cloudglue collections and connectors |
|
|
127
|
+
| `jobs` | Poll, wait on, or forget async jobs |
|
|
128
|
+
| `workflow` | Run packaged pipeline recipes (see below) |
|
|
129
|
+
| `publish` | Publish HTML artifacts as Cloudglue Sites; share videos |
|
|
130
|
+
| `setup` | Configure the Cloudglue API key and service connections |
|
|
131
|
+
|
|
132
|
+
A few common invocations:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Analyze a video into reusable, cached context + a Cloudglue-ready ref
|
|
136
|
+
tinycloud watch ./demo.mp4 --json
|
|
137
|
+
# Pull structured findings (free-form query here; pass --schema for a fixed shape)
|
|
138
|
+
tinycloud extract "key moments with timestamps" ./demo.mp4 --json
|
|
139
|
+
# Subtitles plus a markdown transcript
|
|
140
|
+
tinycloud caption ./demo.mp4 --format srt --transcript --json
|
|
141
|
+
# Trim a clip locally — no upload, ffmpeg-backed
|
|
142
|
+
tinycloud clip cut ./demo.mp4 --start 12 --end 28 -o clip.mp4 --json
|
|
143
|
+
# Grounded Q&A over one or more videos
|
|
144
|
+
tinycloud ask "What objections came up?" --in ./demo.mp4 --json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`tinycloud commands --json` is the authoritative, machine-readable list of
|
|
148
|
+
every command and flag. Full per-verb flags and cost classes:
|
|
149
|
+
[skills/tinycloud/reference/verbs.md](skills/tinycloud/reference/verbs.md).
|
|
150
|
+
The envelope contract — statuses (`ready`, `pending`, `needs_credentials`, …)
|
|
151
|
+
and exit codes:
|
|
152
|
+
[skills/tinycloud/reference/envelope.md](skills/tinycloud/reference/envelope.md).
|
|
153
|
+
|
|
154
|
+
### Global flags & profiles (0.3.3+)
|
|
155
|
+
|
|
156
|
+
A few options are host-level — they isolate state rather than run a video
|
|
157
|
+
operation, so they go *before* the verb and don't appear in `commands --json`:
|
|
158
|
+
|
|
159
|
+
- `--home <dir>` (or `$TINYCLOUD_HOME`) — run against an isolated state home
|
|
160
|
+
(config, sessions, cache, jobs, artifacts, skills) instead of `~/.tinycloud`.
|
|
161
|
+
- `--profile <name>` — use a named profile's home, so multiple accounts or
|
|
162
|
+
installs run side by side without cross-contamination.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
tinycloud --home ./.tc watch ./demo.mp4 --json # isolated state for this repo
|
|
166
|
+
tinycloud profile list # profiles and their homes
|
|
167
|
+
tinycloud profile create work --default # create one and make it default
|
|
168
|
+
tinycloud profile create staging --copy-from work # clone an existing home
|
|
169
|
+
tinycloud --profile work ask "..." --in ./demo.mp4 --json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Sessions are scoped per project (keyed by the git root), the agent takes a
|
|
173
|
+
`--skills <list>` allowlist alongside `--tools`, and a project-local
|
|
174
|
+
`.tinycloud/config.json` can pin tool/skill allowlists and an output base.
|
|
175
|
+
Details:
|
|
176
|
+
[skills/tinycloud/reference/setup.md](skills/tinycloud/reference/setup.md).
|
|
177
|
+
|
|
178
|
+
## Workflows
|
|
179
|
+
|
|
180
|
+
Workflows are packaged, repeatable pipelines that run with a single command
|
|
181
|
+
and write their outputs into a run directory under
|
|
182
|
+
`./tinycloud-output/runs/<run_id>/`. The five flagship recipes — each with a
|
|
183
|
+
matching agent skill — are:
|
|
184
|
+
|
|
185
|
+
| Workflow | Turns a video into |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `sales-coaching` | Coaching dashboard — call scores, speech metrics, objections |
|
|
188
|
+
| `blog-post` | Rich blog post — sections, thumbnails, takeaways |
|
|
189
|
+
| `ad-analysis` | Ad breakdown — shot timeline, hook, pacing, CTA |
|
|
190
|
+
| `meeting-breakdown` | Speaker timeline, chapter summaries, action items |
|
|
191
|
+
| `youtube-publish` | YouTube title, description, chapters, tags, subtitles |
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
tinycloud workflow list --json # all available recipes
|
|
195
|
+
tinycloud workflow sales-coaching ./call.mp4 --json # run one
|
|
196
|
+
tinycloud workflow plan blog-post ./demo.mp4 --json # preview steps (free, no side effects)
|
|
197
|
+
tinycloud workflow validate ad-analysis --json # check a recipe (or a path)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The final envelope reports `data.status`
|
|
201
|
+
(`completed | partial | failed | paused`), `data.outputs` (named outputs such
|
|
202
|
+
as `outputs.html`), and `data.artifacts[].path`. The five above each have a
|
|
203
|
+
matching agent skill (see the table), so coding agents can run them directly;
|
|
204
|
+
`tinycloud workflow list` shows the full set, including building blocks like
|
|
205
|
+
`summary` and `clip-highlights`. Author your own recipes:
|
|
206
|
+
[skills/tinycloud/reference/workflow-authoring.md](skills/tinycloud/reference/workflow-authoring.md)
|
|
207
|
+
(or scaffold one with the `tinycloud-skill-creator` skill).
|
|
208
|
+
|
|
102
209
|
## License
|
|
103
210
|
|
|
104
211
|
© Aviary Inc. (d/b/a Cloudglue). All rights reserved. Use is subject to [Aviary Inc. Terms of Service](https://cloudglue.dev/terms).
|
package/lib/skills.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const fs = require("node:fs");
|
|
4
4
|
const os = require("node:os");
|
|
5
5
|
const path = require("node:path");
|
|
6
|
+
const readline = require("node:readline");
|
|
6
7
|
|
|
7
8
|
// Agent skills bundled with this package (the npm tarball includes skills/).
|
|
8
9
|
function bundledSkillsDir() {
|
|
@@ -19,28 +20,95 @@ function listBundledSkills() {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* Known agent harnesses. Each keeps skills in its own <configDir>/skills dir,
|
|
24
|
+
* all using the SKILL.md layout. `id` is both the menu label and the
|
|
25
|
+
* --harness token; `aliases` are extra accepted tokens.
|
|
25
26
|
* claude-code: <project>/.claude/skills (global: ~/.claude/skills)
|
|
26
|
-
*
|
|
27
|
+
* agents: <project>/.agents/skills (universal agentskills.io layout)
|
|
28
|
+
* codex: <project>/.codex/skills
|
|
29
|
+
* cursor: <project>/.cursor/skills
|
|
27
30
|
*/
|
|
28
|
-
|
|
31
|
+
const HARNESSES = [
|
|
32
|
+
{ id: "claude-code", aliases: ["claude"], configDir: ".claude" },
|
|
33
|
+
{ id: "agents", aliases: [], configDir: ".agents" },
|
|
34
|
+
{ id: "codex", aliases: [], configDir: ".codex" },
|
|
35
|
+
{ id: "cursor", aliases: [], configDir: ".cursor" },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
function harnessIds() {
|
|
39
|
+
return HARNESSES.map((h) => h.id);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Resolve a --harness token (id or alias, case-insensitive) to its entry.
|
|
43
|
+
function findHarness(token) {
|
|
44
|
+
const t = String(token).trim().toLowerCase();
|
|
45
|
+
return HARNESSES.find((h) => h.id === t || h.aliases.includes(t));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function harnessTarget(h, cwd) {
|
|
49
|
+
return { name: h.id, dir: path.join(cwd, h.configDir, "skills") };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function detectHarnesses(cwd) {
|
|
53
|
+
return HARNESSES.filter((h) => fs.existsSync(path.join(cwd, h.configDir)));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Pick install targets from flags/detection only — no prompting or I/O beyond
|
|
58
|
+
* existence checks, so it stays deterministic for tests. The interactive menu
|
|
59
|
+
* lives in promptForTargets(). Precedence: --dir > --global > --harness >
|
|
60
|
+
* detection (and .claude when nothing is detected).
|
|
61
|
+
*/
|
|
62
|
+
function resolveTargets({ global: isGlobal, dir, harness, cwd = process.cwd() }) {
|
|
29
63
|
if (dir) return [{ name: "custom", dir: path.resolve(dir) }];
|
|
30
64
|
if (isGlobal) return [{ name: "claude-code (global)", dir: path.join(os.homedir(), ".claude", "skills") }];
|
|
31
65
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
66
|
+
if (harness && harness.length) {
|
|
67
|
+
return harness.map((token) => {
|
|
68
|
+
const h = findHarness(token);
|
|
69
|
+
if (!h) throw new Error(`Unknown harness: ${token}. Valid: ${harnessIds().join(", ")}`);
|
|
70
|
+
return harnessTarget(h, cwd);
|
|
71
|
+
});
|
|
38
72
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
73
|
+
|
|
74
|
+
const detected = detectHarnesses(cwd);
|
|
75
|
+
if (detected.length) return detected.map((h) => harnessTarget(h, cwd));
|
|
76
|
+
// No harness detected: default to claude-code project layout.
|
|
77
|
+
return [harnessTarget(HARNESSES[0], cwd)];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Interactive picker: list the four harnesses (detected ones preselected) and
|
|
82
|
+
* read a comma-separated choice. Streams are injectable for testing; empty or
|
|
83
|
+
* unparseable input falls back to the preselection.
|
|
84
|
+
*/
|
|
85
|
+
async function promptForTargets({ cwd = process.cwd(), input = process.stdin, output = process.stdout } = {}) {
|
|
86
|
+
const detected = new Set(detectHarnesses(cwd).map((h) => h.id));
|
|
87
|
+
const rows = HARNESSES.map((h, i) => ({ n: i + 1, h, detected: detected.has(h.id) }));
|
|
88
|
+
const preselected = rows.some((r) => r.detected)
|
|
89
|
+
? rows.filter((r) => r.detected).map((r) => r.n)
|
|
90
|
+
: [1];
|
|
91
|
+
|
|
92
|
+
output.write("Which agents should get the skills?\n");
|
|
93
|
+
for (const r of rows) {
|
|
94
|
+
const mark = preselected.includes(r.n) ? "x" : " ";
|
|
95
|
+
const tag = r.detected ? " (detected)" : "";
|
|
96
|
+
output.write(` ${r.n}) [${mark}] ${r.h.id.padEnd(11)} ${path.join(r.h.configDir, "skills")}${tag}\n`);
|
|
42
97
|
}
|
|
43
|
-
|
|
98
|
+
|
|
99
|
+
const rl = readline.createInterface({ input, output });
|
|
100
|
+
const answer = await new Promise((resolve) => {
|
|
101
|
+
rl.question(`Enter numbers (comma-separated) [${preselected.join(",")}]: `, resolve);
|
|
102
|
+
});
|
|
103
|
+
rl.close();
|
|
104
|
+
|
|
105
|
+
let nums = answer
|
|
106
|
+
.split(",")
|
|
107
|
+
.map((s) => parseInt(s.trim(), 10))
|
|
108
|
+
.filter((n) => Number.isInteger(n) && n >= 1 && n <= rows.length);
|
|
109
|
+
if (!nums.length) nums = preselected;
|
|
110
|
+
|
|
111
|
+
return rows.filter((r) => nums.includes(r.n)).map((r) => harnessTarget(r.h, cwd));
|
|
44
112
|
}
|
|
45
113
|
|
|
46
114
|
function installSkills({ skills, targets, force }) {
|
|
@@ -70,12 +138,17 @@ const USAGE = `Usage: tinycloud skills <list|install> [options]
|
|
|
70
138
|
|
|
71
139
|
Install options:
|
|
72
140
|
--skill <a,b,...> Only these skills (default: all)
|
|
73
|
-
--
|
|
141
|
+
--harness <a,b,...> Install into these agents: claude-code, agents, codex, cursor
|
|
142
|
+
(default: pick from a menu in a terminal; auto-detect otherwise)
|
|
143
|
+
--global Install to ~/.claude/skills instead of the project (Claude Code only)
|
|
74
144
|
--dir <path> Install to an explicit directory
|
|
145
|
+
--yes, -y Skip the interactive menu; use auto-detection
|
|
75
146
|
--force Overwrite skills that are already installed
|
|
76
147
|
|
|
77
|
-
|
|
78
|
-
|
|
148
|
+
Each harness holds skills under <dir>/skills: claude-code → .claude, agents → .agents
|
|
149
|
+
(universal agentskills.io layout), codex → .codex, cursor → .cursor. Run in a terminal
|
|
150
|
+
with no target and you'll be prompted to pick (detected dirs preselected); piped/CI runs
|
|
151
|
+
install into whichever dirs exist, or .claude when none do.
|
|
79
152
|
`;
|
|
80
153
|
|
|
81
154
|
async function cmdSkills(args) {
|
|
@@ -97,7 +170,9 @@ async function cmdSkills(args) {
|
|
|
97
170
|
let wanted = available;
|
|
98
171
|
let isGlobal = false;
|
|
99
172
|
let force = false;
|
|
173
|
+
let yes = false;
|
|
100
174
|
let dir;
|
|
175
|
+
let harness;
|
|
101
176
|
for (let i = 1; i < args.length; i++) {
|
|
102
177
|
if (args[i] === "--skill" && args[i + 1]) {
|
|
103
178
|
const names = args[++i].split(",").map((s) => s.trim()).filter(Boolean);
|
|
@@ -106,8 +181,15 @@ async function cmdSkills(args) {
|
|
|
106
181
|
throw new Error(`Unknown skill(s): ${unknown.join(", ")}. Available: ${available.join(", ")}`);
|
|
107
182
|
}
|
|
108
183
|
wanted = names;
|
|
184
|
+
} else if (args[i] === "--harness" && args[i + 1]) {
|
|
185
|
+
harness = args[++i].split(",").map((s) => s.trim()).filter(Boolean);
|
|
186
|
+
const unknown = harness.filter((id) => !findHarness(id));
|
|
187
|
+
if (unknown.length) {
|
|
188
|
+
throw new Error(`Unknown harness(es): ${unknown.join(", ")}. Valid: ${harnessIds().join(", ")}`);
|
|
189
|
+
}
|
|
109
190
|
} else if (args[i] === "--global") isGlobal = true;
|
|
110
191
|
else if (args[i] === "--force") force = true;
|
|
192
|
+
else if (args[i] === "--yes" || args[i] === "-y") yes = true;
|
|
111
193
|
else if (args[i] === "--dir" && args[i + 1]) dir = args[++i];
|
|
112
194
|
else throw new Error(`Unknown install option: ${args[i]}\n${USAGE}`);
|
|
113
195
|
}
|
|
@@ -116,11 +198,24 @@ async function cmdSkills(args) {
|
|
|
116
198
|
throw new Error("No bundled skills found in this package installation");
|
|
117
199
|
}
|
|
118
200
|
|
|
119
|
-
const
|
|
201
|
+
const explicit = dir || isGlobal || (harness && harness.length);
|
|
202
|
+
const targets =
|
|
203
|
+
!explicit && !yes && process.stdin.isTTY && process.stdout.isTTY
|
|
204
|
+
? await promptForTargets({})
|
|
205
|
+
: resolveTargets({ global: isGlobal, dir, harness });
|
|
206
|
+
|
|
120
207
|
const results = installSkills({ skills: wanted, targets, force });
|
|
121
208
|
for (const r of results) console.log(`${r.status === "installed" ? "✓" : "-"} ${r.skill} → ${r.dir} [${r.status}]`);
|
|
122
209
|
const installed = results.filter((r) => r.status === "installed").length;
|
|
123
210
|
console.log(`\n${installed} skill(s) installed${installed ? ". Restart your agent session to pick them up." : "."}`);
|
|
124
211
|
}
|
|
125
212
|
|
|
126
|
-
module.exports = {
|
|
213
|
+
module.exports = {
|
|
214
|
+
cmdSkills,
|
|
215
|
+
resolveTargets,
|
|
216
|
+
promptForTargets,
|
|
217
|
+
installSkills,
|
|
218
|
+
listBundledSkills,
|
|
219
|
+
bundledSkillsDir,
|
|
220
|
+
HARNESSES,
|
|
221
|
+
};
|
package/package.json
CHANGED
|
@@ -110,6 +110,13 @@ Evaluating a video the host project's code rendered (render → evaluate →
|
|
|
110
110
|
edit → rerender): the render-review loop in
|
|
111
111
|
[reference/pipelines.md](reference/pipelines.md).
|
|
112
112
|
|
|
113
|
+
Isolation & scope (0.3.3+): `--home <dir>` / `$TINYCLOUD_HOME` and
|
|
114
|
+
`--profile <name>` are leading flags (before the verb) that run against an
|
|
115
|
+
isolated state home; the agent also takes `--skills <list>` alongside
|
|
116
|
+
`--tools <list>`, and a project-local `.tinycloud/config.json` can pin those
|
|
117
|
+
allowlists and an output base. Sessions are scoped per project. Details:
|
|
118
|
+
[reference/setup.md](reference/setup.md).
|
|
119
|
+
|
|
113
120
|
## 3. Workflows (packaged recipes)
|
|
114
121
|
|
|
115
122
|
Repeatable pipelines run with one command and write outputs into a run
|
|
@@ -170,7 +177,7 @@ Authoring your own recipes: [reference/workflow-authoring.md](reference/workflow
|
|
|
170
177
|
|
|
171
178
|
## 5. Reference (load on demand)
|
|
172
179
|
|
|
173
|
-
- [reference/setup.md](reference/setup.md) — install, credentials, env vars, preflight
|
|
180
|
+
- [reference/setup.md](reference/setup.md) — install, credentials, env vars, preflight, profiles & project scope
|
|
174
181
|
- [reference/verbs.md](reference/verbs.md) — every verb, flag, and cost class
|
|
175
182
|
- [reference/envelope.md](reference/envelope.md) — full envelope schema, statuses, error codes, exit codes
|
|
176
183
|
- [reference/pipelines.md](reference/pipelines.md) — pipes, batching, jobs, cache/spend-control flags
|
|
@@ -88,3 +88,17 @@ connector?" or an envelope field needs explaining.
|
|
|
88
88
|
events re-dispatched on the element) for custom site HTML, and plays
|
|
89
89
|
standalone or inside the container components (`<cg-playlist>`,
|
|
90
90
|
`<cg-grid>`, `<cg-chapters>`) — see reference/verbs.md.
|
|
91
|
+
|
|
92
|
+
## State and isolation (0.3.3+)
|
|
93
|
+
|
|
94
|
+
- **Home** — the directory holding all tinycloud state for a run: config,
|
|
95
|
+
sessions, cache, jobs, artifacts, and skills. Default `~/.tinycloud`;
|
|
96
|
+
relocate it with `--home <dir>` or `$TINYCLOUD_HOME`.
|
|
97
|
+
- **Profile** — a named, fully isolated home, selected with `--profile <name>`
|
|
98
|
+
and managed by `tinycloud profile list|show|create|use|remove`. Lets multiple
|
|
99
|
+
accounts or installs run side by side without cross-contamination. (Distinct
|
|
100
|
+
from `watch --profile`, which selects an analysis profile.)
|
|
101
|
+
- **Project scope** — sessions and capabilities keyed to a project (its git
|
|
102
|
+
root). Sessions live under `<home>/projects/<project-key>/sessions`, and a
|
|
103
|
+
project-local `.tinycloud/config.json` can pin tool/skill allowlists and an
|
|
104
|
+
output base — precedence is CLI flags > project config > global config.
|
|
@@ -95,9 +95,57 @@ binary reports in `--version --json`.
|
|
|
95
95
|
| `CLOUDGLUE_API_KEY` | Cloudglue API key (alternative to `tinycloud setup cloudglue`) |
|
|
96
96
|
| `TINYCLOUD_VERSION` | npm launcher: run a specific binary version |
|
|
97
97
|
| `TINYCLOUD_INSTALL_DIR` | npm launcher: cache root (default `~/.tinycloud`) |
|
|
98
|
+
| `TINYCLOUD_HOME` | Isolated state home — config, sessions, cache, jobs, artifacts, skills (default `~/.tinycloud`; same as `--home`). 0.3.3+ |
|
|
99
|
+
| `TINYCLOUD_OUT` | Output base for generated files (wins over a config `outputBase`) |
|
|
98
100
|
| `TINYCLOUD_HTTP_TIMEOUT_MS` | Hard deadline per Cloudglue request (default 120s; `0` disables) |
|
|
99
101
|
| `TINYCLOUD_UPLOAD_TIMEOUT_MS` | Deadline for upload-shaped requests (default 60min; `0` disables) |
|
|
100
102
|
|
|
101
103
|
Every Cloudglue request carries a hard deadline, so a stalled route can never
|
|
102
104
|
hang the CLI indefinitely; a timeout surfaces as a retryable `upstream` error
|
|
103
105
|
envelope whose message names the knob to adjust.
|
|
106
|
+
|
|
107
|
+
## Profiles & isolated homes (0.3.3+)
|
|
108
|
+
|
|
109
|
+
Every piece of tinycloud state — config, sessions, cache, jobs, artifacts, and
|
|
110
|
+
skills — lives under one home (default `~/.tinycloud`). Relocate it to run
|
|
111
|
+
multiple accounts or installs side by side without cross-contamination. Both
|
|
112
|
+
options are *leading* (before the verb) and work with any command:
|
|
113
|
+
|
|
114
|
+
- `--home <dir>` (or `$TINYCLOUD_HOME`) — use that directory as the home.
|
|
115
|
+
- `--profile <name>` — use a named profile's home (from the profiles registry).
|
|
116
|
+
|
|
117
|
+
Named profiles are managed by the host-level `profile` verb (a CLI/host
|
|
118
|
+
concern, so it is not in `commands --json`):
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
tinycloud profile list # profiles and their homes (active marked *)
|
|
122
|
+
tinycloud profile show [<name>] # home path + exists/default/active
|
|
123
|
+
tinycloud profile create <name> [--home <dir>] [--copy-from <name>] \
|
|
124
|
+
[--description <text>] [--default]
|
|
125
|
+
tinycloud profile use <name> # set the default profile
|
|
126
|
+
tinycloud profile remove <name> # unregister (does not delete the home)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`--copy-from` seeds the new profile's home from an existing one. The registry
|
|
130
|
+
lives at `$XDG_CONFIG_HOME/tinycloud/profiles.json`; `default` is reserved.
|
|
131
|
+
This global `--profile <name>` is unrelated to `watch --profile
|
|
132
|
+
default|light|custom` (that flag selects an analysis profile).
|
|
133
|
+
|
|
134
|
+
## Project scope (0.3.3+)
|
|
135
|
+
|
|
136
|
+
Within a home, sessions are scoped per project — keyed by the canonical git
|
|
137
|
+
root — under `<home>/projects/<project-key>/sessions`. In the interactive
|
|
138
|
+
agent, `/sessions` lists the current project's sessions (`/sessions all` spans
|
|
139
|
+
every project); `-c` resumes the most recent and still falls back to legacy
|
|
140
|
+
flat sessions (read-only, migrated forward on resume).
|
|
141
|
+
|
|
142
|
+
A project can also carry a local `.tinycloud/config.json` that scopes a run:
|
|
143
|
+
|
|
144
|
+
- `preferences.tools` / `preferences.skills` — allowlists of agent tool / skill
|
|
145
|
+
names (omit = all; the `--tools` / `--skills` flags override them).
|
|
146
|
+
- `preferences.outputBase` — where generated files land (a relative path is
|
|
147
|
+
anchored to the project root; `$TINYCLOUD_OUT` still wins).
|
|
148
|
+
|
|
149
|
+
Precedence is **CLI flags > project-local `.tinycloud/config.json` > global
|
|
150
|
+
config**; a more specific scope replaces (does not merge) a broader one.
|
|
151
|
+
Read-only mode always keeps the `read` and `bash` tools.
|
|
@@ -23,6 +23,24 @@ every verb. Regenerate doubts from it instead of trusting prose.
|
|
|
23
23
|
Cloud verbs run through the configured Cloudglue API key.
|
|
24
24
|
`caption`/`library`/`workflow` vary by what they end up doing.
|
|
25
25
|
|
|
26
|
+
## Global flags (0.3.3+)
|
|
27
|
+
|
|
28
|
+
Leading options (placed *before* the verb) and agent-level allowlists, separate
|
|
29
|
+
from the per-verb flags below. `--home`/`--profile` and the `profile` verb are
|
|
30
|
+
host concerns and are intentionally absent from `commands --json`.
|
|
31
|
+
|
|
32
|
+
- `--home <dir>` / `$TINYCLOUD_HOME` — run against an isolated state home
|
|
33
|
+
(config, sessions, cache, jobs, artifacts, skills) instead of `~/.tinycloud`.
|
|
34
|
+
- `--profile <name>` — use a named profile's home. Managed by
|
|
35
|
+
`tinycloud profile list|show|create|use|remove`
|
|
36
|
+
(`create <name> [--home <dir>] [--copy-from <name>] [--description <text>] [--default]`).
|
|
37
|
+
Unrelated to `watch --profile default|light|custom` (an analysis profile).
|
|
38
|
+
- `--skills <list>` (0.3.3+) / `--tools <list>` — comma-separated agent skill /
|
|
39
|
+
tool allowlists (omit = all); also settable per project via
|
|
40
|
+
`.tinycloud/config.json`.
|
|
41
|
+
|
|
42
|
+
Profiles, project-scoped sessions, and `.tinycloud/config.json`: [setup.md](setup.md).
|
|
43
|
+
|
|
26
44
|
## Per-verb flags
|
|
27
45
|
|
|
28
46
|
Flags shared by most verbs are listed once at the bottom.
|
|
@@ -141,5 +141,9 @@ are not implemented in 0.3.x — treat `partial`/`paused` as terminal.
|
|
|
141
141
|
The tinycloud agent picks it up on next start; from any shell it runs by
|
|
142
142
|
path: `tinycloud workflow run ~/.tinycloud/skills/my-skill/my-skill.yaml demo.mp4 --allow-command --json`.
|
|
143
143
|
|
|
144
|
+
With `--home`/`--profile` (0.3.3+) the global skills dir moves under the active
|
|
145
|
+
home (`<home>/skills/`); a project-local `.tinycloud/config.json` can also pin
|
|
146
|
+
which skills load via a `preferences.skills` allowlist.
|
|
147
|
+
|
|
144
148
|
To wrap a recipe as a skill for *this* host agent instead, see the
|
|
145
149
|
`tinycloud-skill-creator` skill in this repo.
|
|
@@ -75,6 +75,9 @@ Report what's now working and point forward:
|
|
|
75
75
|
uses the API key)
|
|
76
76
|
- One-command workflows: `tinycloud workflow list --json` (sales-coaching,
|
|
77
77
|
blog-post, ad-analysis, meeting-breakdown, youtube-publish, …)
|
|
78
|
+
- Multiple accounts or isolated installs (0.3.3+): `tinycloud profile create
|
|
79
|
+
<name> --default`, then `--profile <name>` (or `--home <dir>` /
|
|
80
|
+
`$TINYCLOUD_HOME`) on any command to switch state homes
|
|
78
81
|
- If the general `tinycloud` skill is installed alongside this one, it
|
|
79
82
|
documents the full CLI, envelope contract, and a glossary; its
|
|
80
83
|
`scripts/preflight.sh` re-checks this setup any time.
|
|
@@ -44,6 +44,8 @@ Before writing anything, establish:
|
|
|
44
44
|
`.claude/skills/<name>/`) whose SKILL.md runs the recipe **by path**.
|
|
45
45
|
- *The tinycloud agent*: `~/.tinycloud/skills/<name>/` (global) or
|
|
46
46
|
`.tinycloud/skills/<name>/` (project), picked up as `/skills:<name>`.
|
|
47
|
+
(With `--home`/`--profile`, 0.3.3+, the global dir is the active home's
|
|
48
|
+
`skills/`; a project's `.tinycloud/config.json` can allowlist skills.)
|
|
47
49
|
|
|
48
50
|
## 2. Scaffold
|
|
49
51
|
|