@fragments-sdk/cli 0.13.1 → 0.14.1

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/bin.js CHANGED
@@ -6671,8 +6671,18 @@ program.command("setup").description("Configure @fragments-sdk/ui in a consumer
6671
6671
  process.exit(1);
6672
6672
  }
6673
6673
  });
6674
- program.command("init").description("Initialize fragments in a project (zero-config by default)").option("--force", "Overwrite existing config").option("-y, --yes", "Non-interactive mode (now the default)").option("--configure", "Interactive mode for theme seeds, snapshots, etc.").option("--scan <path>", "Scan a TypeScript component directory and generate fragment files").option("--enrich", "Use AI to fill knowledge fields during --scan (requires API key)").option("--dry-run", "Show what --enrich would generate without calling API").option("--provider <provider>", "AI provider for enrichment: anthropic or openai").option("--api-key <key>", "API key for AI enrichment").option("--model <model>", "Override AI model for enrichment").action(async (options) => {
6674
+ program.command("init").description("Initialize fragments in a project (zero-config by default)").option("--force", "Overwrite existing config").option("-y, --yes", "Non-interactive mode (now the default)").option("--cloud", "Set up Fragments Cloud governance (zero-config browser auth)").option("--cloud-url <url>", "Cloud dashboard URL (default: https://app.usefragments.com)").option("--port <port>", "Localhost port for auth callback (default: 9876)").option("--auth-only", "Only authenticate, skip project setup").option("--skip-check", "Skip running the first governance check").option("--configure", "Interactive mode for theme seeds, snapshots, etc.").option("--scan <path>", "Scan a TypeScript component directory and generate fragment files").option("--enrich", "Use AI to fill knowledge fields during --scan (requires API key)").option("--dry-run", "Show what --enrich would generate without calling API").option("--provider <provider>", "AI provider for enrichment: anthropic or openai").option("--api-key <key>", "API key for AI enrichment").option("--model <model>", "Override AI model for enrichment").action(async (options) => {
6675
6675
  try {
6676
+ if (options.cloud) {
6677
+ const { initCloud } = await import("./init-cloud-REQ3XLHO.js");
6678
+ await initCloud({
6679
+ url: options.cloudUrl,
6680
+ port: options.port ? Number(options.port) : void 0,
6681
+ authOnly: options.authOnly,
6682
+ skipCheck: options.skipCheck
6683
+ });
6684
+ return;
6685
+ }
6676
6686
  const { init } = await import("./init-U6534EMZ.js");
6677
6687
  const result = await init({
6678
6688
  projectRoot: process.cwd(),