@floomhq/floom 1.0.4 → 1.0.5

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.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +50 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,6 +7,7 @@ npm install -g @floomhq/floom
7
7
  floom init my-skill.md
8
8
  floom login
9
9
  floom publish my-skill.md
10
+ floom share my-skill --add teammate@example.com
10
11
  floom search review
11
12
  floom add awesome-skill
12
13
  floom setup --target claude --dry-run
@@ -21,6 +22,7 @@ Returns a shareable link like `https://floom.dev/s/ffas93ud`. Anyone with the UR
21
22
  - `floom login` — sign in with Google. New accounts are created on first login. Token stored at `~/.floom/config.json`.
22
23
  - `floom init [file.md]` — create a starter skill file.
23
24
  - `floom publish <file.md>` — upload a Markdown file. Optional `--public` / `--private` / `--unlisted`, `--type knowledge|instruction|workflow|skill`, `--installs-as <target>`, and `--version <label>`.
25
+ - `floom share <slug>` — email-share one of your skills. Optional `--add <email>`, `--remove <email>`, and `--list`.
24
26
  - `floom list` — show your published skills. Optional `--json`.
25
27
  - `floom add <url-or-slug>` — fetch a skill into `~/.claude/skills/<slug>.md`.
26
28
  - `floom info <url-or-slug>` — show skill metadata. Optional `--json`.
package/dist/cli.js CHANGED
@@ -15,6 +15,7 @@ import { printMcpSetup } from "./mcp.js";
15
15
  import { setupAgent } from "./setup.js";
16
16
  import { search } from "./search.js";
17
17
  import { scanSkill } from "./scan.js";
18
+ import { share } from "./share.js";
18
19
  import { libraryAddSkill, libraryCreate, libraryList, libraryRemoveSkill, librarySubscribe, libraryUnsubscribe, moveSkill, } from "./library.js";
19
20
  import { c, symbols } from "./ui.js";
20
21
  import { printError, FloomError } from "./errors.js";
@@ -75,6 +76,8 @@ function commandUsage() {
75
76
  ${c.cyan("publish")} ${c.dim("<path>")} Scan, publish, and print a share link
76
77
  ${c.dim("Flags: --public, --private, --type knowledge|instruction|workflow|skill")}
77
78
  ${c.dim(" --skill-version <label>")}
79
+ ${c.cyan("share")} ${c.dim("<slug>")} Email-share one of your skills
80
+ ${c.dim("Flags: --add <email>, --remove <email>, --list")}
78
81
 
79
82
  ${c.dim("Account")}
80
83
  ${c.cyan("login")} Authenticate
@@ -184,6 +187,43 @@ function parseFlags(argv) {
184
187
  }
185
188
  return out;
186
189
  }
190
+ function parseShareFlags(argv) {
191
+ const out = { list: false, add: [], remove: [] };
192
+ for (let i = 0; i < argv.length; i++) {
193
+ const a = argv[i] ?? "";
194
+ if (a === "--list") {
195
+ out.list = true;
196
+ }
197
+ else if (a === "--add" || a.startsWith("--add=")) {
198
+ const { value, nextIndex } = readFlagValue(argv, i, "--add");
199
+ out.add.push(value);
200
+ i = nextIndex;
201
+ }
202
+ else if (a === "--remove" || a.startsWith("--remove=")) {
203
+ const { value, nextIndex } = readFlagValue(argv, i, "--remove");
204
+ out.remove.push(value);
205
+ i = nextIndex;
206
+ }
207
+ else if (a.startsWith("--")) {
208
+ throw new FloomError(`Unknown flag: ${a}`, "Try `floom share <slug> --add person@example.com`.");
209
+ }
210
+ else if (!out.slug) {
211
+ out.slug = a;
212
+ }
213
+ else {
214
+ throw new FloomError(`Unexpected argument: ${a}`, "Try `floom share <slug> --add person@example.com`.");
215
+ }
216
+ }
217
+ if (!out.slug)
218
+ throw new FloomError("Missing skill slug.", "Try `floom share <slug> --add person@example.com`.");
219
+ if (out.list && (out.add.length > 0 || out.remove.length > 0)) {
220
+ throw new FloomError("Conflicting share flags.", "Use --list by itself, or use --add/--remove.");
221
+ }
222
+ if (!out.list && out.add.length === 0 && out.remove.length === 0) {
223
+ throw new FloomError("Missing share action.", "Try `floom share <slug> --add person@example.com`.");
224
+ }
225
+ return out;
226
+ }
187
227
  function parseInitArgs(argv) {
188
228
  let file;
189
229
  for (const a of argv) {
@@ -625,7 +665,16 @@ async function main() {
625
665
  return;
626
666
  }
627
667
  case "share":
628
- notAvailable("`floom share`");
668
+ {
669
+ const flags = parseShareFlags(rest);
670
+ if (flags.list) {
671
+ await share({ slug: flags.slug ?? "", kind: "list" });
672
+ }
673
+ else {
674
+ await share({ slug: flags.slug ?? "", kind: "patch", add: flags.add, remove: flags.remove });
675
+ }
676
+ }
677
+ return;
629
678
  case "list": {
630
679
  const flags = parseListFlags(rest);
631
680
  await list(flags);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floomhq/floom",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Publish AI skills from your terminal. Share with a link.",
5
5
  "license": "MIT",
6
6
  "type": "module",