@floomhq/floom 1.0.5 → 1.0.6
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/dist/cli.js +44 -31
- package/dist/install.js +8 -2
- package/dist/ui.js +3 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -24,37 +24,40 @@ const PKG = { name: "@floomhq/floom", version: CLI_VERSION };
|
|
|
24
24
|
const V1_NOT_AVAILABLE = "Not available in Floom Version 1.";
|
|
25
25
|
function usage() {
|
|
26
26
|
const out = `
|
|
27
|
-
${c.
|
|
28
|
-
${c.
|
|
29
|
-
${c.
|
|
30
|
-
${c.
|
|
31
|
-
${c.
|
|
27
|
+
${c.blue(" ________ ")}
|
|
28
|
+
${c.blue(" / ____/ /___ ____ ____ ___ ")} ${c.dim(`v${CLI_VERSION}`)}
|
|
29
|
+
${c.blue("/ /_ / / __ \\/ __ \\/ __ `__ \\ ")}
|
|
30
|
+
${c.blue("/ __/ / / /_/ / /_/ / / / / / / ")}
|
|
31
|
+
${c.blue("/_/ /_/\\____/\\____/_/ /_/ /_/ ")}
|
|
32
32
|
|
|
33
|
-
${c.bold("
|
|
34
|
-
${c.dim("
|
|
33
|
+
${c.bold("Floom lets you share AI workflows with anyone.")}
|
|
34
|
+
${c.dim("A skill is reusable knowledge, instructions, or a workflow for your AI agent.")}
|
|
35
|
+
${c.dim("Examples: brand voice, PR review checklist, sales research workflow.")}
|
|
35
36
|
|
|
36
|
-
${c.bold("
|
|
37
|
-
${c.dim("1. Add a skill someone sent you")}
|
|
38
|
-
${c.cyan("npx -y @floomhq/floom add")} ${c.dim("https://floom.dev/s/ffas93ud --target claude")}
|
|
37
|
+
${c.bold("You installed Floom. Copy one recipe:")}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
${c.cyan("npx -y @floomhq/floom login")}
|
|
45
|
-
${c.cyan("npx -y @floomhq/floom publish")} ${c.dim("support-tone.md --type instruction --public")}
|
|
39
|
+
${c.bold("1. I received a Floom link")}
|
|
40
|
+
${c.dim("Replace <skill-link> with the full Floom URL someone sent you:")}
|
|
41
|
+
${c.cyan("npx -y @floomhq/floom add")} ${c.dim("<skill-link> --setup")}
|
|
42
|
+
${c.dim('Then tell Claude Code: "Use my Floom skills when they fit this task."')}
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
${c.bold("2. I want to make a share link")}
|
|
45
|
+
${c.cyan("npx -y @floomhq/floom init")} ${c.dim("my-skill.md")}
|
|
46
|
+
${c.dim("Write what your agent needs to know or do in my-skill.md.")}
|
|
47
|
+
${c.cyan("npx -y @floomhq/floom login")}
|
|
48
|
+
${c.cyan("npx -y @floomhq/floom publish")} ${c.dim("my-skill.md --public")}
|
|
49
|
+
${c.dim("Floom scans it, prints a link, and copies the link when possible.")}
|
|
50
50
|
|
|
51
|
-
${c.bold("
|
|
52
|
-
|
|
51
|
+
${c.bold("Good to know")}
|
|
52
|
+
${symbols.ok} ${c.dim("No account is needed to add a shared skill.")}
|
|
53
|
+
${symbols.ok} ${c.dim("Sign in only when you publish or manage your skills.")}
|
|
54
|
+
${symbols.ok} ${c.dim("Every command prints success or the exact problem to fix.")}
|
|
53
55
|
|
|
54
|
-
${c.bold("
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
${c.bold("Stuck?")}
|
|
57
|
+
${c.cyan("npx -y @floomhq/floom doctor")} ${c.dim("Find the problem")}
|
|
58
|
+
${c.cyan("npx -y @floomhq/floom scan my-skill.md")} ${c.dim("Check a file before publishing")}
|
|
59
|
+
${c.cyan("npx -y @floomhq/floom commands")} ${c.dim("See every command")}
|
|
60
|
+
${c.dim("Step-by-step guide")} https://floom.dev/docs/getting-started
|
|
58
61
|
`;
|
|
59
62
|
process.stdout.write(out);
|
|
60
63
|
}
|
|
@@ -66,7 +69,7 @@ function commandUsage() {
|
|
|
66
69
|
${c.dim("Skills")}
|
|
67
70
|
${c.cyan("add")} ${c.dim("<url>")} Install a skill into the local agent skills folder
|
|
68
71
|
${c.dim("Alias: install")}
|
|
69
|
-
${c.dim("Flags: --target claude|codex (default: claude)")}
|
|
72
|
+
${c.dim("Flags: --target claude|codex (default: claude), --setup")}
|
|
70
73
|
${c.cyan("search")} ${c.dim("<query>")} Find public skills and libraries
|
|
71
74
|
${c.cyan("info")} ${c.dim("<url>")} Show skill metadata
|
|
72
75
|
|
|
@@ -268,6 +271,7 @@ function parseInfoFlags(argv) {
|
|
|
268
271
|
function parseAddArgs(argv) {
|
|
269
272
|
let slug;
|
|
270
273
|
let target;
|
|
274
|
+
let setup = false;
|
|
271
275
|
for (let i = 0; i < argv.length; i++) {
|
|
272
276
|
const a = argv[i] ?? "";
|
|
273
277
|
if (a === "--target" || a.startsWith("--target=")) {
|
|
@@ -278,19 +282,22 @@ function parseAddArgs(argv) {
|
|
|
278
282
|
target = value;
|
|
279
283
|
i = nextIndex;
|
|
280
284
|
}
|
|
285
|
+
else if (a === "--setup") {
|
|
286
|
+
setup = true;
|
|
287
|
+
}
|
|
281
288
|
else if (a.startsWith("--")) {
|
|
282
|
-
throw new FloomError(`Unknown flag: ${a}`, "Try `floom add <url-or-slug> --
|
|
289
|
+
throw new FloomError(`Unknown flag: ${a}`, "Try `floom add <url-or-slug> --setup`.");
|
|
283
290
|
}
|
|
284
291
|
else if (slug) {
|
|
285
|
-
throw new FloomError(`Unexpected argument: ${a}`, "Try `floom add <url-or-slug> --
|
|
292
|
+
throw new FloomError(`Unexpected argument: ${a}`, "Try `floom add <url-or-slug> --setup`.");
|
|
286
293
|
}
|
|
287
294
|
else
|
|
288
295
|
slug = a;
|
|
289
296
|
}
|
|
290
297
|
if (!slug) {
|
|
291
|
-
throw new FloomError("Missing skill slug.", "Try: `floom add <url-or-slug> --
|
|
298
|
+
throw new FloomError("Missing skill slug.", "Try: `floom add <url-or-slug> --setup`");
|
|
292
299
|
}
|
|
293
|
-
return target ? { slug, target } : { slug };
|
|
300
|
+
return target ? { slug, target, setup } : { slug, setup };
|
|
294
301
|
}
|
|
295
302
|
function parseSearchFlags(argv) {
|
|
296
303
|
const out = { json: false };
|
|
@@ -702,7 +709,13 @@ async function main() {
|
|
|
702
709
|
case "add":
|
|
703
710
|
case "install": {
|
|
704
711
|
const flags = parseAddArgs(rest);
|
|
705
|
-
await install(flags.slug,
|
|
712
|
+
await install(flags.slug, {
|
|
713
|
+
...(flags.target ? { target: flags.target } : {}),
|
|
714
|
+
setup: flags.setup,
|
|
715
|
+
});
|
|
716
|
+
if (flags.setup) {
|
|
717
|
+
await setupAgent({ target: flags.target ?? "claude", dryRun: false, yes: true });
|
|
718
|
+
}
|
|
706
719
|
return;
|
|
707
720
|
}
|
|
708
721
|
case "sync":
|
package/dist/install.js
CHANGED
|
@@ -201,6 +201,12 @@ export async function install(slugInput, opts = {}) {
|
|
|
201
201
|
process.stdout.write(`\n${symbols.ok} [floom] ${action} ${c.bold(slug)}\n`);
|
|
202
202
|
process.stdout.write(` ${c.dim(target)}\n\n`);
|
|
203
203
|
process.stdout.write(` ${c.bold("Next")}\n`);
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
if (opts.setup) {
|
|
205
|
+
process.stdout.write(` ${c.dim("1.")} Floom is connecting ${targetAgent === "claude" ? "Claude Code" : "Codex"} now.\n`);
|
|
206
|
+
process.stdout.write(` ${c.dim("2.")} Tell your agent to use ${c.bold(slug)} when it matches the task.\n\n`);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
process.stdout.write(` ${c.dim("1.")} Tell your agent to use ${c.bold(slug)} when it matches the task.\n`);
|
|
210
|
+
process.stdout.write(` ${c.dim("2.")} One-time setup: ${c.cyan(setupCommand(targetAgent))}\n\n`);
|
|
211
|
+
}
|
|
206
212
|
}
|
package/dist/ui.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import pc from "picocolors";
|
|
2
|
-
//
|
|
3
|
-
// picocolors only supports ANSI named colors, so we map:
|
|
4
|
-
// - coral / primary action: yellow (warm) for the dot, red for emphasis when needed
|
|
5
|
-
// - success: green
|
|
6
|
-
// - muted: gray (dim)
|
|
2
|
+
// Cool, restrained terminal palette. Keep orange out of the default CLI surface.
|
|
7
3
|
const isTty = process.stdout.isTTY === true;
|
|
8
4
|
export const c = {
|
|
9
|
-
coral: (s) => (isTty ? `\x1b[38;5;
|
|
5
|
+
coral: (s) => (isTty ? `\x1b[38;5;45m${s}\x1b[0m` : s),
|
|
6
|
+
blue: (s) => (isTty ? `\x1b[38;5;75m${s}\x1b[0m` : s),
|
|
10
7
|
teal: (s) => (isTty ? `\x1b[38;5;73m${s}\x1b[0m` : s),
|
|
11
8
|
green: pc.green,
|
|
12
9
|
red: pc.red,
|