@curenorway/kode-cli 1.4.0 → 1.5.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.
@@ -437,8 +437,16 @@ Update context.md after your session with discoveries and changes.
437
437
 
438
438
  ### MCP Tools
439
439
 
440
- The \`.mcp.json\` file enables AI tools for page assignment, HTML caching, and context updates.
441
- Restart Claude Code after \`kode init\` to load the MCP server.
440
+ The \`.mcp.json\` file enables AI tools:
441
+
442
+ **cure-kode MCP**: Script management, HTML analysis, deployment
443
+ - \`kode_update_script\`, \`kode_deploy\`, \`kode_fetch_html_smart\`, etc.
444
+
445
+ **webflow MCP** (if configured): Webflow Designer API access
446
+ - Modify site structure, CMS collections, pages, and more
447
+ - Requires the Webflow MCP Bridge App running in Designer (press E \u2192 Apps)
448
+
449
+ Restart Claude Code after \`kode init\` to load MCP servers.
442
450
 
443
451
  `;
444
452
  }
@@ -629,9 +637,41 @@ If using the Kode MCP server, these tools are available:
629
637
  ### MCP Setup
630
638
 
631
639
  The \`.mcp.json\` file (created by \`kode init\`) enables MCP tools automatically.
632
- **Restart Claude Code** after init to load the MCP server.
640
+ **Restart Claude Code** after init to load the MCP servers.
641
+
642
+ ## Webflow MCP (Optional)
643
+
644
+ If configured during \`kode init\`, you also have access to the official Webflow MCP server.
645
+ This enables AI agents to interact directly with the Webflow Designer API.
646
+
647
+ ### Webflow MCP Tools
648
+
649
+ - **Site & Page Management**: Create, read, update pages and site settings
650
+ - **CMS Collections**: Manage collection schemas and items
651
+ - **Components**: Work with reusable components
652
+ - **Assets**: Upload and manage media assets
653
+ - **Forms**: Configure form settings
654
+
655
+ ### Using Webflow MCP
656
+
657
+ 1. **Start the Bridge App**: Open your site in Webflow Designer, press E, launch "Webflow MCP Bridge App"
658
+ 2. **OAuth Mode**: If using OAuth, you'll be prompted to authorize on first use
659
+ 3. **Token Mode**: Works immediately if a token was configured
660
+
661
+ ### Example Prompts with Webflow MCP
662
+
663
+ - "Add a new blog post to the CMS collection"
664
+ - "Create a new page at /about with a hero section"
665
+ - "Update the navigation menu to include a new link"
666
+ - "Show me all published pages on this site"
667
+
668
+ ### Combined Workflows
669
+
670
+ Use both MCPs together for powerful workflows:
671
+ 1. Use **webflow MCP** to understand site structure and create pages
672
+ 2. Use **cure-kode MCP** to add custom JavaScript behavior to those pages
673
+ 3. Deploy scripts with \`kode_deploy\`, then verify in Webflow Designer
633
674
 
634
- MCP tools provide richer functionality than CLI alone (page assignment, context updates, HTML caching).
635
675
  `;
636
676
  }
637
677
 
@@ -726,6 +766,65 @@ config.json
726
766
  args: ["-y", "@curenorway/kode-mcp"],
727
767
  env: {}
728
768
  };
769
+ let webflowToken = site.webflow_token;
770
+ let webflowMcpMethod = null;
771
+ spinner.stop();
772
+ if (webflowToken) {
773
+ console.log(chalk.green("\u2713 Webflow API token found in site settings"));
774
+ webflowMcpMethod = "token";
775
+ } else {
776
+ console.log(chalk.yellow("\n\u{1F4E6} Webflow MCP Setup"));
777
+ console.log(chalk.dim(" The Webflow MCP enables AI agents to interact with the Webflow Designer."));
778
+ console.log();
779
+ const { webflowSetup } = await prompt([
780
+ {
781
+ type: "select",
782
+ name: "webflowSetup",
783
+ message: "How would you like to set up Webflow MCP?",
784
+ choices: [
785
+ {
786
+ name: "oauth",
787
+ message: "Use OAuth (recommended) - authorize via browser when needed"
788
+ },
789
+ {
790
+ name: "token",
791
+ message: "Provide API token - use a Webflow API token"
792
+ },
793
+ {
794
+ name: "skip",
795
+ message: "Skip - set up Webflow MCP later"
796
+ }
797
+ ],
798
+ initial: 0
799
+ }
800
+ ]);
801
+ webflowMcpMethod = webflowSetup;
802
+ if (webflowSetup === "token") {
803
+ const { webflowToken: providedToken } = await prompt([
804
+ {
805
+ type: "password",
806
+ name: "webflowToken",
807
+ message: "Webflow API Token (from webflow.com/dashboard/account/integrations):",
808
+ validate: (value) => value.length > 0 ? true : "Token is required"
809
+ }
810
+ ]);
811
+ webflowToken = providedToken;
812
+ }
813
+ }
814
+ if (webflowMcpMethod === "token" && webflowToken) {
815
+ mcpConfig.mcpServers["webflow"] = {
816
+ command: "npx",
817
+ args: ["-y", "webflow-mcp-server@latest"],
818
+ env: {
819
+ WEBFLOW_TOKEN: webflowToken
820
+ }
821
+ };
822
+ } else if (webflowMcpMethod === "oauth") {
823
+ mcpConfig.mcpServers["webflow"] = {
824
+ url: "https://mcp.webflow.com/sse"
825
+ };
826
+ }
827
+ spinner.start("Generating AI context files...");
729
828
  writeFileSync3(mcpConfigPath, JSON.stringify(mcpConfig, null, 2) + "\n");
730
829
  spinner.text = "Generating AI context files...";
731
830
  spinner.start();
@@ -856,12 +955,35 @@ config.json
856
955
  console.log(chalk.cyan(" 2. kode watch ") + chalk.dim("Watch for changes and auto-push"));
857
956
  console.log(chalk.cyan(" 3. kode deploy ") + chalk.dim("Deploy to staging"));
858
957
  console.log(chalk.bold("\n\u{1F4A1} MCP Tools:"));
859
- console.log(chalk.dim(" Restart Claude Code, then use /mcp to approve the cure-kode server."));
860
- console.log(chalk.dim(" This enables AI tools like kode_update_script, kode_fetch_html_smart, etc."));
958
+ console.log(chalk.dim(" Restart Claude Code, then use /mcp to approve the MCP servers."));
959
+ console.log();
960
+ console.log(chalk.dim(" cure-kode:"));
961
+ console.log(chalk.dim(" kode_update_script, kode_fetch_html_smart, kode_deploy, etc."));
962
+ if (webflowMcpMethod === "token") {
963
+ console.log();
964
+ console.log(chalk.dim(" webflow (token mode):"));
965
+ console.log(chalk.dim(" Interact with Webflow Designer API, modify site structure, CMS, etc."));
966
+ } else if (webflowMcpMethod === "oauth") {
967
+ console.log();
968
+ console.log(chalk.dim(" webflow (OAuth mode):"));
969
+ console.log(chalk.dim(" You'll be prompted to authorize via browser on first use."));
970
+ console.log(chalk.dim(" Requires Node.js 22.3.0+ for remote MCP."));
971
+ } else {
972
+ console.log();
973
+ console.log(chalk.dim(" webflow: ") + chalk.yellow("Not configured"));
974
+ console.log(chalk.dim(" Run `kode init --force` to set up Webflow MCP later."));
975
+ }
861
976
  if (claudeMdAction === "separate") {
862
977
  console.log(chalk.yellow("\n\u{1F4A1} Tip: Add this line to your CLAUDE.md to reference Kode instructions:"));
863
978
  console.log(chalk.dim(" See KODE.md for Cure Kode CDN management instructions."));
864
979
  }
980
+ if (webflowMcpMethod === "token" || webflowMcpMethod === "oauth") {
981
+ console.log(chalk.bold("\n\u{1F517} Webflow Designer Integration:"));
982
+ console.log(chalk.dim(" 1. Open your site in Webflow Designer"));
983
+ console.log(chalk.dim(" 2. Press E to open Apps panel"));
984
+ console.log(chalk.dim(' 3. Launch the "Webflow MCP Bridge App"'));
985
+ console.log(chalk.dim(" 4. AI agents can now interact with the Designer"));
986
+ }
865
987
  } catch (error) {
866
988
  spinner.fail("Initialization failed");
867
989
  console.error(chalk.red("\nError:"), error);
package/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  readPageContext,
16
16
  statusCommand,
17
17
  watchCommand
18
- } from "./chunk-OW3XKTBO.js";
18
+ } from "./chunk-XBDIENFY.js";
19
19
 
20
20
  // src/cli.ts
21
21
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  updateScriptPurpose,
28
28
  watchCommand,
29
29
  writeContext
30
- } from "./chunk-OW3XKTBO.js";
30
+ } from "./chunk-XBDIENFY.js";
31
31
  export {
32
32
  KodeApiClient,
33
33
  KodeApiError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curenorway/kode-cli",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "CLI tool for Cure Kode - manage JS/CSS scripts for Webflow sites",
5
5
  "type": "module",
6
6
  "bin": {