mobbin-cli 1.0.0 → 1.1.0

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
- import { defineCommand as defineCommand7, runMain } from "citty";
4
+ import { defineCommand as defineCommand8, runMain } from "citty";
5
5
 
6
6
  // src/commands/apps.ts
7
7
  import { defineCommand } from "citty";
@@ -348,9 +348,192 @@ var collectionsCommand = defineCommand3({
348
348
  }
349
349
  });
350
350
 
351
- // src/commands/filters.ts
351
+ // src/commands/completion.ts
352
352
  import { defineCommand as defineCommand4 } from "citty";
353
- var listCommand3 = defineCommand4({
353
+ var resolveCommand = (cmd) => {
354
+ if (typeof cmd === "function") return void 0;
355
+ return cmd;
356
+ };
357
+ var extractCommands = (subCommands) => {
358
+ const result = {};
359
+ for (const [name, rawCmd] of Object.entries(subCommands)) {
360
+ const cmd = resolveCommand(rawCmd);
361
+ if (!cmd) continue;
362
+ const meta = cmd.meta;
363
+ const description = meta?.description ?? name;
364
+ const subs = {};
365
+ if (cmd.subCommands && typeof cmd.subCommands === "object") {
366
+ for (const [subName, rawSub] of Object.entries(cmd.subCommands)) {
367
+ const sub = resolveCommand(rawSub);
368
+ const subMeta = sub?.meta;
369
+ subs[subName] = subMeta?.description ?? subName;
370
+ }
371
+ }
372
+ result[name] = { description, subs };
373
+ }
374
+ return result;
375
+ };
376
+ var commonFlags = ["--platform", "--patterns", "--elements", "--sort", "--limit", "--table"];
377
+ var generateZsh = (commands) => {
378
+ const esc = (s) => s.replace(/'/g, "'\\''");
379
+ const topLevelNames = Object.keys(commands);
380
+ const subcases = topLevelNames.filter((cmd) => Object.keys(commands[cmd].subs).length > 0).map((cmd) => {
381
+ const subs = Object.entries(commands[cmd].subs).map(([name, desc]) => `'${name}:${esc(desc)}'`).join(" ");
382
+ return ` ${cmd})
383
+ local -a subcmds
384
+ subcmds=(${subs})
385
+ _describe 'subcommand' subcmds
386
+ ;;`;
387
+ }).join("\n");
388
+ return `#compdef mobbin
389
+
390
+ _mobbin() {
391
+ local -a top_commands
392
+ top_commands=(
393
+ ${topLevelNames.map((c) => ` '${c}:${esc(commands[c].description)}'`).join("\n")}
394
+ )
395
+
396
+ if (( CURRENT == 2 )); then
397
+ _describe 'command' top_commands
398
+ return
399
+ fi
400
+
401
+ local cmd="\${words[2]}"
402
+
403
+ if (( CURRENT == 3 )); then
404
+ case "$cmd" in
405
+ ${subcases}
406
+ esac
407
+ return
408
+ fi
409
+
410
+ _arguments \\
411
+ '--platform[Target platform (ios, android, web)]' \\
412
+ '--patterns[Screen patterns]' \\
413
+ '--elements[UI elements]' \\
414
+ '--sort[Sort order (trending, publishedAt, popularity)]' \\
415
+ '--limit[Number of results]' \\
416
+ '--table[Table output]'
417
+ }
418
+
419
+ compdef _mobbin mobbin
420
+ `;
421
+ };
422
+ var generateBash = (commands) => {
423
+ const topLevelNames = Object.keys(commands);
424
+ const subcases = topLevelNames.filter((cmd) => Object.keys(commands[cmd].subs).length > 0).map((cmd) => {
425
+ const subs = Object.keys(commands[cmd].subs).join(" ");
426
+ return ` ${cmd})
427
+ COMPREPLY=( $(compgen -W "${subs}" -- "$cur") )
428
+ return
429
+ ;;`;
430
+ }).join("\n");
431
+ return `_mobbin() {
432
+ local cur prev cmd
433
+ cur="\${COMP_WORDS[COMP_CWORD]}"
434
+ prev="\${COMP_WORDS[COMP_CWORD-1]}"
435
+
436
+ if [[ \${COMP_CWORD} -eq 1 ]]; then
437
+ COMPREPLY=( $(compgen -W "${topLevelNames.join(" ")}" -- "$cur") )
438
+ return
439
+ fi
440
+
441
+ cmd="\${COMP_WORDS[1]}"
442
+
443
+ if [[ \${COMP_CWORD} -eq 2 ]]; then
444
+ case "$cmd" in
445
+ ${subcases}
446
+ esac
447
+ return
448
+ fi
449
+
450
+ COMPREPLY=( $(compgen -W "${commonFlags.join(" ")}" -- "$cur") )
451
+ }
452
+
453
+ complete -F _mobbin mobbin
454
+ `;
455
+ };
456
+ var generateFish = (commands) => {
457
+ const esc = (s) => s.replace(/'/g, "\\'");
458
+ const topLevelNames = Object.keys(commands);
459
+ const lines = [
460
+ "# Disable file completions by default",
461
+ "complete -c mobbin -f",
462
+ "",
463
+ "# Top-level commands",
464
+ ...topLevelNames.map(
465
+ (cmd) => `complete -c mobbin -n '__fish_use_subcommand' -a '${cmd}' -d '${esc(commands[cmd].description)}'`
466
+ ),
467
+ "",
468
+ "# Subcommands"
469
+ ];
470
+ for (const cmd of topLevelNames) {
471
+ const subs = commands[cmd].subs;
472
+ const subNames = Object.keys(subs);
473
+ if (subNames.length > 0) {
474
+ const condition = `__fish_seen_subcommand_from ${cmd}; and not __fish_seen_subcommand_from ${subNames.join(" ")}`;
475
+ for (const [sub, desc] of Object.entries(subs)) {
476
+ lines.push(`complete -c mobbin -n '${condition}' -a '${sub}' -d '${esc(desc)}'`);
477
+ }
478
+ lines.push("");
479
+ }
480
+ }
481
+ lines.push("# Common flags");
482
+ for (const cmd of topLevelNames) {
483
+ const subNames = Object.keys(commands[cmd].subs);
484
+ if (subNames.length > 0) {
485
+ const condition = `__fish_seen_subcommand_from ${subNames.join(" ")}`;
486
+ lines.push(`complete -c mobbin -n '${condition}' -l platform -d 'Target platform'`);
487
+ lines.push(`complete -c mobbin -n '${condition}' -l patterns -d 'Screen patterns'`);
488
+ lines.push(`complete -c mobbin -n '${condition}' -l sort -d 'Sort order'`);
489
+ lines.push(`complete -c mobbin -n '${condition}' -l limit -d 'Number of results'`);
490
+ lines.push(`complete -c mobbin -n '${condition}' -l table -d 'Table output'`);
491
+ }
492
+ }
493
+ return `${lines.join("\n")}
494
+ `;
495
+ };
496
+ var createCompletionCommand = (subCommands) => {
497
+ const commands = extractCommands(subCommands);
498
+ commands.completion = {
499
+ description: "Generate shell completion script",
500
+ subs: {}
501
+ };
502
+ return defineCommand4({
503
+ meta: {
504
+ name: "completion",
505
+ description: "Generate shell completion script"
506
+ },
507
+ args: {
508
+ shell: {
509
+ type: "string",
510
+ description: "Target shell (zsh, bash, fish)",
511
+ default: "zsh"
512
+ }
513
+ },
514
+ run({ args }) {
515
+ switch (args.shell) {
516
+ case "zsh":
517
+ process.stdout.write(generateZsh(commands));
518
+ break;
519
+ case "bash":
520
+ process.stdout.write(generateBash(commands));
521
+ break;
522
+ case "fish":
523
+ process.stdout.write(generateFish(commands));
524
+ break;
525
+ default:
526
+ process.stderr.write(`Unsupported shell: ${args.shell}. Use zsh, bash or fish.
527
+ `);
528
+ process.exit(1);
529
+ }
530
+ }
531
+ });
532
+ };
533
+
534
+ // src/commands/filters.ts
535
+ import { defineCommand as defineCommand5 } from "citty";
536
+ var listCommand3 = defineCommand5({
354
537
  meta: {
355
538
  name: "list",
356
539
  description: "List all available filter categories and values"
@@ -406,7 +589,7 @@ var listCommand3 = defineCommand4({
406
589
  console.log(JSON.stringify(categories, null, 2));
407
590
  }
408
591
  });
409
- var filtersCommand = defineCommand4({
592
+ var filtersCommand = defineCommand5({
410
593
  meta: {
411
594
  name: "filters",
412
595
  description: "Browse available filter categories"
@@ -422,7 +605,7 @@ import { writeFile } from "fs/promises";
422
605
  import { tmpdir } from "os";
423
606
  import { join as join2 } from "path";
424
607
  import { platform } from "process";
425
- import { defineCommand as defineCommand5 } from "citty";
608
+ import { defineCommand as defineCommand6 } from "citty";
426
609
  var copyImageToClipboard = (filePath) => {
427
610
  switch (platform) {
428
611
  case "darwin": {
@@ -456,7 +639,7 @@ var copyImageToClipboard = (filePath) => {
456
639
  throw new Error(`Clipboard not supported on ${platform}`);
457
640
  }
458
641
  };
459
- var searchCommand2 = defineCommand5({
642
+ var searchCommand2 = defineCommand6({
460
643
  meta: {
461
644
  name: "search",
462
645
  description: "Search screens by patterns, elements, keywords"
@@ -539,7 +722,7 @@ var searchCommand2 = defineCommand5({
539
722
  console.log(JSON.stringify(result, null, 2));
540
723
  }
541
724
  });
542
- var downloadCommand = defineCommand5({
725
+ var downloadCommand = defineCommand6({
543
726
  meta: {
544
727
  name: "download",
545
728
  description: "Download screen images"
@@ -621,7 +804,7 @@ var downloadCommand = defineCommand5({
621
804
  console.log(JSON.stringify({ downloaded }, null, 2));
622
805
  }
623
806
  });
624
- var copyCommand = defineCommand5({
807
+ var copyCommand = defineCommand6({
625
808
  meta: {
626
809
  name: "copy",
627
810
  description: "Copy a screen image to clipboard"
@@ -705,7 +888,7 @@ var copyCommand = defineCommand5({
705
888
  );
706
889
  }
707
890
  });
708
- var screensCommand = defineCommand5({
891
+ var screensCommand = defineCommand6({
709
892
  meta: {
710
893
  name: "screens",
711
894
  description: "Search and download screen designs"
@@ -718,31 +901,35 @@ var screensCommand = defineCommand5({
718
901
  });
719
902
 
720
903
  // src/commands/version.ts
721
- import { defineCommand as defineCommand6 } from "citty";
722
- var versionCommand = defineCommand6({
904
+ import { defineCommand as defineCommand7 } from "citty";
905
+ var versionCommand = defineCommand7({
723
906
  meta: {
724
907
  name: "version",
725
908
  description: "Show CLI version"
726
909
  },
727
910
  run: () => {
728
- console.log(true ? "1.0.0" : "0.0.0");
911
+ console.log(true ? "1.1.0" : "0.0.0");
729
912
  }
730
913
  });
731
914
 
732
915
  // src/index.ts
733
- var main = defineCommand7({
916
+ var appCommands = {
917
+ auth: authCommand,
918
+ screens: screensCommand,
919
+ apps: appsCommand,
920
+ filters: filtersCommand,
921
+ collections: collectionsCommand,
922
+ version: versionCommand
923
+ };
924
+ var main = defineCommand8({
734
925
  meta: {
735
926
  name: "mobbin",
736
- version: true ? "1.0.0" : "0.0.0",
927
+ version: true ? "1.1.0" : "0.0.0",
737
928
  description: "CLI for Mobbin - browse and download design references"
738
929
  },
739
930
  subCommands: {
740
- auth: authCommand,
741
- screens: screensCommand,
742
- apps: appsCommand,
743
- filters: filtersCommand,
744
- collections: collectionsCommand,
745
- version: versionCommand
931
+ ...appCommands,
932
+ completion: createCompletionCommand(appCommands)
746
933
  }
747
934
  });
748
935
  runMain(main);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/commands/apps.ts","../src/client.ts","../src/config.ts","../src/output.ts","../src/commands/auth.ts","../src/commands/collections.ts","../src/commands/filters.ts","../src/commands/screens.ts","../src/commands/version.ts"],"sourcesContent":["import { defineCommand, runMain } from \"citty\";\nimport { appsCommand } from \"./commands/apps.js\";\nimport { authCommand } from \"./commands/auth.js\";\nimport { collectionsCommand } from \"./commands/collections.js\";\nimport { filtersCommand } from \"./commands/filters.js\";\nimport { screensCommand } from \"./commands/screens.js\";\nimport { versionCommand } from \"./commands/version.js\";\n\ndeclare const __VERSION__: string;\n\nconst main = defineCommand({\n\tmeta: {\n\t\tname: \"mobbin\",\n\t\tversion: typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0\",\n\t\tdescription: \"CLI for Mobbin - browse and download design references\",\n\t},\n\tsubCommands: {\n\t\tauth: authCommand,\n\t\tscreens: screensCommand,\n\t\tapps: appsCommand,\n\t\tfilters: filtersCommand,\n\t\tcollections: collectionsCommand,\n\t\tversion: versionCommand,\n\t},\n});\n\nrunMain(main);\n","import { defineCommand } from \"citty\";\nimport type { Platform, SortBy } from \"mobbin-sdk\";\nimport { getClient } from \"../client.js\";\nimport { outputTable } from \"../output.js\";\n\nconst searchCommand = defineCommand({\n\tmeta: {\n\t\tname: \"search\",\n\t\tdescription: \"Search apps\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Number of results\",\n\t\t\tdefault: \"20\",\n\t\t\talias: \"l\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst result = await client.apps.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: Number.parseInt(args.limit, 10),\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Name\", \"Platform\", \"Tagline\"],\n\t\t\t\tresult.data.map((a) => [a.appName, a.platform, a.appTagline?.slice(0, 50) ?? \"\"]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(result, null, 2));\n\t},\n});\n\nconst listCommand = defineCommand({\n\tmeta: {\n\t\tname: \"list\",\n\t\tdescription: \"List all searchable apps for a platform\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\t\tconst apps = await client.apps.list(args.platform as Platform);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Name\", \"Platform\", \"Tagline\"],\n\t\t\t\tapps.slice(0, 50).map((a) => [a.appName, a.platform, a.appTagline?.slice(0, 50) ?? \"\"]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(apps, null, 2));\n\t},\n});\n\nconst popularCommand = defineCommand({\n\tmeta: {\n\t\tname: \"popular\",\n\t\tdescription: \"Get popular apps\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Limit per category\",\n\t\t\tdefault: \"10\",\n\t\t\talias: \"l\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\t\tconst apps = await client.apps.popular(\n\t\t\targs.platform as Platform,\n\t\t\tNumber.parseInt(args.limit, 10),\n\t\t);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Name\", \"Category\", \"Popularity\"],\n\t\t\t\tapps.map((a) => [a.app_name, a.app_category, String(a.popularity_metric)]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(apps, null, 2));\n\t},\n});\n\nexport const appsCommand = defineCommand({\n\tmeta: {\n\t\tname: \"apps\",\n\t\tdescription: \"Search and browse apps\",\n\t},\n\tsubCommands: {\n\t\tsearch: searchCommand,\n\t\tlist: listCommand,\n\t\tpopular: popularCommand,\n\t},\n});\n","import { MobbinClient } from \"mobbin-sdk\";\nimport { isSessionExpired, loadSession, saveSession } from \"./config.js\";\n\nexport const getClient = async (): Promise<MobbinClient> => {\n\tconst session = loadSession();\n\n\tif (!session) {\n\t\tconsole.error(\"Not logged in. Run `mobbin auth login` first.\");\n\t\tprocess.exit(1);\n\t}\n\n\tconst client = new MobbinClient({ session });\n\n\tif (isSessionExpired(session)) {\n\t\ttry {\n\t\t\tconst newSession = await client.auth.refresh(session.refresh_token);\n\t\t\tsaveSession(newSession);\n\t\t\tclient.session = newSession;\n\t\t} catch {\n\t\t\tconsole.error(\"Session expired. Run `mobbin auth login` to re-authenticate.\");\n\t\t\tprocess.exit(1);\n\t\t}\n\t} else {\n\t\tawait client.init();\n\t}\n\n\treturn client;\n};\n","import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { SupabaseSession } from \"mobbin-sdk\";\n\nconst CONFIG_DIR = join(homedir(), \".config\", \"mobbin\");\nconst AUTH_FILE = join(CONFIG_DIR, \"auth.json\");\n\nconst ensureConfigDir = () => {\n\tif (!existsSync(CONFIG_DIR)) {\n\t\tmkdirSync(CONFIG_DIR, { recursive: true });\n\t}\n};\n\nexport const saveSession = (session: SupabaseSession): void => {\n\tensureConfigDir();\n\twriteFileSync(AUTH_FILE, JSON.stringify(session, null, 2), { mode: 0o600 });\n};\n\nexport const loadSession = (): SupabaseSession | null => {\n\tif (!existsSync(AUTH_FILE)) return null;\n\ttry {\n\t\tconst data = readFileSync(AUTH_FILE, \"utf-8\");\n\t\treturn JSON.parse(data) as SupabaseSession;\n\t} catch {\n\t\treturn null;\n\t}\n};\n\nexport const clearSession = (): void => {\n\tif (existsSync(AUTH_FILE)) {\n\t\tunlinkSync(AUTH_FILE);\n\t}\n};\n\nexport const isSessionExpired = (session: SupabaseSession): boolean => {\n\t// expires_at is in seconds\n\treturn Date.now() / 1000 >= session.expires_at;\n};\n","import Table from \"cli-table3\";\n\nexport type OutputFormat = \"json\" | \"table\";\n\nexport const getFormat = (args: { json?: boolean }): OutputFormat => {\n\treturn args.json ? \"json\" : \"json\"; // Default to json for AI consumption\n};\n\nexport const output = (data: unknown, format: OutputFormat = \"json\"): void => {\n\tif (format === \"json\") {\n\t\tconsole.log(JSON.stringify(data, null, 2));\n\t\treturn;\n\t}\n\n\t// Table format handled by specific commands\n\tconsole.log(JSON.stringify(data, null, 2));\n};\n\nexport const outputTable = (headers: string[], rows: string[][]): void => {\n\tconst table = new Table({\n\t\thead: headers,\n\t\tstyle: { head: [\"cyan\"] },\n\t});\n\tfor (const row of rows) {\n\t\ttable.push(row);\n\t}\n\tconsole.log(table.toString());\n};\n","import * as p from \"@clack/prompts\";\nimport { defineCommand } from \"citty\";\nimport { MobbinClient } from \"mobbin-sdk\";\nimport { clearSession, loadSession, saveSession } from \"../config.js\";\n\nconst loginCommand = defineCommand({\n\tmeta: {\n\t\tname: \"login\",\n\t\tdescription: \"Login to Mobbin\",\n\t},\n\targs: {\n\t\temail: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Email address\",\n\t\t\talias: \"e\",\n\t\t},\n\t\tpassword: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Password\",\n\t\t\talias: \"p\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tlet email = args.email || process.env.MOBBIN_EMAIL;\n\t\tlet password = args.password || process.env.MOBBIN_PASSWORD;\n\n\t\tif (!email || !password) {\n\t\t\tp.intro(\"Mobbin Login\");\n\n\t\t\tif (!email) {\n\t\t\t\tconst result = await p.text({\n\t\t\t\t\tmessage: \"Email:\",\n\t\t\t\t\tvalidate: (v) => (v.includes(\"@\") ? undefined : \"Invalid email\"),\n\t\t\t\t});\n\t\t\t\tif (p.isCancel(result)) process.exit(0);\n\t\t\t\temail = result;\n\t\t\t}\n\n\t\t\tif (!password) {\n\t\t\t\tconst result = await p.password({\n\t\t\t\t\tmessage: \"Password:\",\n\t\t\t\t});\n\t\t\t\tif (p.isCancel(result)) process.exit(0);\n\t\t\t\tpassword = result;\n\t\t\t}\n\t\t}\n\n\t\tconst client = new MobbinClient();\n\t\tconst authType = await client.auth.checkEmail(email);\n\n\t\tif (authType !== \"password\") {\n\t\t\tconsole.error(\n\t\t\t\t`This account uses ${authType} authentication, which is not supported by the CLI.`,\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst session = await client.auth.login(email, password);\n\t\tsaveSession(session);\n\n\t\tconsole.log(\n\t\t\tJSON.stringify({\n\t\t\t\tstatus: \"ok\",\n\t\t\t\temail: session.user.email,\n\t\t\t\tuserId: session.user.id,\n\t\t\t}),\n\t\t);\n\t},\n});\n\nconst logoutCommand = defineCommand({\n\tmeta: {\n\t\tname: \"logout\",\n\t\tdescription: \"Logout from Mobbin\",\n\t},\n\trun: () => {\n\t\tclearSession();\n\t\tconsole.log(JSON.stringify({ status: \"ok\", message: \"Logged out\" }));\n\t},\n});\n\nconst statusCommand = defineCommand({\n\tmeta: {\n\t\tname: \"status\",\n\t\tdescription: \"Show current auth status\",\n\t},\n\trun: () => {\n\t\tconst session = loadSession();\n\t\tif (!session) {\n\t\t\tconsole.log(JSON.stringify({ authenticated: false }));\n\t\t\treturn;\n\t\t}\n\n\t\tconst expired = Date.now() / 1000 >= session.expires_at;\n\t\tconsole.log(\n\t\t\tJSON.stringify({\n\t\t\t\tauthenticated: true,\n\t\t\t\texpired,\n\t\t\t\temail: session.user.email,\n\t\t\t\tuserId: session.user.id,\n\t\t\t\texpiresAt: new Date(session.expires_at * 1000).toISOString(),\n\t\t\t}),\n\t\t);\n\t},\n});\n\nexport const authCommand = defineCommand({\n\tmeta: {\n\t\tname: \"auth\",\n\t\tdescription: \"Authentication management\",\n\t},\n\tsubCommands: {\n\t\tlogin: loginCommand,\n\t\tlogout: logoutCommand,\n\t\tstatus: statusCommand,\n\t},\n});\n","import { defineCommand } from \"citty\";\nimport { getClient } from \"../client.js\";\n\nconst listCommand = defineCommand({\n\tmeta: {\n\t\tname: \"list\",\n\t\tdescription: \"List your collections\",\n\t},\n\trun: async () => {\n\t\tconst client = await getClient();\n\t\tconst collections = await client.collections.list();\n\t\tconsole.log(JSON.stringify(collections, null, 2));\n\t},\n});\n\nexport const collectionsCommand = defineCommand({\n\tmeta: {\n\t\tname: \"collections\",\n\t\tdescription: \"Manage your collections\",\n\t},\n\tsubCommands: {\n\t\tlist: listCommand,\n\t},\n});\n","import { defineCommand } from \"citty\";\nimport { getClient } from \"../client.js\";\nimport { outputTable } from \"../output.js\";\n\nconst listCommand = defineCommand({\n\tmeta: {\n\t\tname: \"list\",\n\t\tdescription: \"List all available filter categories and values\",\n\t},\n\targs: {\n\t\tcategory: {\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"Filter category slug (e.g. screenPatterns, screenElements, appCategories, flowActions)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\t\tconst categories = await client.filters.list();\n\n\t\tif (args.category) {\n\t\t\tconst cat = categories.find((c) => c.slug === args.category);\n\t\t\tif (!cat) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Category \"${args.category}\" not found. Available: ${categories.map((c) => c.slug).join(\", \")}`,\n\t\t\t\t);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tif (args.table) {\n\t\t\t\tconst rows: string[][] = [];\n\t\t\t\tfor (const sub of cat.subCategories) {\n\t\t\t\t\tfor (const entry of sub.entries) {\n\t\t\t\t\t\trows.push([entry.displayName, sub.displayName, entry.definition?.slice(0, 60) ?? \"\"]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutputTable([\"Name\", \"Sub-category\", \"Definition\"], rows);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log(JSON.stringify(cat, null, 2));\n\t\t\treturn;\n\t\t}\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Slug\", \"Display Name\", \"Experience\", \"Entries\"],\n\t\t\t\tcategories.map((c) => [\n\t\t\t\t\tc.slug,\n\t\t\t\t\tc.displayName,\n\t\t\t\t\tc.experience,\n\t\t\t\t\tString(c.subCategories.reduce((acc, s) => acc + s.entries.length, 0)),\n\t\t\t\t]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(categories, null, 2));\n\t},\n});\n\nexport const filtersCommand = defineCommand({\n\tmeta: {\n\t\tname: \"filters\",\n\t\tdescription: \"Browse available filter categories\",\n\t},\n\tsubCommands: {\n\t\tlist: listCommand,\n\t},\n});\n","import { execSync } from \"node:child_process\";\nimport { writeFile } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { platform } from \"node:process\";\nimport { defineCommand } from \"citty\";\n\nconst copyImageToClipboard = (filePath: string): void => {\n\tswitch (platform) {\n\t\tcase \"darwin\": {\n\t\t\t// Convert to PNG first (sips handles webp), then copy via osascript\n\t\t\tconst pngPath = `${filePath}.png`;\n\t\t\texecSync(`sips -s format png \"${filePath}\" --out \"${pngPath}\" > /dev/null 2>&1`);\n\t\t\texecSync(\n\t\t\t\t`osascript -e 'set the clipboard to (read (POSIX file \"${pngPath}\") as «class PNGf»)'`,\n\t\t\t);\n\t\t\texecSync(`rm -f \"${pngPath}\"`);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"linux\":\n\t\t\t// xclip or xsel — xclip is more common for image clipboard\n\t\t\ttry {\n\t\t\t\texecSync(\"which xclip > /dev/null 2>&1\");\n\t\t\t\texecSync(`xclip -selection clipboard -t image/webp -i \"${filePath}\"`);\n\t\t\t} catch {\n\t\t\t\ttry {\n\t\t\t\t\texecSync(\"which wl-copy > /dev/null 2>&1\");\n\t\t\t\t\texecSync(`wl-copy < \"${filePath}\"`);\n\t\t\t\t} catch {\n\t\t\t\t\tthrow new Error(\"Install xclip or wl-copy to use clipboard on Linux\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"win32\":\n\t\t\t// PowerShell clip\n\t\t\texecSync(\n\t\t\t\t`powershell -command \"Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::FromFile('${filePath}'))\"`,\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Error(`Clipboard not supported on ${platform}`);\n\t}\n};\nimport type { Platform, SortBy } from \"mobbin-sdk\";\nimport { getClient } from \"../client.js\";\nimport { outputTable } from \"../output.js\";\n\nconst searchCommand = defineCommand({\n\tmeta: {\n\t\tname: \"search\",\n\t\tdescription: \"Search screens by patterns, elements, keywords\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tpatterns: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Screen patterns (comma-separated, e.g. Signup,Login)\",\n\t\t},\n\t\telements: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"UI elements (comma-separated, e.g. Button,Card)\",\n\t\t},\n\t\tkeywords: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Text search in screenshots\",\n\t\t\talias: \"k\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated, e.g. Finance,Shopping)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tanimation: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Filter for animated screens only\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Number of results\",\n\t\t\tdefault: \"24\",\n\t\t\talias: \"l\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table instead of JSON\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst result = await client.screens.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tscreenPatterns: args.patterns ? args.patterns.split(\",\") : null,\n\t\t\t\tscreenElements: args.elements ? args.elements.split(\",\") : null,\n\t\t\t\tscreenKeywords: args.keywords ?? null,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t\thasAnimation: args.animation ?? null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: Number.parseInt(args.limit, 10),\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"App\", \"Pattern\", \"Elements\", \"URL\"],\n\t\t\t\tresult.data.map((s) => [\n\t\t\t\t\ts.appName,\n\t\t\t\t\ts.screenPatterns.join(\", \"),\n\t\t\t\t\ts.screenElements.slice(0, 3).join(\", \"),\n\t\t\t\t\ts.screenCdnImgSources?.src ?? s.screenUrl,\n\t\t\t\t]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(result, null, 2));\n\t},\n});\n\nconst downloadCommand = defineCommand({\n\tmeta: {\n\t\tname: \"download\",\n\t\tdescription: \"Download screen images\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tpatterns: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Screen patterns (comma-separated)\",\n\t\t},\n\t\telements: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"UI elements (comma-separated)\",\n\t\t},\n\t\tkeywords: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Text search in screenshots\",\n\t\t\talias: \"k\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Number of screens to download\",\n\t\t\tdefault: \"5\",\n\t\t\talias: \"l\",\n\t\t},\n\t\toutput: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Output directory\",\n\t\t\tdefault: \".\",\n\t\t\talias: \"o\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst result = await client.screens.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tscreenPatterns: args.patterns ? args.patterns.split(\",\") : null,\n\t\t\t\tscreenElements: args.elements ? args.elements.split(\",\") : null,\n\t\t\t\tscreenKeywords: args.keywords ?? null,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: Number.parseInt(args.limit, 10),\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tconst downloaded: { file: string; app: string; patterns: string[] }[] = [];\n\n\t\tfor (const screen of result.data) {\n\t\t\tconst cdnSrc = screen.screenCdnImgSources?.src;\n\t\t\tif (!cdnSrc) continue;\n\t\t\tconst buffer = await client.screens.download(cdnSrc);\n\t\t\tconst safeName = screen.appName.replace(/[^a-zA-Z0-9]/g, \"_\").toLowerCase();\n\t\t\tconst filename = `${safeName}_${screen.id.slice(0, 8)}.webp`;\n\t\t\tconst filepath = join(args.output, filename);\n\n\t\t\tawait writeFile(filepath, Buffer.from(buffer));\n\t\t\tdownloaded.push({\n\t\t\t\tfile: filepath,\n\t\t\t\tapp: screen.appName,\n\t\t\t\tpatterns: screen.screenPatterns,\n\t\t\t});\n\t\t}\n\n\t\tconsole.log(JSON.stringify({ downloaded }, null, 2));\n\t},\n});\n\nconst copyCommand = defineCommand({\n\tmeta: {\n\t\tname: \"copy\",\n\t\tdescription: \"Copy a screen image to clipboard\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tpatterns: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Screen patterns (comma-separated)\",\n\t\t},\n\t\telements: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"UI elements (comma-separated)\",\n\t\t},\n\t\tkeywords: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Text search in screenshots\",\n\t\t\talias: \"k\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tindex: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Index of the screen to copy (0-based, from search results)\",\n\t\t\tdefault: \"0\",\n\t\t\talias: \"i\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst idx = Number.parseInt(args.index, 10);\n\t\tconst result = await client.screens.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tscreenPatterns: args.patterns ? args.patterns.split(\",\") : null,\n\t\t\t\tscreenElements: args.elements ? args.elements.split(\",\") : null,\n\t\t\t\tscreenKeywords: args.keywords ?? null,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: idx + 1,\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tconst screen = result.data[idx];\n\t\tif (!screen) {\n\t\t\tconsole.error(`No screen found at index ${idx}`);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst cdnSrc = screen.screenCdnImgSources?.src;\n\t\tif (!cdnSrc) {\n\t\t\tconsole.error(\"No CDN image available for this screen\");\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst buffer = await client.screens.download(cdnSrc);\n\t\tconst tmpFile = join(tmpdir(), `mobbin_${screen.id.slice(0, 8)}.png`);\n\n\t\tawait writeFile(tmpFile, Buffer.from(buffer));\n\t\tcopyImageToClipboard(tmpFile);\n\t\texecSync(`rm -f \"${tmpFile}\"`);\n\n\t\tconsole.log(\n\t\t\tJSON.stringify({\n\t\t\t\tcopied: true,\n\t\t\t\tapp: screen.appName,\n\t\t\t\tpatterns: screen.screenPatterns,\n\t\t\t\tid: screen.id,\n\t\t\t}),\n\t\t);\n\t},\n});\n\nexport const screensCommand = defineCommand({\n\tmeta: {\n\t\tname: \"screens\",\n\t\tdescription: \"Search and download screen designs\",\n\t},\n\tsubCommands: {\n\t\tsearch: searchCommand,\n\t\tdownload: downloadCommand,\n\t\tcopy: copyCommand,\n\t},\n});\n","import { defineCommand } from \"citty\";\n\ndeclare const __VERSION__: string;\n\nexport const versionCommand = defineCommand({\n\tmeta: {\n\t\tname: \"version\",\n\t\tdescription: \"Show CLI version\",\n\t},\n\trun: () => {\n\t\tconsole.log(typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0\");\n\t},\n});\n"],"mappings":";;;AAAA,SAAS,iBAAAA,gBAAe,eAAe;;;ACAvC,SAAS,qBAAqB;;;ACA9B,SAAS,oBAAoB;;;ACA7B,SAAS,YAAY,WAAW,cAAc,YAAY,qBAAqB;AAC/E,SAAS,eAAe;AACxB,SAAS,YAAY;AAGrB,IAAM,aAAa,KAAK,QAAQ,GAAG,WAAW,QAAQ;AACtD,IAAM,YAAY,KAAK,YAAY,WAAW;AAE9C,IAAM,kBAAkB,MAAM;AAC7B,MAAI,CAAC,WAAW,UAAU,GAAG;AAC5B,cAAU,YAAY,EAAE,WAAW,KAAK,CAAC;AAAA,EAC1C;AACD;AAEO,IAAM,cAAc,CAAC,YAAmC;AAC9D,kBAAgB;AAChB,gBAAc,WAAW,KAAK,UAAU,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,IAAM,CAAC;AAC3E;AAEO,IAAM,cAAc,MAA8B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,CAAC;;;ACnUD,SAAS,iBAAAG,sBAAqB;AAIvB,IAAM,iBAAiBA,eAAc;AAAA,EAC3C,MAAM;AAAA,IACL,MAAM;AAAA,IACN,aAAa;AAAA,EACd;AAAA,EACA,KAAK,MAAM;AACV,YAAQ,IAAI,OAAqC,UAAc,OAAO;AAAA,EACvE;AACD,CAAC;;;ATFD,IAAM,OAAOC,eAAc;AAAA,EAC1B,MAAM;AAAA,IACL,MAAM;AAAA,IACN,SAAS,OAAqC,UAAc;AAAA,IAC5D,aAAa;AAAA,EACd;AAAA,EACA,aAAa;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,SAAS;AAAA,EACV;AACD,CAAC;AAED,QAAQ,IAAI;","names":["defineCommand","defineCommand","MobbinClient","defineCommand","password","MobbinClient","defineCommand","listCommand","defineCommand","defineCommand","listCommand","defineCommand","join","defineCommand","searchCommand","defineCommand","join","defineCommand","defineCommand"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/commands/apps.ts","../src/client.ts","../src/config.ts","../src/output.ts","../src/commands/auth.ts","../src/commands/collections.ts","../src/commands/completion.ts","../src/commands/filters.ts","../src/commands/screens.ts","../src/commands/version.ts"],"sourcesContent":["import { defineCommand, runMain } from \"citty\";\nimport { appsCommand } from \"./commands/apps.js\";\nimport { authCommand } from \"./commands/auth.js\";\nimport { collectionsCommand } from \"./commands/collections.js\";\nimport { createCompletionCommand } from \"./commands/completion.js\";\nimport { filtersCommand } from \"./commands/filters.js\";\nimport { screensCommand } from \"./commands/screens.js\";\nimport { versionCommand } from \"./commands/version.js\";\n\ndeclare const __VERSION__: string;\n\nconst appCommands = {\n\tauth: authCommand,\n\tscreens: screensCommand,\n\tapps: appsCommand,\n\tfilters: filtersCommand,\n\tcollections: collectionsCommand,\n\tversion: versionCommand,\n};\n\nconst main = defineCommand({\n\tmeta: {\n\t\tname: \"mobbin\",\n\t\tversion: typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0\",\n\t\tdescription: \"CLI for Mobbin - browse and download design references\",\n\t},\n\tsubCommands: {\n\t\t...appCommands,\n\t\tcompletion: createCompletionCommand(appCommands),\n\t},\n});\n\nrunMain(main);\n","import { defineCommand } from \"citty\";\nimport type { Platform, SortBy } from \"mobbin-sdk\";\nimport { getClient } from \"../client.js\";\nimport { outputTable } from \"../output.js\";\n\nconst searchCommand = defineCommand({\n\tmeta: {\n\t\tname: \"search\",\n\t\tdescription: \"Search apps\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Number of results\",\n\t\t\tdefault: \"20\",\n\t\t\talias: \"l\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst result = await client.apps.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: Number.parseInt(args.limit, 10),\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Name\", \"Platform\", \"Tagline\"],\n\t\t\t\tresult.data.map((a) => [a.appName, a.platform, a.appTagline?.slice(0, 50) ?? \"\"]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(result, null, 2));\n\t},\n});\n\nconst listCommand = defineCommand({\n\tmeta: {\n\t\tname: \"list\",\n\t\tdescription: \"List all searchable apps for a platform\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\t\tconst apps = await client.apps.list(args.platform as Platform);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Name\", \"Platform\", \"Tagline\"],\n\t\t\t\tapps.slice(0, 50).map((a) => [a.appName, a.platform, a.appTagline?.slice(0, 50) ?? \"\"]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(apps, null, 2));\n\t},\n});\n\nconst popularCommand = defineCommand({\n\tmeta: {\n\t\tname: \"popular\",\n\t\tdescription: \"Get popular apps\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Limit per category\",\n\t\t\tdefault: \"10\",\n\t\t\talias: \"l\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\t\tconst apps = await client.apps.popular(\n\t\t\targs.platform as Platform,\n\t\t\tNumber.parseInt(args.limit, 10),\n\t\t);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Name\", \"Category\", \"Popularity\"],\n\t\t\t\tapps.map((a) => [a.app_name, a.app_category, String(a.popularity_metric)]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(apps, null, 2));\n\t},\n});\n\nexport const appsCommand = defineCommand({\n\tmeta: {\n\t\tname: \"apps\",\n\t\tdescription: \"Search and browse apps\",\n\t},\n\tsubCommands: {\n\t\tsearch: searchCommand,\n\t\tlist: listCommand,\n\t\tpopular: popularCommand,\n\t},\n});\n","import { MobbinClient } from \"mobbin-sdk\";\nimport { isSessionExpired, loadSession, saveSession } from \"./config.js\";\n\nexport const getClient = async (): Promise<MobbinClient> => {\n\tconst session = loadSession();\n\n\tif (!session) {\n\t\tconsole.error(\"Not logged in. Run `mobbin auth login` first.\");\n\t\tprocess.exit(1);\n\t}\n\n\tconst client = new MobbinClient({ session });\n\n\tif (isSessionExpired(session)) {\n\t\ttry {\n\t\t\tconst newSession = await client.auth.refresh(session.refresh_token);\n\t\t\tsaveSession(newSession);\n\t\t\tclient.session = newSession;\n\t\t} catch {\n\t\t\tconsole.error(\"Session expired. Run `mobbin auth login` to re-authenticate.\");\n\t\t\tprocess.exit(1);\n\t\t}\n\t} else {\n\t\tawait client.init();\n\t}\n\n\treturn client;\n};\n","import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { SupabaseSession } from \"mobbin-sdk\";\n\nconst CONFIG_DIR = join(homedir(), \".config\", \"mobbin\");\nconst AUTH_FILE = join(CONFIG_DIR, \"auth.json\");\n\nconst ensureConfigDir = () => {\n\tif (!existsSync(CONFIG_DIR)) {\n\t\tmkdirSync(CONFIG_DIR, { recursive: true });\n\t}\n};\n\nexport const saveSession = (session: SupabaseSession): void => {\n\tensureConfigDir();\n\twriteFileSync(AUTH_FILE, JSON.stringify(session, null, 2), { mode: 0o600 });\n};\n\nexport const loadSession = (): SupabaseSession | null => {\n\tif (!existsSync(AUTH_FILE)) return null;\n\ttry {\n\t\tconst data = readFileSync(AUTH_FILE, \"utf-8\");\n\t\treturn JSON.parse(data) as SupabaseSession;\n\t} catch {\n\t\treturn null;\n\t}\n};\n\nexport const clearSession = (): void => {\n\tif (existsSync(AUTH_FILE)) {\n\t\tunlinkSync(AUTH_FILE);\n\t}\n};\n\nexport const isSessionExpired = (session: SupabaseSession): boolean => {\n\t// expires_at is in seconds\n\treturn Date.now() / 1000 >= session.expires_at;\n};\n","import Table from \"cli-table3\";\n\nexport type OutputFormat = \"json\" | \"table\";\n\nexport const getFormat = (args: { json?: boolean }): OutputFormat => {\n\treturn args.json ? \"json\" : \"json\"; // Default to json for AI consumption\n};\n\nexport const output = (data: unknown, format: OutputFormat = \"json\"): void => {\n\tif (format === \"json\") {\n\t\tconsole.log(JSON.stringify(data, null, 2));\n\t\treturn;\n\t}\n\n\t// Table format handled by specific commands\n\tconsole.log(JSON.stringify(data, null, 2));\n};\n\nexport const outputTable = (headers: string[], rows: string[][]): void => {\n\tconst table = new Table({\n\t\thead: headers,\n\t\tstyle: { head: [\"cyan\"] },\n\t});\n\tfor (const row of rows) {\n\t\ttable.push(row);\n\t}\n\tconsole.log(table.toString());\n};\n","import * as p from \"@clack/prompts\";\nimport { defineCommand } from \"citty\";\nimport { MobbinClient } from \"mobbin-sdk\";\nimport { clearSession, loadSession, saveSession } from \"../config.js\";\n\nconst loginCommand = defineCommand({\n\tmeta: {\n\t\tname: \"login\",\n\t\tdescription: \"Login to Mobbin\",\n\t},\n\targs: {\n\t\temail: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Email address\",\n\t\t\talias: \"e\",\n\t\t},\n\t\tpassword: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Password\",\n\t\t\talias: \"p\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tlet email = args.email || process.env.MOBBIN_EMAIL;\n\t\tlet password = args.password || process.env.MOBBIN_PASSWORD;\n\n\t\tif (!email || !password) {\n\t\t\tp.intro(\"Mobbin Login\");\n\n\t\t\tif (!email) {\n\t\t\t\tconst result = await p.text({\n\t\t\t\t\tmessage: \"Email:\",\n\t\t\t\t\tvalidate: (v) => (v.includes(\"@\") ? undefined : \"Invalid email\"),\n\t\t\t\t});\n\t\t\t\tif (p.isCancel(result)) process.exit(0);\n\t\t\t\temail = result;\n\t\t\t}\n\n\t\t\tif (!password) {\n\t\t\t\tconst result = await p.password({\n\t\t\t\t\tmessage: \"Password:\",\n\t\t\t\t});\n\t\t\t\tif (p.isCancel(result)) process.exit(0);\n\t\t\t\tpassword = result;\n\t\t\t}\n\t\t}\n\n\t\tconst client = new MobbinClient();\n\t\tconst authType = await client.auth.checkEmail(email);\n\n\t\tif (authType !== \"password\") {\n\t\t\tconsole.error(\n\t\t\t\t`This account uses ${authType} authentication, which is not supported by the CLI.`,\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst session = await client.auth.login(email, password);\n\t\tsaveSession(session);\n\n\t\tconsole.log(\n\t\t\tJSON.stringify({\n\t\t\t\tstatus: \"ok\",\n\t\t\t\temail: session.user.email,\n\t\t\t\tuserId: session.user.id,\n\t\t\t}),\n\t\t);\n\t},\n});\n\nconst logoutCommand = defineCommand({\n\tmeta: {\n\t\tname: \"logout\",\n\t\tdescription: \"Logout from Mobbin\",\n\t},\n\trun: () => {\n\t\tclearSession();\n\t\tconsole.log(JSON.stringify({ status: \"ok\", message: \"Logged out\" }));\n\t},\n});\n\nconst statusCommand = defineCommand({\n\tmeta: {\n\t\tname: \"status\",\n\t\tdescription: \"Show current auth status\",\n\t},\n\trun: () => {\n\t\tconst session = loadSession();\n\t\tif (!session) {\n\t\t\tconsole.log(JSON.stringify({ authenticated: false }));\n\t\t\treturn;\n\t\t}\n\n\t\tconst expired = Date.now() / 1000 >= session.expires_at;\n\t\tconsole.log(\n\t\t\tJSON.stringify({\n\t\t\t\tauthenticated: true,\n\t\t\t\texpired,\n\t\t\t\temail: session.user.email,\n\t\t\t\tuserId: session.user.id,\n\t\t\t\texpiresAt: new Date(session.expires_at * 1000).toISOString(),\n\t\t\t}),\n\t\t);\n\t},\n});\n\nexport const authCommand = defineCommand({\n\tmeta: {\n\t\tname: \"auth\",\n\t\tdescription: \"Authentication management\",\n\t},\n\tsubCommands: {\n\t\tlogin: loginCommand,\n\t\tlogout: logoutCommand,\n\t\tstatus: statusCommand,\n\t},\n});\n","import { defineCommand } from \"citty\";\nimport { getClient } from \"../client.js\";\n\nconst listCommand = defineCommand({\n\tmeta: {\n\t\tname: \"list\",\n\t\tdescription: \"List your collections\",\n\t},\n\trun: async () => {\n\t\tconst client = await getClient();\n\t\tconst collections = await client.collections.list();\n\t\tconsole.log(JSON.stringify(collections, null, 2));\n\t},\n});\n\nexport const collectionsCommand = defineCommand({\n\tmeta: {\n\t\tname: \"collections\",\n\t\tdescription: \"Manage your collections\",\n\t},\n\tsubCommands: {\n\t\tlist: listCommand,\n\t},\n});\n","import type { CommandDef, SubCommandsDef } from \"citty\";\nimport { defineCommand } from \"citty\";\n\ntype CommandInfo = {\n\tdescription: string;\n\tsubs: Record<string, string>;\n};\n\nconst resolveCommand = (cmd: CommandDef | (() => Promise<CommandDef>)): CommandDef | undefined => {\n\tif (typeof cmd === \"function\") return undefined;\n\treturn cmd;\n};\n\nconst extractCommands = (subCommands: SubCommandsDef): Record<string, CommandInfo> => {\n\tconst result: Record<string, CommandInfo> = {};\n\n\tfor (const [name, rawCmd] of Object.entries(subCommands)) {\n\t\tconst cmd = resolveCommand(rawCmd as CommandDef | (() => Promise<CommandDef>));\n\t\tif (!cmd) continue;\n\n\t\tconst meta = cmd.meta as { description?: string } | undefined;\n\t\tconst description = meta?.description ?? name;\n\t\tconst subs: Record<string, string> = {};\n\n\t\tif (cmd.subCommands && typeof cmd.subCommands === \"object\") {\n\t\t\tfor (const [subName, rawSub] of Object.entries(cmd.subCommands as SubCommandsDef)) {\n\t\t\t\tconst sub = resolveCommand(rawSub as CommandDef | (() => Promise<CommandDef>));\n\t\t\t\tconst subMeta = sub?.meta as { description?: string } | undefined;\n\t\t\t\tsubs[subName] = subMeta?.description ?? subName;\n\t\t\t}\n\t\t}\n\n\t\tresult[name] = { description, subs };\n\t}\n\n\treturn result;\n};\n\nconst commonFlags = [\"--platform\", \"--patterns\", \"--elements\", \"--sort\", \"--limit\", \"--table\"];\n\nconst generateZsh = (commands: Record<string, CommandInfo>): string => {\n\tconst esc = (s: string) => s.replace(/'/g, \"'\\\\''\");\n\tconst topLevelNames = Object.keys(commands);\n\n\tconst subcases = topLevelNames\n\t\t.filter((cmd) => Object.keys(commands[cmd].subs).length > 0)\n\t\t.map((cmd) => {\n\t\t\tconst subs = Object.entries(commands[cmd].subs)\n\t\t\t\t.map(([name, desc]) => `'${name}:${esc(desc)}'`)\n\t\t\t\t.join(\" \");\n\t\t\treturn `\\t\\t\\t${cmd})\\n\\t\\t\\t\\tlocal -a subcmds\\n\\t\\t\\t\\tsubcmds=(${subs})\\n\\t\\t\\t\\t_describe 'subcommand' subcmds\\n\\t\\t\\t\\t;;`;\n\t\t})\n\t\t.join(\"\\n\");\n\n\treturn `#compdef mobbin\n\n_mobbin() {\n\\tlocal -a top_commands\n\\ttop_commands=(\n${topLevelNames.map((c) => `\\t\\t'${c}:${esc(commands[c].description)}'`).join(\"\\n\")}\n\\t)\n\n\\tif (( CURRENT == 2 )); then\n\\t\\t_describe 'command' top_commands\n\\t\\treturn\n\\tfi\n\n\\tlocal cmd=\"\\${words[2]}\"\n\n\\tif (( CURRENT == 3 )); then\n\\t\\tcase \"$cmd\" in\n${subcases}\n\\t\\tesac\n\\t\\treturn\n\\tfi\n\n\\t_arguments \\\\\n\\t\\t'--platform[Target platform (ios, android, web)]' \\\\\n\\t\\t'--patterns[Screen patterns]' \\\\\n\\t\\t'--elements[UI elements]' \\\\\n\\t\\t'--sort[Sort order (trending, publishedAt, popularity)]' \\\\\n\\t\\t'--limit[Number of results]' \\\\\n\\t\\t'--table[Table output]'\n}\n\ncompdef _mobbin mobbin\n`;\n};\n\nconst generateBash = (commands: Record<string, CommandInfo>): string => {\n\tconst topLevelNames = Object.keys(commands);\n\n\tconst subcases = topLevelNames\n\t\t.filter((cmd) => Object.keys(commands[cmd].subs).length > 0)\n\t\t.map((cmd) => {\n\t\t\tconst subs = Object.keys(commands[cmd].subs).join(\" \");\n\t\t\treturn `\\t\\t\\t${cmd})\\n\\t\\t\\t\\tCOMPREPLY=( $(compgen -W \"${subs}\" -- \"$cur\") )\\n\\t\\t\\t\\treturn\\n\\t\\t\\t\\t;;`;\n\t\t})\n\t\t.join(\"\\n\");\n\n\treturn `_mobbin() {\n\\tlocal cur prev cmd\n\\tcur=\"\\${COMP_WORDS[COMP_CWORD]}\"\n\\tprev=\"\\${COMP_WORDS[COMP_CWORD-1]}\"\n\n\\tif [[ \\${COMP_CWORD} -eq 1 ]]; then\n\\t\\tCOMPREPLY=( $(compgen -W \"${topLevelNames.join(\" \")}\" -- \"$cur\") )\n\\t\\treturn\n\\tfi\n\n\\tcmd=\"\\${COMP_WORDS[1]}\"\n\n\\tif [[ \\${COMP_CWORD} -eq 2 ]]; then\n\\t\\tcase \"$cmd\" in\n${subcases}\n\\t\\tesac\n\\t\\treturn\n\\tfi\n\n\\tCOMPREPLY=( $(compgen -W \"${commonFlags.join(\" \")}\" -- \"$cur\") )\n}\n\ncomplete -F _mobbin mobbin\n`;\n};\n\nconst generateFish = (commands: Record<string, CommandInfo>): string => {\n\tconst esc = (s: string) => s.replace(/'/g, \"\\\\'\");\n\tconst topLevelNames = Object.keys(commands);\n\n\tconst lines = [\n\t\t\"# Disable file completions by default\",\n\t\t\"complete -c mobbin -f\",\n\t\t\"\",\n\t\t\"# Top-level commands\",\n\t\t...topLevelNames.map(\n\t\t\t(cmd) =>\n\t\t\t\t`complete -c mobbin -n '__fish_use_subcommand' -a '${cmd}' -d '${esc(commands[cmd].description)}'`,\n\t\t),\n\t\t\"\",\n\t\t\"# Subcommands\",\n\t];\n\n\tfor (const cmd of topLevelNames) {\n\t\tconst subs = commands[cmd].subs;\n\t\tconst subNames = Object.keys(subs);\n\t\tif (subNames.length > 0) {\n\t\t\tconst condition = `__fish_seen_subcommand_from ${cmd}; and not __fish_seen_subcommand_from ${subNames.join(\" \")}`;\n\t\t\tfor (const [sub, desc] of Object.entries(subs)) {\n\t\t\t\tlines.push(`complete -c mobbin -n '${condition}' -a '${sub}' -d '${esc(desc)}'`);\n\t\t\t}\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\n\tlines.push(\"# Common flags\");\n\tfor (const cmd of topLevelNames) {\n\t\tconst subNames = Object.keys(commands[cmd].subs);\n\t\tif (subNames.length > 0) {\n\t\t\tconst condition = `__fish_seen_subcommand_from ${subNames.join(\" \")}`;\n\t\t\tlines.push(`complete -c mobbin -n '${condition}' -l platform -d 'Target platform'`);\n\t\t\tlines.push(`complete -c mobbin -n '${condition}' -l patterns -d 'Screen patterns'`);\n\t\t\tlines.push(`complete -c mobbin -n '${condition}' -l sort -d 'Sort order'`);\n\t\t\tlines.push(`complete -c mobbin -n '${condition}' -l limit -d 'Number of results'`);\n\t\t\tlines.push(`complete -c mobbin -n '${condition}' -l table -d 'Table output'`);\n\t\t}\n\t}\n\n\treturn `${lines.join(\"\\n\")}\\n`;\n};\n\nexport const createCompletionCommand = (subCommands: SubCommandsDef) => {\n\tconst commands = extractCommands(subCommands);\n\n\tcommands.completion = {\n\t\tdescription: \"Generate shell completion script\",\n\t\tsubs: {},\n\t};\n\n\treturn defineCommand({\n\t\tmeta: {\n\t\t\tname: \"completion\",\n\t\t\tdescription: \"Generate shell completion script\",\n\t\t},\n\t\targs: {\n\t\t\tshell: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"Target shell (zsh, bash, fish)\",\n\t\t\t\tdefault: \"zsh\",\n\t\t\t},\n\t\t},\n\t\trun({ args }) {\n\t\t\tswitch (args.shell) {\n\t\t\t\tcase \"zsh\":\n\t\t\t\t\tprocess.stdout.write(generateZsh(commands));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"bash\":\n\t\t\t\t\tprocess.stdout.write(generateBash(commands));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"fish\":\n\t\t\t\t\tprocess.stdout.write(generateFish(commands));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprocess.stderr.write(`Unsupported shell: ${args.shell}. Use zsh, bash or fish.\\n`);\n\t\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t},\n\t});\n};\n","import { defineCommand } from \"citty\";\nimport { getClient } from \"../client.js\";\nimport { outputTable } from \"../output.js\";\n\nconst listCommand = defineCommand({\n\tmeta: {\n\t\tname: \"list\",\n\t\tdescription: \"List all available filter categories and values\",\n\t},\n\targs: {\n\t\tcategory: {\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"Filter category slug (e.g. screenPatterns, screenElements, appCategories, flowActions)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\t\tconst categories = await client.filters.list();\n\n\t\tif (args.category) {\n\t\t\tconst cat = categories.find((c) => c.slug === args.category);\n\t\t\tif (!cat) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Category \"${args.category}\" not found. Available: ${categories.map((c) => c.slug).join(\", \")}`,\n\t\t\t\t);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tif (args.table) {\n\t\t\t\tconst rows: string[][] = [];\n\t\t\t\tfor (const sub of cat.subCategories) {\n\t\t\t\t\tfor (const entry of sub.entries) {\n\t\t\t\t\t\trows.push([entry.displayName, sub.displayName, entry.definition?.slice(0, 60) ?? \"\"]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutputTable([\"Name\", \"Sub-category\", \"Definition\"], rows);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log(JSON.stringify(cat, null, 2));\n\t\t\treturn;\n\t\t}\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"Slug\", \"Display Name\", \"Experience\", \"Entries\"],\n\t\t\t\tcategories.map((c) => [\n\t\t\t\t\tc.slug,\n\t\t\t\t\tc.displayName,\n\t\t\t\t\tc.experience,\n\t\t\t\t\tString(c.subCategories.reduce((acc, s) => acc + s.entries.length, 0)),\n\t\t\t\t]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(categories, null, 2));\n\t},\n});\n\nexport const filtersCommand = defineCommand({\n\tmeta: {\n\t\tname: \"filters\",\n\t\tdescription: \"Browse available filter categories\",\n\t},\n\tsubCommands: {\n\t\tlist: listCommand,\n\t},\n});\n","import { execSync } from \"node:child_process\";\nimport { writeFile } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { platform } from \"node:process\";\nimport { defineCommand } from \"citty\";\n\nconst copyImageToClipboard = (filePath: string): void => {\n\tswitch (platform) {\n\t\tcase \"darwin\": {\n\t\t\t// Convert to PNG first (sips handles webp), then copy via osascript\n\t\t\tconst pngPath = `${filePath}.png`;\n\t\t\texecSync(`sips -s format png \"${filePath}\" --out \"${pngPath}\" > /dev/null 2>&1`);\n\t\t\texecSync(\n\t\t\t\t`osascript -e 'set the clipboard to (read (POSIX file \"${pngPath}\") as «class PNGf»)'`,\n\t\t\t);\n\t\t\texecSync(`rm -f \"${pngPath}\"`);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"linux\":\n\t\t\t// xclip or xsel — xclip is more common for image clipboard\n\t\t\ttry {\n\t\t\t\texecSync(\"which xclip > /dev/null 2>&1\");\n\t\t\t\texecSync(`xclip -selection clipboard -t image/webp -i \"${filePath}\"`);\n\t\t\t} catch {\n\t\t\t\ttry {\n\t\t\t\t\texecSync(\"which wl-copy > /dev/null 2>&1\");\n\t\t\t\t\texecSync(`wl-copy < \"${filePath}\"`);\n\t\t\t\t} catch {\n\t\t\t\t\tthrow new Error(\"Install xclip or wl-copy to use clipboard on Linux\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"win32\":\n\t\t\t// PowerShell clip\n\t\t\texecSync(\n\t\t\t\t`powershell -command \"Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::FromFile('${filePath}'))\"`,\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Error(`Clipboard not supported on ${platform}`);\n\t}\n};\nimport type { Platform, SortBy } from \"mobbin-sdk\";\nimport { getClient } from \"../client.js\";\nimport { outputTable } from \"../output.js\";\n\nconst searchCommand = defineCommand({\n\tmeta: {\n\t\tname: \"search\",\n\t\tdescription: \"Search screens by patterns, elements, keywords\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tpatterns: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Screen patterns (comma-separated, e.g. Signup,Login)\",\n\t\t},\n\t\telements: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"UI elements (comma-separated, e.g. Button,Card)\",\n\t\t},\n\t\tkeywords: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Text search in screenshots\",\n\t\t\talias: \"k\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated, e.g. Finance,Shopping)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tanimation: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Filter for animated screens only\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Number of results\",\n\t\t\tdefault: \"24\",\n\t\t\talias: \"l\",\n\t\t},\n\t\ttable: {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Output as table instead of JSON\",\n\t\t\talias: \"t\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst result = await client.screens.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tscreenPatterns: args.patterns ? args.patterns.split(\",\") : null,\n\t\t\t\tscreenElements: args.elements ? args.elements.split(\",\") : null,\n\t\t\t\tscreenKeywords: args.keywords ?? null,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t\thasAnimation: args.animation ?? null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: Number.parseInt(args.limit, 10),\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tif (args.table) {\n\t\t\toutputTable(\n\t\t\t\t[\"App\", \"Pattern\", \"Elements\", \"URL\"],\n\t\t\t\tresult.data.map((s) => [\n\t\t\t\t\ts.appName,\n\t\t\t\t\ts.screenPatterns.join(\", \"),\n\t\t\t\t\ts.screenElements.slice(0, 3).join(\", \"),\n\t\t\t\t\ts.screenCdnImgSources?.src ?? s.screenUrl,\n\t\t\t\t]),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(JSON.stringify(result, null, 2));\n\t},\n});\n\nconst downloadCommand = defineCommand({\n\tmeta: {\n\t\tname: \"download\",\n\t\tdescription: \"Download screen images\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tpatterns: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Screen patterns (comma-separated)\",\n\t\t},\n\t\telements: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"UI elements (comma-separated)\",\n\t\t},\n\t\tkeywords: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Text search in screenshots\",\n\t\t\talias: \"k\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tlimit: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Number of screens to download\",\n\t\t\tdefault: \"5\",\n\t\t\talias: \"l\",\n\t\t},\n\t\toutput: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Output directory\",\n\t\t\tdefault: \".\",\n\t\t\talias: \"o\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst result = await client.screens.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tscreenPatterns: args.patterns ? args.patterns.split(\",\") : null,\n\t\t\t\tscreenElements: args.elements ? args.elements.split(\",\") : null,\n\t\t\t\tscreenKeywords: args.keywords ?? null,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: Number.parseInt(args.limit, 10),\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tconst downloaded: { file: string; app: string; patterns: string[] }[] = [];\n\n\t\tfor (const screen of result.data) {\n\t\t\tconst cdnSrc = screen.screenCdnImgSources?.src;\n\t\t\tif (!cdnSrc) continue;\n\t\t\tconst buffer = await client.screens.download(cdnSrc);\n\t\t\tconst safeName = screen.appName.replace(/[^a-zA-Z0-9]/g, \"_\").toLowerCase();\n\t\t\tconst filename = `${safeName}_${screen.id.slice(0, 8)}.webp`;\n\t\t\tconst filepath = join(args.output, filename);\n\n\t\t\tawait writeFile(filepath, Buffer.from(buffer));\n\t\t\tdownloaded.push({\n\t\t\t\tfile: filepath,\n\t\t\t\tapp: screen.appName,\n\t\t\t\tpatterns: screen.screenPatterns,\n\t\t\t});\n\t\t}\n\n\t\tconsole.log(JSON.stringify({ downloaded }, null, 2));\n\t},\n});\n\nconst copyCommand = defineCommand({\n\tmeta: {\n\t\tname: \"copy\",\n\t\tdescription: \"Copy a screen image to clipboard\",\n\t},\n\targs: {\n\t\tplatform: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Platform: ios, android, web\",\n\t\t\tdefault: \"ios\",\n\t\t\talias: \"p\",\n\t\t},\n\t\tpatterns: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Screen patterns (comma-separated)\",\n\t\t},\n\t\telements: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"UI elements (comma-separated)\",\n\t\t},\n\t\tkeywords: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Text search in screenshots\",\n\t\t\talias: \"k\",\n\t\t},\n\t\tcategories: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"App categories (comma-separated)\",\n\t\t\talias: \"c\",\n\t\t},\n\t\tsort: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Sort by: trending, publishedAt, popularity\",\n\t\t\tdefault: \"trending\",\n\t\t\talias: \"s\",\n\t\t},\n\t\tindex: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Index of the screen to copy (0-based, from search results)\",\n\t\t\tdefault: \"0\",\n\t\t\talias: \"i\",\n\t\t},\n\t},\n\trun: async ({ args }) => {\n\t\tconst client = await getClient();\n\n\t\tconst idx = Number.parseInt(args.index, 10);\n\t\tconst result = await client.screens.search(\n\t\t\t{\n\t\t\t\tplatform: args.platform as Platform,\n\t\t\t\tscreenPatterns: args.patterns ? args.patterns.split(\",\") : null,\n\t\t\t\tscreenElements: args.elements ? args.elements.split(\",\") : null,\n\t\t\t\tscreenKeywords: args.keywords ?? null,\n\t\t\t\tappCategories: args.categories ? args.categories.split(\",\") : null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tpageSize: idx + 1,\n\t\t\t\tsortBy: args.sort as SortBy,\n\t\t\t},\n\t\t);\n\n\t\tconst screen = result.data[idx];\n\t\tif (!screen) {\n\t\t\tconsole.error(`No screen found at index ${idx}`);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst cdnSrc = screen.screenCdnImgSources?.src;\n\t\tif (!cdnSrc) {\n\t\t\tconsole.error(\"No CDN image available for this screen\");\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst buffer = await client.screens.download(cdnSrc);\n\t\tconst tmpFile = join(tmpdir(), `mobbin_${screen.id.slice(0, 8)}.png`);\n\n\t\tawait writeFile(tmpFile, Buffer.from(buffer));\n\t\tcopyImageToClipboard(tmpFile);\n\t\texecSync(`rm -f \"${tmpFile}\"`);\n\n\t\tconsole.log(\n\t\t\tJSON.stringify({\n\t\t\t\tcopied: true,\n\t\t\t\tapp: screen.appName,\n\t\t\t\tpatterns: screen.screenPatterns,\n\t\t\t\tid: screen.id,\n\t\t\t}),\n\t\t);\n\t},\n});\n\nexport const screensCommand = defineCommand({\n\tmeta: {\n\t\tname: \"screens\",\n\t\tdescription: \"Search and download screen designs\",\n\t},\n\tsubCommands: {\n\t\tsearch: searchCommand,\n\t\tdownload: downloadCommand,\n\t\tcopy: copyCommand,\n\t},\n});\n","import { defineCommand } from \"citty\";\n\ndeclare const __VERSION__: string;\n\nexport const versionCommand = defineCommand({\n\tmeta: {\n\t\tname: \"version\",\n\t\tdescription: \"Show CLI version\",\n\t},\n\trun: () => {\n\t\tconsole.log(typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0\");\n\t},\n});\n"],"mappings":";;;AAAA,SAAS,iBAAAA,gBAAe,eAAe;;;ACAvC,SAAS,qBAAqB;;;ACA9B,SAAS,oBAAoB;;;ACA7B,SAAS,YAAY,WAAW,cAAc,YA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AM;AAAA,IACL,MAAM;AAAA,IACN,SAAS,OAAqC,UAAc;AAAA,IAC5D,aAAa;AAAA,EACd;AAAA,EACA,aAAa;AAAA,IACZ,GAAG;AAAA,IACH,YAAY,wBAAwB,WAAW;AAAA,EAChD;AACD,CAAC;AAED,QAAQ,IAAI;","names":["defineCommand","defineCommand","MobbinClient","defineCommand","password","MobbinClient","defineCommand","listCommand","defineCommand","defineCommand","defineCommand","listCommand","defineCommand","join","defineCommand","searchCommand","defineCommand","join","defineCommand","defineCommand"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbin-cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "CLI for Mobbin - browse and download design references",
5
5
  "author": "yabbal",
6
6
  "license": "MIT",