@amirhosseinnateghi/vibed-cli 0.1.7 → 0.1.9

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
@@ -11,8 +11,8 @@ vibed whoami | logout
11
11
  ```
12
12
 
13
13
  Flags: `--api <url>` (or `VIBED_API`), `--entry <file>`, `--no-build`,
14
- `--title`, `--caption`, `--category`, `--tags a,b`, `--unlisted`, `--no-remix`,
15
- `--yes`, `--json`.
14
+ `--title`, `--tags a,b` (up to 5 from the curated set — `vibed publish --help`),
15
+ `--unlisted`, `--no-remix`, `--yes`, `--json`.
16
16
 
17
17
  See [docs/connector.md](../../docs/connector.md) for the full guide (login flow,
18
18
  what "vibeable" means, agent/AGENTS.md integration). The bundler reuses
package/dist/index.js CHANGED
@@ -6047,6 +6047,25 @@ var CATEGORIES = [
6047
6047
  "Art",
6048
6048
  "Other"
6049
6049
  ];
6050
+ var TAGS = [
6051
+ "game",
6052
+ "puzzle",
6053
+ "quiz",
6054
+ "simulation",
6055
+ "music",
6056
+ "art",
6057
+ "animation",
6058
+ "story",
6059
+ "invitation",
6060
+ "love",
6061
+ "education",
6062
+ "science",
6063
+ "news",
6064
+ "tool",
6065
+ "productivity"
6066
+ ];
6067
+ var MAX_TAGS = 5;
6068
+ var FEED_TAG_CHIPS = ["All", ...TAGS];
6050
6069
  var VISIBILITY = ["public", "unlisted"];
6051
6070
  var COVER_MODES = ["image", "gif"];
6052
6071
  var EXPERIENCE_SOURCE = ["builder", "import", "remix"];
@@ -10323,15 +10342,22 @@ var categorySchema = external_exports.enum(CATEGORIES);
10323
10342
  var visibilitySchema = external_exports.enum(VISIBILITY);
10324
10343
  var coverModeSchema = external_exports.enum(COVER_MODES);
10325
10344
  var sourceSchema = external_exports.enum(EXPERIENCE_SOURCE);
10326
- var tagsSchema = external_exports.array(external_exports.string().min(1).max(40)).max(10).transform(
10345
+ var KNOWN_TAGS = new Set(TAGS);
10346
+ var tagsSchema = external_exports.array(external_exports.string().max(40)).transform(
10327
10347
  (tags) => Array.from(
10328
- new Set(tags.map((t) => t.replace(/^#/, "").trim().toLowerCase()).filter(Boolean))
10329
- )
10348
+ new Set(
10349
+ tags.map((t) => t.replace(/^#/, "").trim().toLowerCase()).filter((t) => KNOWN_TAGS.has(t))
10350
+ )
10351
+ ).slice(0, MAX_TAGS)
10330
10352
  ).default([]);
10331
10353
  var publishSchema = external_exports.object({
10332
10354
  title: external_exports.string().min(1).max(120),
10355
+ // Caption was removed from the publish UI; kept optional so old clients / the
10356
+ // CLI don't break and existing captions stay searchable.
10333
10357
  caption: external_exports.string().max(2e3).default(""),
10334
- category: categorySchema,
10358
+ // Legacy: category is no longer chosen in the UI. The connector CLI may still
10359
+ // send it; publishExperience folds it into `tags` and leaves the column null.
10360
+ category: categorySchema.optional(),
10335
10361
  tags: tagsSchema,
10336
10362
  remixable: external_exports.boolean().default(true),
10337
10363
  visibility: visibilitySchema.default("public"),
@@ -10444,7 +10470,8 @@ var aiConnectionSchema = external_exports.object({
10444
10470
  });
10445
10471
  var feedQuerySchema = external_exports.object({
10446
10472
  tab: external_exports.enum(["explore", "following"]).default("explore"),
10447
- category: external_exports.string().optional(),
10473
+ // Filter the explore feed to a single tag (replaces the old `category` param).
10474
+ tag: external_exports.string().optional(),
10448
10475
  cursor: external_exports.string().optional(),
10449
10476
  limit: external_exports.coerce.number().int().min(1).max(30).default(10)
10450
10477
  });
@@ -11380,10 +11407,14 @@ function inferTitle(html, projectDir) {
11380
11407
  const dir2 = basename(projectDir).replace(/[-_]+/g, " ").trim();
11381
11408
  return (dir2 || "Untitled").slice(0, 120);
11382
11409
  }
11383
- function normalizeCategory(input) {
11384
- if (!input) return "Other";
11385
- const match = CATEGORIES.find((c) => c.toLowerCase() === input.toLowerCase());
11386
- return match ?? "Other";
11410
+ function normalizeTags(tags, category) {
11411
+ const known = new Set(TAGS);
11412
+ const out2 = [];
11413
+ for (const t of [...tags ?? [], ...category ? [category] : []]) {
11414
+ const s = t.replace(/^#/, "").trim().toLowerCase();
11415
+ if (known.has(s) && !out2.includes(s)) out2.push(s);
11416
+ }
11417
+ return out2.slice(0, MAX_TAGS);
11387
11418
  }
11388
11419
  async function importDraft(client, html) {
11389
11420
  const r = await apiFetch(client, "POST", "/imports", { html });
@@ -11392,9 +11423,7 @@ async function importDraft(client, html) {
11392
11423
  async function publishDraft(client, draftArtifactKey, meta, html, projectDir) {
11393
11424
  const exp = await apiFetch(client, "POST", "/experiences", {
11394
11425
  title: meta.title?.trim() || (html ? inferTitle(html, projectDir ?? ".") : "Untitled"),
11395
- caption: meta.caption ?? "",
11396
- category: normalizeCategory(meta.category),
11397
- tags: meta.tags ?? [],
11426
+ tags: normalizeTags(meta.tags, meta.category),
11398
11427
  remixable: meta.remixable ?? true,
11399
11428
  visibility: meta.visibility ?? "public",
11400
11429
  draftArtifactKey
@@ -11538,8 +11567,8 @@ Flags:
11538
11567
  --no-build Don't run the project's build step
11539
11568
  --json Machine-readable output
11540
11569
  Publish only:
11541
- --title <t> --caption <c> --category <Game|Tool|Art|Story|Quiz|News|Invitation|Other>
11542
- --tags a,b,c --unlisted --no-remix --yes (skip confirmation)`;
11570
+ --title <t> --tags <a,b,c> --unlisted --no-remix --yes (skip confirmation)
11571
+ tags (pick from): ${TAGS.join(", ")}`;
11543
11572
  async function cmdCheck(args) {
11544
11573
  const json = isTrue(args.flags.json);
11545
11574
  const dir2 = resolve2(args._[1] ?? ".");
@@ -11595,7 +11624,8 @@ Preview \u2192 ${file2}`);
11595
11624
  function metaFromArgs(args) {
11596
11625
  return {
11597
11626
  title: str(args.flags.title),
11598
- caption: str(args.flags.caption),
11627
+ // --category is deprecated (folded into tags server- and client-side); still
11628
+ // parsed so old scripts keep working. Caption was removed.
11599
11629
  category: str(args.flags.category),
11600
11630
  tags: typeof args.flags.tags === "string" ? args.flags.tags.split(",").map((t) => t.trim()).filter(Boolean) : void 0,
11601
11631
  remixable: !isTrue(args.flags["no-remix"]),
@@ -11641,7 +11671,7 @@ async function cmdDraft(args) {
11641
11671
  json,
11642
11672
  `
11643
11673
  \u2713 Preview (not published): ${d.previewUrl ?? "(no preview URL)"}
11644
- Publish it with: vibed publish --draft-key ${d.draftArtifactKey} --title "\u2026" --category <Cat>`,
11674
+ Publish it with: vibed publish --draft-key ${d.draftArtifactKey} --title "\u2026" --tags <a,b>`,
11645
11675
  { ok: true, ...d }
11646
11676
  );
11647
11677
  return 0;
package/dist/vibed.cjs CHANGED
@@ -6048,6 +6048,25 @@ var CATEGORIES = [
6048
6048
  "Art",
6049
6049
  "Other"
6050
6050
  ];
6051
+ var TAGS = [
6052
+ "game",
6053
+ "puzzle",
6054
+ "quiz",
6055
+ "simulation",
6056
+ "music",
6057
+ "art",
6058
+ "animation",
6059
+ "story",
6060
+ "invitation",
6061
+ "love",
6062
+ "education",
6063
+ "science",
6064
+ "news",
6065
+ "tool",
6066
+ "productivity"
6067
+ ];
6068
+ var MAX_TAGS = 5;
6069
+ var FEED_TAG_CHIPS = ["All", ...TAGS];
6051
6070
  var VISIBILITY = ["public", "unlisted"];
6052
6071
  var COVER_MODES = ["image", "gif"];
6053
6072
  var EXPERIENCE_SOURCE = ["builder", "import", "remix"];
@@ -10324,15 +10343,22 @@ var categorySchema = external_exports.enum(CATEGORIES);
10324
10343
  var visibilitySchema = external_exports.enum(VISIBILITY);
10325
10344
  var coverModeSchema = external_exports.enum(COVER_MODES);
10326
10345
  var sourceSchema = external_exports.enum(EXPERIENCE_SOURCE);
10327
- var tagsSchema = external_exports.array(external_exports.string().min(1).max(40)).max(10).transform(
10346
+ var KNOWN_TAGS = new Set(TAGS);
10347
+ var tagsSchema = external_exports.array(external_exports.string().max(40)).transform(
10328
10348
  (tags) => Array.from(
10329
- new Set(tags.map((t) => t.replace(/^#/, "").trim().toLowerCase()).filter(Boolean))
10330
- )
10349
+ new Set(
10350
+ tags.map((t) => t.replace(/^#/, "").trim().toLowerCase()).filter((t) => KNOWN_TAGS.has(t))
10351
+ )
10352
+ ).slice(0, MAX_TAGS)
10331
10353
  ).default([]);
10332
10354
  var publishSchema = external_exports.object({
10333
10355
  title: external_exports.string().min(1).max(120),
10356
+ // Caption was removed from the publish UI; kept optional so old clients / the
10357
+ // CLI don't break and existing captions stay searchable.
10334
10358
  caption: external_exports.string().max(2e3).default(""),
10335
- category: categorySchema,
10359
+ // Legacy: category is no longer chosen in the UI. The connector CLI may still
10360
+ // send it; publishExperience folds it into `tags` and leaves the column null.
10361
+ category: categorySchema.optional(),
10336
10362
  tags: tagsSchema,
10337
10363
  remixable: external_exports.boolean().default(true),
10338
10364
  visibility: visibilitySchema.default("public"),
@@ -10445,7 +10471,8 @@ var aiConnectionSchema = external_exports.object({
10445
10471
  });
10446
10472
  var feedQuerySchema = external_exports.object({
10447
10473
  tab: external_exports.enum(["explore", "following"]).default("explore"),
10448
- category: external_exports.string().optional(),
10474
+ // Filter the explore feed to a single tag (replaces the old `category` param).
10475
+ tag: external_exports.string().optional(),
10449
10476
  cursor: external_exports.string().optional(),
10450
10477
  limit: external_exports.coerce.number().int().min(1).max(30).default(10)
10451
10478
  });
@@ -11381,10 +11408,14 @@ function inferTitle(html, projectDir) {
11381
11408
  const dir2 = (0, import_node_path3.basename)(projectDir).replace(/[-_]+/g, " ").trim();
11382
11409
  return (dir2 || "Untitled").slice(0, 120);
11383
11410
  }
11384
- function normalizeCategory(input) {
11385
- if (!input) return "Other";
11386
- const match = CATEGORIES.find((c) => c.toLowerCase() === input.toLowerCase());
11387
- return match ?? "Other";
11411
+ function normalizeTags(tags, category) {
11412
+ const known = new Set(TAGS);
11413
+ const out2 = [];
11414
+ for (const t of [...tags ?? [], ...category ? [category] : []]) {
11415
+ const s = t.replace(/^#/, "").trim().toLowerCase();
11416
+ if (known.has(s) && !out2.includes(s)) out2.push(s);
11417
+ }
11418
+ return out2.slice(0, MAX_TAGS);
11388
11419
  }
11389
11420
  async function importDraft(client, html) {
11390
11421
  const r = await apiFetch(client, "POST", "/imports", { html });
@@ -11393,9 +11424,7 @@ async function importDraft(client, html) {
11393
11424
  async function publishDraft(client, draftArtifactKey, meta, html, projectDir) {
11394
11425
  const exp = await apiFetch(client, "POST", "/experiences", {
11395
11426
  title: meta.title?.trim() || (html ? inferTitle(html, projectDir ?? ".") : "Untitled"),
11396
- caption: meta.caption ?? "",
11397
- category: normalizeCategory(meta.category),
11398
- tags: meta.tags ?? [],
11427
+ tags: normalizeTags(meta.tags, meta.category),
11399
11428
  remixable: meta.remixable ?? true,
11400
11429
  visibility: meta.visibility ?? "public",
11401
11430
  draftArtifactKey
@@ -11539,8 +11568,8 @@ Flags:
11539
11568
  --no-build Don't run the project's build step
11540
11569
  --json Machine-readable output
11541
11570
  Publish only:
11542
- --title <t> --caption <c> --category <Game|Tool|Art|Story|Quiz|News|Invitation|Other>
11543
- --tags a,b,c --unlisted --no-remix --yes (skip confirmation)`;
11571
+ --title <t> --tags <a,b,c> --unlisted --no-remix --yes (skip confirmation)
11572
+ tags (pick from): ${TAGS.join(", ")}`;
11544
11573
  async function cmdCheck(args) {
11545
11574
  const json = isTrue(args.flags.json);
11546
11575
  const dir2 = (0, import_node_path4.resolve)(args._[1] ?? ".");
@@ -11596,7 +11625,8 @@ Preview \u2192 ${file2}`);
11596
11625
  function metaFromArgs(args) {
11597
11626
  return {
11598
11627
  title: str(args.flags.title),
11599
- caption: str(args.flags.caption),
11628
+ // --category is deprecated (folded into tags server- and client-side); still
11629
+ // parsed so old scripts keep working. Caption was removed.
11600
11630
  category: str(args.flags.category),
11601
11631
  tags: typeof args.flags.tags === "string" ? args.flags.tags.split(",").map((t) => t.trim()).filter(Boolean) : void 0,
11602
11632
  remixable: !isTrue(args.flags["no-remix"]),
@@ -11642,7 +11672,7 @@ async function cmdDraft(args) {
11642
11672
  json,
11643
11673
  `
11644
11674
  \u2713 Preview (not published): ${d.previewUrl ?? "(no preview URL)"}
11645
- Publish it with: vibed publish --draft-key ${d.draftArtifactKey} --title "\u2026" --category <Cat>`,
11675
+ Publish it with: vibed publish --draft-key ${d.draftArtifactKey} --title "\u2026" --tags <a,b>`,
11646
11676
  { ok: true, ...d }
11647
11677
  );
11648
11678
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amirhosseinnateghi/vibed-cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "make it vibed — check, bundle, and publish a project to vibed from the terminal",
5
5
  "license": "MIT",
6
6
  "type": "module",