diff --git a/.changeset/readme-standard.md b/.changeset/readme-standard.md new file mode 100644 index 0000000..9832ec5 --- /dev/null +++ b/.changeset/readme-standard.md @@ -0,0 +1,8 @@ +--- +"@kadal/store": patch +--- + +A new README, which is also the npm page: pictures of the store, an agent and the terminal, a grid +of products from the store, a "Start in 30 seconds" section, setup for Claude, Claude Code, ChatGPT, +Cursor, VS Code and Codex, what `recommend --from` sends, and why an agent can never pay. Every +example uses real products from the store. diff --git a/.github/assets/agents.webp b/.github/assets/agents.webp new file mode 100644 index 0000000..b121e5e Binary files /dev/null and b/.github/assets/agents.webp differ diff --git a/.github/assets/hero.webp b/.github/assets/hero.webp new file mode 100644 index 0000000..6567a9b Binary files /dev/null and b/.github/assets/hero.webp differ diff --git a/.github/assets/how-it-works.excalidraw b/.github/assets/how-it-works.excalidraw new file mode 100644 index 0000000..f0dacdd --- /dev/null +++ b/.github/assets/how-it-works.excalidraw @@ -0,0 +1,1012 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://github.com/kadalcc/store-cli", + "elements": [ + { + "id": "how-it-works-0", + "type": "rectangle", + "x": 0, + "y": 60, + "width": 340, + "height": 120, + "angle": 0, + "strokeColor": "#2563eb", + "backgroundColor": "#dbeafe", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a0", + "roundness": { + "type": 3 + }, + "seed": 1, + "version": 1, + "versionNonce": 1, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-15" + } + ], + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-1", + "type": "rectangle", + "x": 390, + "y": 0, + "width": 370, + "height": 420, + "angle": 0, + "strokeColor": "#64748b", + "backgroundColor": "#f1f5f9", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 70, + "groupIds": [], + "frameId": null, + "index": "a1", + "roundness": { + "type": 3 + }, + "seed": 7920, + "version": 1, + "versionNonce": 2, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-2", + "type": "text", + "x": 406, + "y": 10, + "width": 276.20989990234375, + "height": 41.25, + "angle": 0, + "strokeColor": "#64748b", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a2", + "roundness": null, + "seed": 15839, + "version": 1, + "versionNonce": 3, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "on your computer", + "fontSize": 33, + "fontFamily": 5, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "on your computer", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-3", + "type": "rectangle", + "x": 410, + "y": 60, + "width": 330, + "height": 110, + "angle": 0, + "strokeColor": "#64748b", + "backgroundColor": "#f1f5f9", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a3", + "roundness": { + "type": 3 + }, + "seed": 23758, + "version": 1, + "versionNonce": 4, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-16" + } + ], + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-4", + "type": "rectangle", + "x": 410, + "y": 270, + "width": 330, + "height": 120, + "angle": 0, + "strokeColor": "#059669", + "backgroundColor": "#d1fae5", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a4", + "roundness": { + "type": 3 + }, + "seed": 31677, + "version": 1, + "versionNonce": 5, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-17" + } + ], + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-5", + "type": "rectangle", + "x": 0, + "y": 270, + "width": 340, + "height": 140, + "angle": 0, + "strokeColor": "#7c3aed", + "backgroundColor": "#ede9fe", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a5", + "roundness": { + "type": 3 + }, + "seed": 39596, + "version": 1, + "versionNonce": 6, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-18" + } + ], + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-6", + "type": "rectangle", + "x": 110, + "y": 546.5, + "width": 540, + "height": 133.5, + "angle": 0, + "strokeColor": "#0d9488", + "backgroundColor": "#ccfbf1", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a6", + "roundness": { + "type": 3 + }, + "seed": 47515, + "version": 1, + "versionNonce": 7, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-19" + } + ], + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-7", + "type": "ellipse", + "x": 110, + "y": 530, + "width": 540, + "height": 33, + "angle": 0, + "strokeColor": "#0d9488", + "backgroundColor": "#ccfbf1", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a7", + "roundness": { + "type": 2 + }, + "seed": 55434, + "version": 1, + "versionNonce": 8, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-8", + "type": "rectangle", + "x": 110, + "y": 800, + "width": 540, + "height": 130, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "#ffedd5", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a8", + "roundness": null, + "seed": 63353, + "version": 1, + "versionNonce": 9, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-20" + } + ], + "updated": 1, + "link": null, + "locked": false + }, + { + "id": "how-it-works-9", + "type": "arrow", + "x": 170, + "y": 186, + "width": 0, + "height": 78, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "a9", + "roundness": null, + "seed": 71272, + "version": 1, + "versionNonce": 10, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-21" + } + ], + "updated": 1, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0.5 + ], + [ + 0, + 77.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "how-it-works-10", + "type": "arrow", + "x": 346, + "y": 120, + "width": 58, + "height": 210, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aA", + "roundness": null, + "seed": 79191, + "version": 1, + "versionNonce": 11, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-22" + } + ], + "updated": 1, + "link": null, + "locked": false, + "points": [ + [ + 0.5, + 0.5 + ], + [ + 57.5, + 209.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "how-it-works-11", + "type": "arrow", + "x": 575, + "y": 176, + "width": 0, + "height": 88, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aB", + "roundness": null, + "seed": 87110, + "version": 1, + "versionNonce": 12, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-23" + } + ], + "updated": 1, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0.5 + ], + [ + 0, + 87.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "how-it-works-12", + "type": "arrow", + "x": 170, + "y": 416, + "width": 210, + "height": 108, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aC", + "roundness": null, + "seed": 95029, + "version": 1, + "versionNonce": 13, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "points": [ + [ + 0.5, + 0.5 + ], + [ + 209.5, + 107.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "how-it-works-13", + "type": "arrow", + "x": 575, + "y": 396, + "width": 195, + "height": 128, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aD", + "roundness": null, + "seed": 102948, + "version": 1, + "versionNonce": 14, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-24" + } + ], + "updated": 1, + "link": null, + "locked": false, + "points": [ + [ + -0.5, + 0.5 + ], + [ + -194.5, + 127.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "how-it-works-14", + "type": "arrow", + "x": 380, + "y": 686, + "width": 0, + "height": 108, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dashed", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aE", + "roundness": null, + "seed": 110867, + "version": 1, + "versionNonce": 15, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "how-it-works-25" + } + ], + "updated": 1, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0.5 + ], + [ + 0, + 107.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "how-it-works-15", + "type": "text", + "x": 53.41404724121094, + "y": 98.75, + "width": 233.17190551757812, + "height": 42.5, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aF", + "roundness": null, + "seed": 118786, + "version": 1, + "versionNonce": 16, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "your AI agent", + "fontSize": 34, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-0", + "originalText": "your AI agent", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-16", + "type": "text", + "x": 505.62303924560547, + "y": 72.5, + "width": 138.75392150878906, + "height": 85, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aG", + "roundness": null, + "seed": 126705, + "version": 1, + "versionNonce": 17, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "you, in a\nterminal", + "fontSize": 34, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-3", + "originalText": "you, in a\nterminal", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-17", + "type": "text", + "x": 429.98046875, + "y": 290.4, + "width": 290.0390625, + "height": 79.2, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aH", + "roundness": null, + "seed": 134624, + "version": 1, + "versionNonce": 18, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "kadal-store\nCLI · local MCP", + "fontSize": 33, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-4", + "originalText": "kadal-store\nCLI · local MCP", + "autoResize": true, + "lineHeight": 1.2 + }, + { + "id": "how-it-works-18", + "type": "text", + "x": 17.663055419921875, + "y": 297.5, + "width": 304.67388916015625, + "height": 85, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aI", + "roundness": null, + "seed": 142543, + "version": 1, + "versionNonce": 19, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "hosted MCP\nstore.kadal.cc/mcp", + "fontSize": 34, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-5", + "originalText": "hosted MCP\nstore.kadal.cc/mcp", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-19", + "type": "text", + "x": 197.96408081054688, + "y": 570.75, + "width": 364.07183837890625, + "height": 85, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aJ", + "roundness": null, + "seed": 150462, + "version": 1, + "versionNonce": 20, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "store.kadal.cc\nthe shop · your library", + "fontSize": 34, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-6", + "originalText": "store.kadal.cc\nthe shop · your library", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-20", + "type": "text", + "x": 277.96604919433594, + "y": 822.5, + "width": 204.06790161132812, + "height": 85, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aK", + "roundness": null, + "seed": 158381, + "version": 1, + "versionNonce": 21, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "review page\nonly you pay", + "fontSize": 34, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-8", + "originalText": "review page\nonly you pay", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-21", + "type": "text", + "x": 118.66851043701172, + "y": 204.375, + "width": 102.66297912597656, + "height": 41.25, + "angle": 0, + "strokeColor": "#6b7280", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aL", + "roundness": null, + "seed": 166300, + "version": 1, + "versionNonce": 22, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "OAuth", + "fontSize": 33, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-9", + "originalText": "OAuth", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-22", + "type": "text", + "x": 333.0075225830078, + "y": 204.375, + "width": 83.98495483398438, + "height": 41.25, + "angle": 0, + "strokeColor": "#6b7280", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aM", + "roundness": null, + "seed": 174219, + "version": 1, + "versionNonce": 23, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "stdio", + "fontSize": 33, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-10", + "originalText": "stdio", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-23", + "type": "text", + "x": 497.780029296875, + "y": 199.375, + "width": 154.43994140625, + "height": 41.25, + "angle": 0, + "strokeColor": "#6b7280", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aN", + "roundness": null, + "seed": 182138, + "version": 1, + "versionNonce": 24, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "commands", + "fontSize": 33, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-11", + "originalText": "commands", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-24", + "type": "text", + "x": 386.10655975341797, + "y": 439.375, + "width": 182.78688049316406, + "height": 41.25, + "angle": 0, + "strokeColor": "#6b7280", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aO", + "roundness": null, + "seed": 190057, + "version": 1, + "versionNonce": 25, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "your sign-in", + "fontSize": 33, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-13", + "originalText": "your sign-in", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "how-it-works-25", + "type": "text", + "x": 321.24353790283203, + "y": 719.375, + "width": 117.51292419433594, + "height": 41.25, + "angle": 0, + "strokeColor": "#f59e0b", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aP", + "roundness": null, + "seed": 197976, + "version": 1, + "versionNonce": 26, + "isDeleted": false, + "boundElements": null, + "updated": 1, + "link": null, + "locked": false, + "text": "buy link", + "fontSize": 33, + "fontFamily": 5, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "how-it-works-14", + "originalText": "buy link", + "autoResize": true, + "lineHeight": 1.25 + } + ], + "appState": { + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} diff --git a/.github/assets/how-it-works.svg b/.github/assets/how-it-works.svg new file mode 100644 index 0000000..94dade2 --- /dev/null +++ b/.github/assets/how-it-works.svg @@ -0,0 +1,3 @@ +Your AI agent reaches the store two ways: the hosted MCP server at store.kadal.cc/mcp, signed in with OAuth and nothing to install, or kadal-store mcp on your computer over stdio. You run the same kadal-store in a terminal. Both act on store.kadal.cc with your own sign-in: the shop and your library. A buy link opens a review page, where only you can pay.your AI agenton your computeryou, in aterminalkadal-storeCLI · local MCPhosted MCPstore.kadal.cc/mcpstore.kadal.ccthe shop · your libraryreview pageonly you payOAuthstdiocommandsyour sign-inbuy link diff --git a/.github/assets/review.webp b/.github/assets/review.webp new file mode 100644 index 0000000..b8f9bf9 Binary files /dev/null and b/.github/assets/review.webp differ diff --git a/.github/assets/social.jpg b/.github/assets/social.jpg new file mode 100644 index 0000000..7a24716 Binary files /dev/null and b/.github/assets/social.jpg differ diff --git a/.github/assets/src/hero.html b/.github/assets/src/hero.html new file mode 100644 index 0000000..75388df --- /dev/null +++ b/.github/assets/src/hero.html @@ -0,0 +1,164 @@ + + + + + + Kadal Store CLI hero + + + + + +
+
store.kadal.cc
+
+ + + + +
+
+ +
+
✦ Your agent
+

Find button sounds for this game.

+

✓ recommend  ✓ create_buy_link

+

One-Name UI Sounds fits, at $12. Here’s a link to review it. Only you can pay.

+
+ +
+
+
$ kadal-store download soft-ui-sounds
+  …
+  ✓ soft-ui-sounds/ui-warning.wav
+Done: 41 downloaded, 0 already here.
+
+ + diff --git a/.github/assets/src/how-it-works.ts b/.github/assets/src/how-it-works.ts new file mode 100644 index 0000000..156c453 --- /dev/null +++ b/.github/assets/src/how-it-works.ts @@ -0,0 +1,72 @@ +/** + * The README's "How it works" drawing, in Kadal Deck's sketch DSL (`@kadal/deck/sketch`, what a + * slide's `` draws). The Kadal monorepo's deck-site renders it in Chromium with + * Excalidraw (`bun run diagrams ` with this file in apps/deck-site/diagrams/) into + * ../how-it-works.svg, which carries its own font and both colour schemes, and + * ../how-it-works.excalidraw, which opens on excalidraw.com. Drawn 760 wide (808 with its margin) with + * text at 33 px or more, so it reads on a phone. + */ +import { sketch } from "@kadal/deck/sketch"; + +export const alt = + "Your AI agent reaches the store two ways: the hosted MCP server at store.kadal.cc/mcp, signed in with OAuth and nothing to install, or kadal-store mcp on your computer over stdio. You run the same kadal-store in a terminal. Both act on store.kadal.cc with your own sign-in: the shop and your library. A buy link opens a review page, where only you can pay."; + +const s = sketch({ width: 760, height: 930, size: 34 }); + +s.node("agent", { x: 0, y: 60, w: 340, h: 120, label: "your AI agent", tone: "info" }); +s.region("local", { + x: 390, + y: 0, + w: 370, + h: 420, + title: "on your computer", + tone: "neutral", + size: 33, +}); +s.node("you", { x: 410, y: 60, w: 330, h: 110, label: "you, in a\nterminal", tone: "neutral" }); +s.node("cli", { + x: 410, + y: 270, + w: 330, + h: 120, + label: "kadal-store\nCLI · local MCP", + tone: "accent", + font: "code", + size: 33, +}); +s.node("hosted", { + x: 0, + y: 270, + w: 340, + h: 140, + label: "hosted MCP\nstore.kadal.cc/mcp", + tone: "purple", +}); + +s.node("store", { + x: 110, + y: 530, + w: 540, + h: 150, + label: "store.kadal.cc\nthe shop · your library", + shape: "cylinder", + tone: "teal", +}); +s.node("review", { + x: 110, + y: 800, + w: 540, + h: 130, + label: "review page\nonly you pay", + shape: "note", + tone: "amber", +}); + +s.arrow("agent", "hosted", { label: "OAuth", size: 33 }); +s.arrow("agent", "cli", { from: "right", to: "left", label: "stdio", size: 33 }); +s.arrow("you", "cli", { label: "commands", size: 33 }); +s.arrow("hosted", "store", {}); +s.arrow("cli", "store", { label: "your sign-in", size: 33 }); +s.arrow("store", "review", { label: "buy link", size: 33, tone: "amber", dashed: true }); + +export default s.build(); diff --git a/.github/assets/src/render.mjs b/.github/assets/src/render.mjs new file mode 100644 index 0000000..c993d1e --- /dev/null +++ b/.github/assets/src/render.mjs @@ -0,0 +1,130 @@ +#!/usr/bin/env node +/** + * Remakes the README's pictures in headless Chromium: + * + * ../hero.webp hero.html at 2x: the store, an agent using it, the terminal + * ../store.webp a product page on store.kadal.cc, on a phone + * ../review.webp the review page a buy link opens, on a phone + * ../agents.webp store.kadal.cc/agents/, on a phone + * ../social.jpg social.html at 2x, scaled to 1280×640 (GitHub's social preview) + * + * The phone pictures are the live pages, so they change when the store does. The hero's agent + * and terminal lines come from running this CLI and `kadal-store mcp` against a stand-in store + * that serves store.kadal.cc's own catalogue (its public /api/products), with a demo account + * that owns Soft UI Sounds; they are copied into hero.html by hand. + * + * bun add --no-save playwright && bunx playwright install chromium + * node .github/assets/src/render.mjs # needs cwebp and magick (brew install webp imagemagick) + * + * Every text in these pictures is at least 44 px at 1080 px wide (60 for headlines), so it reads + * on a 360-pt phone. Check each one at 100% and at phone size after a change. + */ +import { execFileSync } from "node:child_process"; +import { mkdtempSync, readFileSync, rmSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { dirname, join } from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; + +import { chromium } from "playwright"; + +const src = dirname(fileURLToPath(import.meta.url)); +const assets = join(src, ".."); +const tmp = mkdtempSync(join(tmpdir(), "kadal-store-assets-")); +const only = process.argv.slice(2); +const wanted = (name) => only.length === 0 || only.includes(name); + +/** PNG → WebP, sized for a README: `width` px wide, lossy at `q`. */ +function webp(png, out, width, q = 80) { + execFileSync("cwebp", [ + "-quiet", + "-q", + String(q), + "-m", + "6", + "-resize", + String(width), + "0", + png, + "-o", + out, + ]); + console.log( + `${out.slice(assets.length + 1)} ${(readFileSync(out).length / 1024).toFixed(0)} KB`, + ); +} + +const browser = await chromium.launch(); +try { + // ── compositions ──────────────────────────────────────────────────────────────────────── + for (const [name, file, width] of [["hero", "hero.html", 1620]]) { + if (!wanted(name)) continue; + const page = await browser.newPage({ + viewport: { width: 1080, height: 800 }, + deviceScaleFactor: 2, + }); + await page.goto(pathToFileURL(join(src, file)).href, { waitUntil: "networkidle" }); + await page.evaluate(() => document.fonts.ready); + const png = join(tmp, `${name}.png`); + await page.screenshot({ path: png, fullPage: true }); + webp(png, join(assets, `${name}.webp`), width); + await page.close(); + } + + if (wanted("social")) { + const page = await browser.newPage({ + viewport: { width: 1280, height: 640 }, + deviceScaleFactor: 2, + }); + await page.goto(pathToFileURL(join(src, "social.html")).href, { waitUntil: "networkidle" }); + await page.evaluate(() => document.fonts.ready); + const png = join(tmp, "social.png"); + await page.screenshot({ path: png }); + const out = join(assets, "social.jpg"); + execFileSync("magick", [png, "-resize", "1280x640", "-strip", "-quality", "86", out]); + console.log(`social.jpg ${(readFileSync(out).length / 1024).toFixed(0)} KB`); + await page.close(); + } + + // ── the live store, on a phone ────────────────────────────────────────────────────────── + const phones = [ + // name, page, how far down to start (CSS px), how tall a slice + ["store", "https://store.kadal.cc/p/one-name-ui-sounds", 560, 900], + ["review", "https://store.kadal.cc/buy?items=one-name-ui-sounds:personal&ref=cli", 0, 900], + ["agents", "https://store.kadal.cc/agents/", 0, 900], + ]; + for (const [name, url, top, height] of phones) { + if (!wanted(name)) continue; + const context = await browser.newContext({ + viewport: { width: 390, height: top + height }, + deviceScaleFactor: 2, + colorScheme: "light", + }); + const page = await context.newPage(); + await page.goto(url, { waitUntil: "networkidle" }); + // The Kadal Deck strip across the top is the network's, not the store's: hide it, as its + // close button does. + await page.evaluate(() => document.documentElement.classList.add("strip-off")); + await page.waitForTimeout(500); + const shot = join(tmp, `${name}-page.png`); + await page.screenshot({ path: shot, clip: { x: 0, y: top, width: 390, height } }); + await context.close(); + + // In a plain phone frame, on a transparent page so it sits on GitHub's light or dark. + const frame = await browser.newPage({ + viewport: { width: 430, height: height + 40 }, + deviceScaleFactor: 2, + }); + const data = `data:image/png;base64,${readFileSync(shot).toString("base64")}`; + await frame.setContent( + `
` + + `
`, + ); + const framed = join(tmp, `${name}.png`); + await frame.locator("#f").screenshot({ path: framed, omitBackground: true }); + webp(framed, join(assets, `${name}.webp`), 560, 82); + await frame.close(); + } +} finally { + await browser.close(); + rmSync(tmp, { recursive: true, force: true }); +} diff --git a/.github/assets/src/social.html b/.github/assets/src/social.html new file mode 100644 index 0000000..587c0b7 --- /dev/null +++ b/.github/assets/src/social.html @@ -0,0 +1,96 @@ + + + + + + Kadal Store CLI social preview + + + + + +
+
Kadal Store
+

Store CLI

+

Your library, in your terminal and your AI agent.

+ npx @kadal/store +
+
+ + + + +
+ + diff --git a/.github/assets/store.webp b/.github/assets/store.webp new file mode 100644 index 0000000..43b47e2 Binary files /dev/null and b/.github/assets/store.webp differ diff --git a/AGENTS.md b/AGENTS.md index aeb0ed5..233939a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,6 +14,7 @@ bun run test # bun test: unit tests and the end-to-end run against test/ bun run lint # oxlint node tools/smoke.mjs # the built CLI under Node against the fake store: login → download → buy bun test/fake-store.ts 8899 # a fake store to try commands against (--host http://127.0.0.1:8899) +node tools/third-party-notices.mjs # THIRD_PARTY_NOTICES.md, after any dependency change ``` ## Map @@ -30,6 +31,7 @@ bun test/fake-store.ts 8899 # a fake store to try commands against (--host htt | `src/mcp.ts` | `kadal-store mcp`: the store's tools proxied, plus `project_summary` and `download_to_folder` | | `skills/kadal-store` | the Agent Skill | | `.claude-plugin/marketplace.json` | makes this repo a Claude Code plugin marketplace (the skill + the MCP server) | +| `.github/assets` | the README's pictures; `src/` holds what makes them (`render.mjs`, the HTML, the diagram's scene) | ## Rules @@ -47,3 +49,6 @@ bun test/fake-store.ts 8899 # a fake store to try commands against (--host htt - `package.json` must survive `npm pkg fix` unchanged (CI checks it; npm 11 drops `bin` paths that start with `./`). - Every user-facing change gets a changeset (`bun run changeset`). +- README.md is also the npm page: link and embed with absolute URLs (images from + `raw.githubusercontent.com/kadalcc/store-cli/main/.github/assets/`), and keep its examples real + output of the CLI. diff --git a/BACKERS.md b/BACKERS.md new file mode 100644 index 0000000..b539fb6 --- /dev/null +++ b/BACKERS.md @@ -0,0 +1,35 @@ +# Backers + +The Kadal Store CLI is open source under the AGPL and paid for by the store at +[store.kadal.cc](https://store.kadal.cc) and by the people and companies below. +[Sponsor Kadal on GitHub](https://github.com/sponsors/pmithunish) to join them. It is the same +sponsorship as Kadal Deck's, with the same tiers: they are on +[deck.kadal.cc/sponsor](https://deck.kadal.cc/sponsor/). + +## Gold + +_Your company could be the first._ + +## Silver + +_—_ + +## Bronze + +_—_ + +## Patrons + +_—_ + +## Backers + +_—_ + +## One-time + +_—_ + + diff --git a/LICENSING.md b/LICENSING.md new file mode 100644 index 0000000..f3aa002 --- /dev/null +++ b/LICENSING.md @@ -0,0 +1,39 @@ +# Licensing + +Two kinds of licence meet when you use the Kadal Store CLI. They cover different things. + +## The CLI: AGPL-3.0-or-later + +The code in this repository (`@kadal/store`: the `kadal-store` CLI, its local MCP server and the +Agent Skill) is free software under the **GNU Affero General Public License, version 3 or later**. +The full text is in [`LICENSE`](./LICENSE). You may use it, change it and build on it, for +anything, including commercially. + +Running it triggers nothing: in a terminal, in a script, or as the MCP server your agent talks to. +The one obligation that matters in practice is AGPL §13: if you run a **modified** version as a +network service for other people, they must be able to get your modified source. + +The packages it installs beside it keep their own licences; they are listed in +[THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md). + +## What you download: the store's licences + +The files the CLI downloads are products from the [Kadal Store](https://store.kadal.cc). The AGPL +says nothing about them. Each comes under the licence you bought it with, on the store's terms: + +- **Standard**, on printables, art and icons, and wallpapers: use it, print it, and sell work made + with it. +- **Personal** or **Commercial**, on the other shelves: personal is for things you make for + yourself, not for money; commercial covers client work, products you sell and anything + monetised. + +None of them lets you resell or share the files themselves. `kadal-store show ` prints what +each tier allows and doesn't, and so does every product page. The full terms are at +[store.kadal.cc/licence](https://store.kadal.cc/licence/). + +## Contributions + +Contributions are accepted under the AGPL. A short Contributor Licence Agreement will be added +before the first outside pull request is merged (see [CONTRIBUTING.md](./CONTRIBUTING.md)). + +Questions about any of this: **hello@kadal.cc**. diff --git a/README.md b/README.md index f2e0246..204c6e3 100644 --- a/README.md +++ b/README.md @@ -2,30 +2,87 @@

Your store library, in your terminal and your AI agent.

+

+ Find what fits the project you're in, put the files you own where they belong, and get a link to + buy the rest. From a terminal, or from Claude, ChatGPT, Cursor, VS Code, Codex or any MCP app, on + your own store account. Your agent can never pay. +

+

npm version CI - Licence: AGPL-3.0-or-later + Licence: AGPL-3.0-or-later + MCP Registry: cc.kadal/store Sponsor

-[The Kadal Store](https://store.kadal.cc) sells digital downloads: planners and printables, sound -effects and music, shaders, 3D models, textures, icons and templates. `@kadal/store` brings it to -where you work. Search the store, get suggestions for the project you are in, download and sync -what you own, and get a link to buy the rest. It works the same for you in a terminal and for the -AI agent you already use (Claude, Cursor, Codex, any MCP client), on your own account and your own -model subscription. +[The Kadal Store](https://store.kadal.cc) sells digital downloads: planners and printables, art +and icons, stickers, wallpapers, patterns, music, sound effects, 3D models, video FX and shaders. +You pay once and keep the files. `@kadal/store` brings the store to where you work. Search it, get +suggestions for the project in front of you, download and sync what you own, and get a link to buy +the rest. It works the same for you in a terminal and for the AI agent you already use, on your own +account and your own model subscription. + +An agent can find things, download what you own and hand you a link. It can never pay: payment +happens in Paddle's checkout, on the store's own page, in front of you. + +

+ + The Kadal Store CLI at work, in three parts. At the top, store.kadal.cc: previews of One-Name UI Sounds (ringed), Retro 8-Bit SFX, the 2027 ADHD-Friendly Daily Planner and the Low-Poly Konbini Storefront Kit. In the middle, your agent: asked to find button sounds for this game, it runs recommend and create_buy_link and answers: One-Name UI Sounds fits, at $12. Here's a link to review it. Only you can pay. At the bottom, a terminal: kadal-store download soft-ui-sounds, ending with soft-ui-sounds/ui-warning.wav and Done: 41 downloaded, 0 already here. + +

+ +

+ Browse the store →
+ Every product shows its files, its editions and what each licence allows. +

+ +

+ Start · + Connect your agent · + Commands · + Never pays · + Privacy · + Changelog +

+ +--- + +## Start in 30 seconds -An agent can find things, download what you own and hand you a link. It can never buy: payment -always happens on the store's checkout page, in front of you. +You need Node 20 or newer. ```sh -npx -y @kadal/store login # once: approve in your browser -npx -y @kadal/store recommend --from . # what fits the project you are in -npx -y @kadal/store download retro-ui-sfx -o assets/sfx +npx -y @kadal/store login # once: approve on the store's own page +npx -y @kadal/store recommend "ui sounds" --from . # what fits the project you're in +npx -y @kadal/store download soft-ui-sounds -o assets/sfx # a product you own, into the project ``` -Or install it: `npm i -g @kadal/store`, then `kadal-store `. Node 20 or newer. +Or install it with `npm i -g @kadal/store`, then run `kadal-store `. + +Rather have your agent do it? Give Claude, ChatGPT, Cursor or VS Code the address +`https://store.kadal.cc/mcp`. There is nothing to install: [Connect your agent](#connect-your-agent). + +## In the store + + + + + + + + + + + + + + +
Soft UI Sounds: forty pastel tiles, each the waveform of one sound in the pack, labelled tap, click, toggle, pop, swipe and more
Soft UI Sounds
Sound FX · soft-ui-sounds
The 2027 ADHD-Friendly Daily Planner: the daily page for Friday, January 1, with its hour bar, brain dump, top 3 and done list
2027 ADHD-Friendly Daily Planner
Printables · adhd-friendly-planner
Desk & Workshop Kit: sixteen low-poly props arranged as an office corner and a workbench
Desk & Workshop Kit
3D · desk-workshop-kit
Liquid Marble Shader: swirling ribbons of blush, sage and lilac ink on cream, with plum and gold veins
Liquid Marble Shader
Shaders · liquid-marble
Interface Line Icons: six icons shown large, then all 36 in a grid
Interface Line Icons
Art & icons · interface-line
Sunset Arcs: a seamless pattern of striped arcs in the Cream, Rust and Night colourways
Sunset Arcs
Patterns · sunset-arcs-cream
Snowfall Overlays: snow falling over a neon night street, a snowy lane and a café, above the far, middle and near snow layers
Snowfall Overlays
Video FX · snowfall-overlays
Lo-fi Study Loops: eight spectrogram ribbons, one for each loop, labelled with its name, tempo, key and bar count
Lo-fi Study Loops
Audio · lofi-study-loops
+ +The code under each picture is the product's slug, which every command takes: +`kadal-store show liquid-marble` prints its files, prices and licence in the terminal. The pictures +are the store's own previews, so they change when the store does. ## Sign in @@ -33,7 +90,7 @@ Or install it: `npm i -g @kadal/store`, then `kadal-store `. Node 20 or $ kadal-store login Opening your browser to sign in to store.kadal.cc. If it does not open, visit: https://store.kadal.cc/authorize?response_type=code&client_id=… -Signed in as Ana on store.kadal.cc. Saved to ~/.config/kadal/store.json +Signed in as Ana on store.kadal.cc. Saved to /home/ana/.config/kadal/store.json ``` You sign in on the store's own page, so your password never passes through the CLI. The token is @@ -49,184 +106,314 @@ terminal. If the store's page says it does not know this app, run `kadal-store l ### Find ```text -$ kadal-store search planner --max 10 -Techo weekly planner 2027 Planners owned (personal) techo-weekly-2027 -A5 monthly undated Planners from $4.00 monthly-undated-a5 - -2 of 2. Details: kadal-store show +$ kadal-store search planner --max 10 --limit 5 +72 Seasons Weekly Planner Printables $9.00 seventy-two-seasons-planner +Kakeibo Budget Planner Printables $8.00 kakeibo-budget-planner +2027 Small Business Planner Printables $8.00 small-business-planner-2027 +2027 ADHD-Friendly Daily Planner Printables $8.00 adhd-friendly-planner +Christmas Planner Printables $7.00 christmas-planner + +5 of 54. Details: kadal-store show +More: kadal-store search planner --cursor 5 ``` - `search ` with `--shelf `, `--style`, `--topic`, `--format`, `--kind asset|pack`, - `--max `, `--sort relevance|newest|price`, `--limit <1-50>`, `--cursor `. -- `shelves` lists the store's shelves (use a slug with `--shelf`). -- `show `: prices per licence tier, the licence (what each tier allows and doesn't), the - files with their sizes and editions, what a pack holds, and its updates. + `--max `, `--sort relevance|newest|price`, `--limit <1-50>` (20), `--cursor `. +- `shelves` lists the store's shelves and how many products each holds (use a slug with `--shelf`). +- `show `: the price of each licence, what each licence allows and doesn't, the files with + their sizes and editions, what a pack holds, and its updates. ### Suggestions for your project ```text -$ kadal-store recommend "ui sounds" --from . -This summary of /home/ana/cosy-farm will be sent to store.kadal.cc: - - Project: cosy-farm — A cosy farming game - Built with: Phaser - Dependencies: phaser - README sections: Cosy Farm · Art style - File types: .png 412, .ts 88, .wav 31 - Top level: assets/, src/, package.json, README.md - -Send it? [y/N] y -Retro UI sound effects Sound effects from $9.00 retro-ui-sfx - Matches "ui" and "sounds", and your .wav files. +$ kadal-store recommend "sounds for a cosy pixel-art farming game" --limit 3 +Retro 8-Bit SFX Sound FX from $9.00 retro-8bit-sfx + Matches “sound”, “pixel” and “art” in its tags. +Cute Pops & Sparkles Sound FX from $9.00 cute-pops-sparkles + Matches “sound”, “cosy” and “game” in its tags. +Holiday Creator Kit Bundles from $29.00 holiday-creator-kit (pack of 9) + Matches “sound”, “art” and “game” in its tags. + +Packs that complete what you have: +Sound FX Collection Sound FX from $24.00 sfx-collection (pack of 4) + Holds 2 of the picks above. You already own 1 of its 4 items. Its 4 items cost $39 one by one; the pack is $24. (you own 1) +… ``` -`--from ` reads only the README's headings, package.json's (or pyproject.toml's, Cargo.toml's) -name, description and dependency names, a count of file types, and the top-level names. It never -reads or sends what is inside your files, and you see the exact text before it goes. `--yes` -skips the question. Also `--shelf`, `--format` (both repeatable), `--max `, -`--include-owned`, `--limit <1-20>`. +Every pick says why it was picked, and a pack says what it would save you. What you own is left out +(`--include-owned` keeps it). Add `--from .` and the store also reads a short summary of the project +you're in, which you see before it goes ([what it holds](#privacy)). Also `--shelf`, `--format` +(both repeatable), `--max `, `--limit <1-20>` (8), and `--yes` to send the summary without +asking. ### What you own ```text $ kadal-store library -Techo weekly planner 2027 (personal) 3 files, 39 KB techo-weekly-2027 -Retro UI sound effects (standard) 2 files, 12 KB retro-ui-sfx - -$ kadal-store download techo-weekly-2027 --year 2027 --size a5 -o planner -Downloading techo-weekly-2027 into planner - ✓ planner/techo-weekly_2027_mon_en_a5.pdf - ✓ planner/READ ME.txt -Done: 2 downloaded, 0 already here. - -$ kadal-store sync ~/Kadal -2 products · 5 files already in /home/ana/Kadal · 0 to download -Done: 0 downloaded, 5 already here. +Slim Weekly Techo (standard) 42 files, 19.7 MB slim-weekly-techo +Soft UI Sounds (personal) 41 files, 1.8 MB soft-ui-sounds + +Download one: kadal-store download · everything: kadal-store sync + +$ kadal-store download slim-weekly-techo --year 2027 --lang en --size a6 -o planner +Downloading slim-weekly-techo into planner + ✓ planner/FONT-LICENCE.txt + ✓ planner/how-to-print.pdf + ✓ planner/slim-weekly-techo_2027_en_a6.pdf +Done: 3 downloaded, 0 already here. + +$ kadal-store sync Kadal +2 products · 83 files already in Kadal · 0 to download +Done: 0 downloaded, 83 already here. ``` - `download ` puts one product's files in `./` (or `-o `). `--file ` - (repeatable) picks files; `--year 2027 --week sun|mon --lang en|ja|en-ja --size a4|a5|letter…` - picks one edition of a product sold in editions; `--zip` gets the whole product as one zip. + (repeatable) picks files. A product sold in editions takes `--year 2027 --week sun|mon + --lang en|ja|en-ja --size a4|a5|letter…` to pick one; `show ` lists the editions it has. + Files that belong to every edition, like the read-me, always come too. `--zip` gets the whole + product as one zip, and `--force` downloads files that are already there. - `sync [dir]` mirrors everything you own into `dir` (default `./kadal-store`), one folder per product. Files already there with the same sha256 are skipped; nothing is ever deleted. - `--product ` (repeatable), the edition flags, and `--dry-run`. + `--product ` (repeatable), the edition flags, and `--dry-run` to see what would come down. - Every file is checked against the sha256 the store gives before it is kept. A download that is cut off leaves a `.kadal-part` file, and the next run picks up where it stopped. Downloads run four at a time (`--concurrency `). +- Only what you own downloads. Anything else stops with the store's answer: + + ```text + $ kadal-store download retro-8bit-sfx + Downloading retro-8bit-sfx into retro-8bit-sfx + error: You don't own Retro 8-Bit SFX. get_product describes it; create_buy_link makes a link to buy it. + ``` ### Buy ```text -$ kadal-store buy fern-pack techo-weekly-2027:personal +$ kadal-store buy retro-8bit-sfx soft-ui-sounds Review and pay here: - https://store.kadal.cc/buy?items=fern-pack:standard,techo-weekly-2027:personal&ref=cli + https://store.kadal.cc/buy?items=retro-8bit-sfx:personal,soft-ui-sounds:personal&ref=cli - Fern textures pack standard $12.00 - Techo weekly planner 2027 personal $9.00 (you already own this) - Total $12.00 + Retro 8-Bit SFX personal $9.00 + Soft UI Sounds personal $9.00 (you already own this) + Total $9.00 -Nothing is charged until you pay in the checkout on that page. +Open the link to review and pay. Nothing is charged until the person pays in Paddle's checkout, and they can change a licence or remove anything there. Already owned, so not charged: soft-ui-sounds. ``` -`buy …` (tiers: `standard`, the default, `personal`, `commercial`) builds a page where -you see each item, its licence and price, and anything you already own. `--open` opens it. +`buy …` makes a page where you see each item, its licence and its price, and anything +you already own, which is left out of the total. Without a tier, an item comes with the cheapest +licence it is sold under; add one (`personal`, `standard` or `commercial`) to choose. `--open` +opens the page in your browser. Making that page is all `buy` does: you pay there, or not at all. + +

+ The review page a buy link opens, on a phone: Review your order. Your assistant put this list together. Check it, change a licence or remove anything, then pay in Paddle's checkout. Nothing is charged until you do. One item, One-Name UI Sounds: Five Styles, $12, with Personal $12 chosen over Commercial $29 and a Remove button; then a summary: 1 to buy, total $12, Sign in to check out, and payment by Paddle, the merchant of record + The product page for One-Name UI Sounds: Five Styles on store.kadal.cc, on a phone: Sound FX, 50 interface sounds in five styles with the same file names in each, WAV and OGG. Choose a licence: Personal licence, $12, for things you make for yourself, not for money; or Commercial licence, $29, for client work, products you sell and anything monetised. Then Sign in to buy, instant download from your library, pay once, and checkout by Paddle +
+ Left, what buy and an agent's create_buy_link open: a list for you to check. Right, the product page, where each licence is explained. +

### Tell us about a problem ```text -$ kadal-store report techo-weekly-2027 --kind mistake --file techo-weekly_2027_mon_en_a5.pdf --page 12 "March 31 is missing" -Thanks. Your note is open: https://store.kadal.cc/account/notes/note_… +$ kadal-store report slim-weekly-techo --kind question --file slim-weekly-techo_2027_en_a6-on-a4.pdf --page 3 "Do I print this one at 100% for an A6 binder?" +Thanks. Your note is open: https://store.kadal.cc/account/notes#note_… Only you and Kadal can see it. Replies show up in `kadal-store notes`. $ kadal-store notes - Techo weekly planner 2027 · mistake · techo-weekly_2027_mon_en_a5.pdf [Accepted for the 7 Nov update] note_… - March 31 is missing - Kadal: Thanks, fixed in the next update. + Slim Weekly Techo · question · slim-weekly-techo_2027_en_a6-on-a4.pdf [Waiting for Kadal to read it] note_… + Do I print this one at 100% for an A6 binder? ``` `--kind mistake|question|idea`; `--page ` for a PDF, `--at ` for audio or video. Use -`-` in place of the words to read them from stdin. When a fix ships, the product's update shows in -your library and the next `download` or `sync` gets it. +`-` in place of the words to read them from stdin. `notes --status +open|accepted|declined|duplicate|fixed` narrows the list. When a fix ships, the product's update +shows in your library and the next `download` or `sync` gets it. ### Everything else `whoami`, `logout`, `--help` (and ` --help`), `--version`. -## For scripts and agents +## Connect your agent -- `--json` on any command prints one JSON document on stdout; everything meant for people goes to - stderr. For the store's commands it is the store tool's answer exactly as the store sent it - (shapes in [the contract](#the-contract)). `download` prints - `{slug, dir, files: [{fileId, name, path, bytes, sha256, status, resumed?, error?}], zip, counts}`, - `sync` prints `{dir, dryRun, files, counts}`, `login` prints `{ok, host, user, scopes, operator, - config}`, `logout` prints `{ok, host, signedOut, revoked}`, and a `recommend --from` you - declined prints `{sent: false}`. Errors are - `{ok: false, error: {code, message, exitCode}}`. -- Exit codes: `0` ok, `1` failed (the message says why), `2` usage, `3` not signed in (or the - sign-in expired: run `kadal-store login`), `4` a download failed its checksum (nothing was kept). -- `--host ` or `KADAL_STORE_HOST` points at another store, such as a local worker - (`--host http://localhost:8861`). Each host keeps its own sign-in. +

+ store.kadal.cc/agents on a phone: Bring your own AI agent. Connect Claude, ChatGPT, Cursor or any MCP app to your store account. It can find things that fit what you're making, fetch the files you own, and hand you a list to review. It can never pay: you do that, in Paddle's checkout. Then the address https://store.kadal.cc/mcp with How to connect and Connected apps buttons, and the start of Connect your agent, with the steps for Claude +
+ The same steps, with copy buttons: store.kadal.cc/agents. +

-## Connect your agent +There are two servers with the same tools. The **hosted** one, `https://store.kadal.cc/mcp`, needs +nothing installed: your app signs in to the store with OAuth, and you choose what to allow. The +**local** one, `npx -y @kadal/store mcp`, uses this machine's `kadal-store login` and adds two tools +that work on the project folder. Both are one entry, `cc.kadal/store`, in the +[official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=cc.kadal/store). + +### Claude (claude.ai and the desktop app) + +Open **Settings → Connectors**, choose **Add custom connector**, paste `https://store.kadal.cc/mcp` +and connect. A store page opens: sign in and press **Allow**. -**Claude Code, with the skill and the MCP server together:** +### Claude Code + +The plugin brings the skill and the local MCP server together. Sign in once with +`npx -y @kadal/store login`, then: ```text /plugin marketplace add kadalcc/store-cli /plugin install kadal-store@kadal-store ``` -**The local MCP server alone** (it uses the sign-in from `kadal-store login`): +Or add the hosted server alone, then run `/mcp` in Claude Code and pick **kadal-store** to sign in: ```sh -claude mcp add kadal-store -- npx -y @kadal/store mcp +claude mcp add --transport http kadal-store https://store.kadal.cc/mcp ``` -For Claude Desktop, Cursor, VS Code and others, point the client at `npx -y @kadal/store mcp`: +Or the local server alone: `claude mcp add kadal-store -- npx -y @kadal/store mcp`. + +### ChatGPT + +In **Settings → Apps & Connectors**, turn on developer mode under **Advanced**, then create a +connector with the address `https://store.kadal.cc/mcp` and OAuth as the sign-in. ChatGPT opens the +store's sign-in the first time you use it. + +### Cursor + +Add it to `~/.cursor/mcp.json`: ```json -{ "mcpServers": { "kadal-store": { "command": "npx", "args": ["-y", "@kadal/store", "mcp"] } } } +{ "mcpServers": { "kadal-store": { "url": "https://store.kadal.cc/mcp" } } } ``` -**The hosted MCP server**, for clients that sign in themselves (OAuth) and need nothing installed: +### VS Code -```sh -claude mcp add --transport http kadal-store https://store.kadal.cc/mcp +Add it to `.vscode/mcp.json`, then start it from the file: + +```json +{ "servers": { "kadal-store": { "type": "http", "url": "https://store.kadal.cc/mcp" } } } ``` -In Claude (web and desktop), ChatGPT, Cursor and VS Code, add `https://store.kadal.cc/mcp` as a -custom connector; the store's own page opens to sign in. Step-by-step for each app: -[store.kadal.cc/agents](https://store.kadal.cc/agents/). +### Codex, and apps that only run local servers -Both servers are one entry in the official MCP Registry, `cc.kadal/store` (the hosted one, and this -package as its local version). +Sign in once with `npx -y @kadal/store login`, then point the app at the local server. In Codex, +that is `~/.codex/config.toml`: -[![Kadal Store MCP connector – tool definition quality and endpoint health on Glama](https://glama.ai/mcp/connectors/cc.kadal/store/badges/score.svg)](https://glama.ai/mcp/connectors/cc.kadal/store) -[![kadalcc/store-cli MCP server](https://glama.ai/mcp/servers/kadalcc/store-cli/badges/score.svg)](https://glama.ai/mcp/servers/kadalcc/store-cli) +```toml +[mcp_servers.kadal-store] +command = "npx" +args = ["-y", "@kadal/store", "mcp"] +``` -**The skill alone**, for any agent that reads Agent Skills: `npx skills add kadalcc/store-cli` -([skills/kadal-store](skills/kadal-store/SKILL.md)). It teaches the agent to find assets for the -project in front of it, download into it, never buy on its own, and report problems it finds in -files you bought. +Claude Desktop, Cursor and other apps take the same local server as JSON: + +```json +{ "mcpServers": { "kadal-store": { "command": "npx", "args": ["-y", "@kadal/store", "mcp"] } } } +``` + +### The skill + +For any agent that reads Agent Skills: `npx skills add kadalcc/store-cli` +([skills/kadal-store](https://github.com/kadalcc/store-cli/blob/main/skills/kadal-store/SKILL.md)). +It teaches the agent to find assets for the project in front of it, download into it, never buy on +its own, and report problems it finds in files you bought. + +### The tools | MCP tools | | | --- | --- | | `search_products`, `get_product`, `list_shelves`, `recommend` | the catalogue, the licence of each product, suggestions from a description of the work | | `list_library`, `get_download_links` | what you own, and ten-minute download links with each file's sha256 | -| `create_buy_link` | a review page to pay on yourself; it charges nothing | +| `create_buy_link` | a review page for you to pay on; it charges nothing | | `report_problem`, `list_my_notes` | a note about a file you own, and Kadal's replies | | `whoami` | who is signed in, with which scopes | | `project_summary` (local) | what `recommend --from` sends: the folder described without its contents | | `download_to_folder` (local) | files you own into the project, checked by sha256, skipping what is there; only inside the folder the server started in unless it was started with `--allow-outside` | -`kadal-store mcp --dir ` serves another folder as the project. +`kadal-store mcp --dir ` serves another folder as the project. Every tool needs the +`store:read` scope except `report_problem`, which needs `store:write`. The store's +[server card](https://store.kadal.cc/.well-known/mcp/server-card.json) lists every tool without +signing in. + +[![Kadal Store MCP connector – tool definition quality and endpoint health on Glama](https://glama.ai/mcp/connectors/cc.kadal/store/badges/score.svg)](https://glama.ai/mcp/connectors/cc.kadal/store) +[![kadalcc/store-cli MCP server on Glama](https://glama.ai/mcp/servers/kadalcc/store-cli/badges/score.svg)](https://glama.ai/mcp/servers/kadalcc/store-cli) + +## Your agent never pays + +- **No tool can pay.** `create_buy_link`, like `kadal-store buy`, returns the address of a review + page on store.kadal.cc. You pay there, in Paddle's checkout, in your own browser, signed in to + the store. Nothing is charged until you do, and you can change a licence or remove anything first. +- **Downloads are only for what you own.** Download links are made for the signed-in person, for + the files their licence covers, and last ten minutes. Anything else gets "You don't own …" and a + pointer to `create_buy_link`. +- **You choose what it may do.** Reporting a problem needs `store:write`; everything else is + `store:read`. Remove an app under **Account → Settings → Connected apps** and its access ends. +- **The skill says so too.** It tells the agent never to buy, never to say something was bought, + never to open a checkout for you, and to ask you to sign in yourself. + +## Privacy + +`recommend --from ` and the local server's `project_summary` describe a project without its +contents. They read: -## The contract +- from `package.json`, `pyproject.toml`, `Cargo.toml` or `go.mod`: the name, description, keywords + and the **names** of dependencies (never versions, scripts or anything else); +- the README's **headings**, not its paragraphs; +- **file names**, to count file types and spot tools (a `project.godot`, `.blend` files), and the + top-level names. + +Dependency, build and hidden folders (`node_modules`, `.git`, `dist`, any dot folder…) are not +read, symlinks are not followed, and the text is capped at 6,000 characters. You see exactly what +will be sent, and nothing goes until you say yes: + +```text +$ kadal-store recommend "ui sounds" --from . +This summary of /home/ana/cosy-farm will be sent to store.kadal.cc: + + Project: cosy-farm — A cosy farming game + Built with: Phaser, Vite + Dependencies: phaser, vite + README sections: Cosy Farm · Art style · Controls + File types: .png 8, .ts 5, .html 1, .json 1, .md 1 + Top level: assets/, src/, index.html, package.json, README.md + +Send it? [y/N] +``` -Every command is one call to a tool of the store's hosted MCP server (`POST -https://store.kadal.cc/mcp`, Streamable HTTP, OAuth 2.1 with PKCE). The tools, their inputs and -their outputs are specified in the store's `apps/store-worker/docs/agents.md`; the types are in -[`src/types.ts`](src/types.ts). Money is always integer US cents; URLs are absolute. +The folder's path is shown to you and not sent. With no terminal to ask in, nothing is sent unless +you pass `--yes`. + +On the store's side, the words sent to `recommend` are used for that one answer and not kept. Each +connection records the app's name, what you allowed and when, and downloads are logged as they are +from your library. More in the store's [privacy policy](https://store.kadal.cc/privacy/). On your +machine, the CLI keeps only its sign-in, as [Sign in](#sign-in) describes. + +## How it works + +

+ Your AI agent reaches the store two ways: the hosted MCP server at store.kadal.cc/mcp, signed in with OAuth and nothing to install, or kadal-store mcp on your computer over stdio. You run the same kadal-store in a terminal. Both act on store.kadal.cc with your own sign-in: the shop and your library. A buy link opens a review page, where only you can pay. +

+ +Whatever the CLI asks the store, it asks as a call to a tool of the hosted MCP server +(`POST https://store.kadal.cc/mcp`, Streamable HTTP, OAuth 2.1 with PKCE). It holds no catalogue +logic of its own, so the CLI, `kadal-store mcp` and an agent on the hosted server all see the same +data. The tools are described on [store.kadal.cc/agents](https://store.kadal.cc/agents/#tools) and +in the server card, and their types are in +[`src/types.ts`](https://github.com/kadalcc/store-cli/blob/main/src/types.ts). Money is always +integer US cents; URLs are absolute. The drawing is an +[Excalidraw file](https://github.com/kadalcc/store-cli/blob/main/.github/assets/how-it-works.excalidraw). + +## For scripts + +- `--json` on any command prints one JSON document on stdout; everything meant for people goes to + stderr. For the store's commands it is the store tool's answer exactly as the store sent it. + `download` prints `{slug, dir, files: [{slug, fileId, name, path, bytes, sha256, status, + resumed?, error?}], zip, counts}`, `sync` prints `{dir, dryRun, files, counts}`, `login` prints + `{ok, host, user, scopes, operator, config}`, `logout` prints `{ok, host, signedOut, revoked}`, + and a `recommend --from` you declined prints `{sent: false}`. Errors are + `{ok: false, error: {code, message, exitCode}}`. +- Exit codes: `0` ok, `1` failed (the message says why), `2` usage, `3` not signed in (or the + sign-in expired: run `kadal-store login`), `4` a download failed its checksum (nothing was kept). +- `--host ` or `KADAL_STORE_HOST` points at another store, such as a local worker + (`--host http://localhost:8861`). Each host keeps its own sign-in. ## Development @@ -236,9 +423,50 @@ bun test/fake-store.ts 8899 & # a fake store, no account ne node dist/bin.js login --host http://127.0.0.1:8899 ``` -See [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md). +See [CONTRIBUTING.md](https://github.com/kadalcc/store-cli/blob/main/CONTRIBUTING.md) and +[AGENTS.md](https://github.com/kadalcc/store-cli/blob/main/AGENTS.md). The pictures in this README +come from live pages and real runs of the CLI; +[`.github/assets/src/render.mjs`](https://github.com/kadalcc/store-cli/blob/main/.github/assets/src/render.mjs) +remakes them. ## Licence -[AGPL-3.0-or-later](LICENSE), like the [Kadal Deck](https://github.com/kadalcc/deck) engine. -Security reports: [SECURITY.md](SECURITY.md). +**[AGPL-3.0-or-later](https://github.com/kadalcc/store-cli/blob/main/LICENSE)**, like the +[Kadal Deck](https://github.com/kadalcc/deck) engine. Running the CLI, as a command or as your +agent's MCP server, triggers nothing. If you run a **modified** version as a network service, its +users must be able to get your modified source. + +The files you download are not under the AGPL: each comes with the store licence you bought it +with. [LICENSING.md](https://github.com/kadalcc/store-cli/blob/main/LICENSING.md) explains both, +and [THIRD_PARTY_NOTICES.md](https://github.com/kadalcc/store-cli/blob/main/THIRD_PARTY_NOTICES.md) +lists the packages installed beside it, with their licences. + +## Contributing + +A bug report with the command you ran, its `--json` output and the exit code is the most useful +thing you can send, and pull requests are welcome. +[CONTRIBUTING.md](https://github.com/kadalcc/store-cli/blob/main/CONTRIBUTING.md) covers the setup +(Bun 1.3+) and the tests. Please follow the +[code of conduct](https://github.com/kadalcc/store-cli/blob/main/CODE_OF_CONDUCT.md), and report +security issues privately as +[SECURITY.md](https://github.com/kadalcc/store-cli/blob/main/SECURITY.md) describes. + +## Sponsors + +Sponsorships pay for time on Kadal's open-source tools: issues, docs and the features you ask for. +**[Sponsor Kadal on GitHub](https://github.com/sponsors/pmithunish)**. It is the same sponsorship +as Kadal Deck's: the tiers are on [deck.kadal.cc/sponsor](https://deck.kadal.cc/sponsor/), and +backers are listed in [BACKERS.md](https://github.com/kadalcc/store-cli/blob/main/BACKERS.md). +Companies can sponsor +[by invoice](https://docs.github.com/en/sponsors/sponsoring-open-source-contributors/paying-for-github-sponsors-by-invoice). + + +

+ Your logo here: + be the first company to sponsor Kadal's open-source work. +

+ + +

+ Made in Chennai by Kadal · store.kadal.cc · hello@kadal.cc +

diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000..e83264d --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,109 @@ +# Third-party notices + +`@kadal/store` is AGPL-3.0-or-later (see [`LICENSE`](./LICENSE)). Its `dist/` is this +repository's own code: nothing from another package is copied or bundled into it. When you +install it, npm installs the packages below beside it, each under its own licence, which ships +in that package's folder in `node_modules`. + +Generated by `node tools/third-party-notices.mjs` from the installed packages. The versions are +the ones this repository's lockfile resolves; npm may pick newer ones within the same ranges. + +92 packages: 82 MIT, 7 ISC, 2 BSD-3-Clause, 1 BSD-2-Clause. + +| Package | Version | Licence | Copyright | Source | +| --- | --- | --- | --- | --- | +| `@hono/node-server` | 2.1.6 | MIT | Copyright (c) 2022 - present, Yusuke Wada and Hono contributors | https://github.com/honojs/node-server | +| `@modelcontextprotocol/sdk` | 1.32.2 | MIT | Copyright (c) 2024 Anthropic, PBC | https://github.com/modelcontextprotocol/typescript-sdk | +| `accepts` | 2.0.0 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/accepts | +| `ajv` | 8.20.0 | MIT | Copyright (c) 2015-2021 Evgeny Poberezkin | https://github.com/ajv-validator/ajv | +| `ajv-formats` | 3.0.1 | MIT | Copyright (c) 2020 Evgeny Poberezkin | https://github.com/ajv-validator/ajv-formats | +| `body-parser` | 2.4.0 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/expressjs/body-parser | +| `bytes` | 3.1.2 | MIT | Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2015 Jed Watson <jed.watson@me.com> | https://github.com/visionmedia/bytes.js | +| `call-bind-apply-helpers` | 1.0.2 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/call-bind-apply-helpers | +| `call-bound` | 1.0.4 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/call-bound | +| `content-disposition` | 2.0.1 | MIT | Copyright (c) 2014-2017 Douglas Christopher Wilson | https://github.com/jshttp/content-disposition | +| `content-type` | 1.0.5 | MIT | Copyright (c) 2015 Douglas Christopher Wilson | https://github.com/jshttp/content-type | +| `content-type` | 2.1.0 | MIT | Copyright (c) 2015 Douglas Christopher Wilson | https://github.com/jshttp/content-type | +| `cookie` | 0.7.2 | MIT | Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/cookie | +| `cookie-signature` | 1.2.2 | MIT | Copyright (c) 2012–2024 LearnBoost <tj@learnboost.com> and other contributors; | https://github.com/visionmedia/node-cookie-signature | +| `cors` | 2.8.6 | MIT | Copyright (c) 2013 Troy Goode <troygoode@gmail.com> | https://github.com/expressjs/cors | +| `cross-spawn` | 7.0.6 | MIT | Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio> | git@github.com:moxystudio/node-cross-spawn | +| `debug` | 4.4.3 | MIT | Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2018-2021 Josh Junon | https://github.com/debug-js/debug | +| `depd` | 2.0.0 | MIT | Copyright (c) 2014-2018 Douglas Christopher Wilson | https://github.com/dougwilson/nodejs-depd | +| `dunder-proto` | 1.0.1 | MIT | Copyright (c) 2024 ECMAScript Shims | https://github.com/es-shims/dunder-proto | +| `ee-first` | 1.1.1 | MIT | Copyright (c) 2014 Jonathan Ong me@jongleberry.com | https://github.com/jonathanong/ee-first | +| `encodeurl` | 2.0.1 | MIT | Copyright (c) 2016 Douglas Christopher Wilson | https://github.com/pillarjs/encodeurl | +| `es-define-property` | 1.0.1 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/es-define-property | +| `es-errors` | 1.3.0 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/es-errors | +| `es-object-atoms` | 1.1.2 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/es-object-atoms | +| `escape-html` | 1.0.3 | MIT | Copyright (c) 2012-2013 TJ Holowaychuk
Copyright (c) 2015 Andreas Lubbe
Copyright (c) 2015 Tiancheng "Timothy" Gu | https://github.com/component/escape-html | +| `etag` | 1.8.1 | MIT | Copyright (c) 2014-2016 Douglas Christopher Wilson | https://github.com/jshttp/etag | +| `eventsource` | 3.0.7 | MIT | Copyright (c) EventSource GitHub organisation | https://git@github.com/EventSource/eventsource | +| `eventsource-parser` | 3.1.1 | MIT | Copyright (c) 2026 Espen Hovlandsdal <espen@hovlandsdal.com> | ssh://git@github.com/rexxars/eventsource-parser | +| `express` | 5.3.0 | MIT | Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/expressjs/express | +| `express-rate-limit` | 8.7.3 | MIT | Copyright 2023 Nathan Friedly, Vedant K | https://github.com/express-rate-limit/express-rate-limit | +| `fast-deep-equal` | 3.1.3 | MIT | Copyright (c) 2017 Evgeny Poberezkin | https://github.com/epoberezkin/fast-deep-equal | +| `fast-uri` | 3.1.9 | BSD-3-Clause | Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team> | https://github.com/fastify/fast-uri | +| `finalhandler` | 2.1.1 | MIT | Copyright (c) 2014-2022 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/pillarjs/finalhandler | +| `forwarded` | 0.2.0 | MIT | Copyright (c) 2014-2017 Douglas Christopher Wilson | https://github.com/jshttp/forwarded | +| `fresh` | 2.0.0 | MIT | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2016-2017 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/fresh | +| `function-bind` | 1.1.2 | MIT | Copyright (c) 2013 Raynos. | https://github.com/Raynos/function-bind | +| `get-intrinsic` | 1.3.0 | MIT | Copyright (c) 2020 Jordan Harband | https://github.com/ljharb/get-intrinsic | +| `get-proto` | 1.0.1 | MIT | Copyright (c) 2025 Jordan Harband | https://github.com/ljharb/get-proto | +| `gopd` | 1.2.0 | MIT | Copyright (c) 2022 Jordan Harband | https://github.com/ljharb/gopd | +| `has-symbols` | 1.1.0 | MIT | Copyright (c) 2016 Jordan Harband | https://github.com/inspect-js/has-symbols | +| `hasown` | 2.0.4 | MIT | Copyright (c) Jordan Harband and contributors | https://github.com/inspect-js/hasOwn | +| `hono` | 4.13.16 | MIT | Copyright (c) 2021 - present, Yusuke Wada and Hono contributors | https://github.com/honojs/hono | +| `http-errors` | 2.0.1 | MIT | Copyright (c) 2014 Jonathan Ong me@jongleberry.com
Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com | https://github.com/jshttp/http-errors | +| `iconv-lite` | 0.7.3 | MIT | Copyright (c) 2011 Alexander Shtuchkin | https://github.com/pillarjs/iconv-lite | +| `inherits` | 2.0.4 | ISC | Copyright (c) Isaac Z. Schlueter | https://github.com/isaacs/inherits | +| `ip-address` | 10.7.6 | MIT | Copyright (C) 2011 by Beau Gunderson | https://github.com/beaugunderson/ip-address | +| `ipaddr.js` | 1.9.1 | MIT | Copyright (C) 2011-2017 whitequark <whitequark@whitequark.org> | https://github.com/whitequark/ipaddr.js | +| `is-promise` | 4.0.0 | MIT | Copyright (c) 2014 Forbes Lindesay | https://github.com/then/is-promise | +| `isexe` | 2.0.0 | ISC | Copyright (c) Isaac Z. Schlueter and Contributors | https://github.com/isaacs/isexe | +| `jose` | 6.2.15 | MIT | Copyright (c) 2018 Filip Skokan | https://github.com/panva/jose | +| `json-schema-traverse` | 1.0.0 | MIT | Copyright (c) 2017 Evgeny Poberezkin | https://github.com/epoberezkin/json-schema-traverse | +| `json-schema-typed` | 8.0.2 | BSD-2-Clause | Original source code is copyright (c) 2019-2025 Remy Rylan
All JSON Schema documentation and descriptions are copyright (c): | https://github.com/RemyRylan/json-schema-typed | +| `math-intrinsics` | 1.1.0 | MIT | Copyright (c) 2024 ECMAScript Shims | https://github.com/es-shims/math-intrinsics | +| `media-typer` | 1.1.1 | MIT | Copyright (c) 2014-2017 Douglas Christopher Wilson | https://github.com/jshttp/media-typer | +| `merge-descriptors` | 2.0.0 | MIT | Copyright (c) Jonathan Ong <me@jongleberry.com>
Copyright (c) Douglas Christopher Wilson <doug@somethingdoug.com>
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | https://github.com/sindresorhus/merge-descriptors | +| `mime-db` | 1.54.0 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015-2022 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/mime-db | +| `mime-types` | 3.0.2 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/mime-types | +| `ms` | 2.1.3 | MIT | Copyright (c) 2020 Vercel, Inc. | https://github.com/vercel/ms | +| `negotiator` | 1.1.0 | MIT | Copyright (c) 2012-2014 Federico Romero
Copyright (c) 2012-2014 Isaac Z. Schlueter
Copyright (c) 2014-2015 Douglas Christopher Wilson | https://github.com/jshttp/negotiator | +| `object-assign` | 4.1.1 | MIT | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/object-assign | +| `object-inspect` | 1.13.4 | MIT | Copyright (c) 2013 James Halliday | https://github.com/inspect-js/object-inspect | +| `on-finished` | 2.4.2 | MIT | Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/on-finished | +| `once` | 1.4.0 | ISC | Copyright (c) Isaac Z. Schlueter and Contributors | https://github.com/isaacs/once | +| `parseurl` | 1.3.3 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014-2017 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/pillarjs/parseurl | +| `path-key` | 3.1.1 | MIT | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/path-key | +| `path-to-regexp` | 8.4.2 | MIT | Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) | https://github.com/pillarjs/path-to-regexp | +| `pkce-challenge` | 5.0.1 | MIT | Copyright (c) 2019 | https://github.com/crouchcd/pkce-challenge | +| `proxy-addr` | 2.0.8 | MIT | Copyright (c) 2014-2016 Douglas Christopher Wilson | https://github.com/jshttp/proxy-addr | +| `qs` | 6.17.1 | BSD-3-Clause | Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) | https://github.com/ljharb/qs | +| `range-parser` | 1.3.0 | MIT | Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com | https://github.com/jshttp/range-parser | +| `raw-body` | 3.0.2 | MIT | Copyright (c) 2013-2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014-2022 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/stream-utils/raw-body | +| `require-from-string` | 2.0.2 | MIT | Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop) | https://github.com/floatdrop/require-from-string | +| `router` | 2.2.0 | MIT | Copyright (c) 2013 Roman Shtylman
Copyright (c) 2014-2022 Douglas Christopher Wilson | https://github.com/pillarjs/router | +| `safer-buffer` | 2.1.2 | MIT | Copyright (c) 2018 Nikita Skovoroda <chalkerx@gmail.com> | https://github.com/ChALkeR/safer-buffer | +| `send` | 1.2.1 | MIT | Copyright (c) 2012 TJ Holowaychuk
Copyright (c) 2014-2022 Douglas Christopher Wilson | https://github.com/pillarjs/send | +| `serve-static` | 2.2.1 | MIT | Copyright (c) 2010 Sencha Inc.
Copyright (c) 2011 LearnBoost
Copyright (c) 2011 TJ Holowaychuk
Copyright (c) 2014-2016 Douglas Christopher Wilson | https://github.com/expressjs/serve-static | +| `setprototypeof` | 1.2.0 | ISC | Copyright (c) 2015, Wes Todd | https://github.com/wesleytodd/setprototypeof | +| `shebang-command` | 2.0.0 | MIT | Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva) | https://github.com/kevva/shebang-command | +| `shebang-regex` | 3.0.0 | MIT | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/shebang-regex | +| `side-channel` | 1.1.1 | MIT | Copyright (c) 2019 Jordan Harband | https://github.com/ljharb/side-channel | +| `side-channel-list` | 1.0.1 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/side-channel-list | +| `side-channel-map` | 1.0.1 | MIT | Copyright (c) 2024 Jordan Harband | https://github.com/ljharb/side-channel-map | +| `side-channel-weakmap` | 1.0.2 | MIT | Copyright (c) 2019 Jordan Harband | https://github.com/ljharb/side-channel-weakmap | +| `statuses` | 2.0.2 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2016 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/statuses | +| `toidentifier` | 1.0.1 | MIT | Copyright (c) 2016 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/component/toidentifier | +| `type-is` | 2.1.0 | MIT | Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/jshttp/type-is | +| `unpipe` | 1.0.0 | MIT | Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com> | https://github.com/stream-utils/unpipe | +| `vary` | 1.1.2 | MIT | Copyright (c) 2014-2017 Douglas Christopher Wilson | https://github.com/jshttp/vary | +| `which` | 2.0.2 | ISC | Copyright (c) Isaac Z. Schlueter and Contributors | https://github.com/isaacs/node-which | +| `wrappy` | 1.0.2 | ISC | Copyright (c) Isaac Z. Schlueter and Contributors | https://github.com/npm/wrappy | +| `zod` | 4.6.7 | MIT | Copyright (c) 2025 Colin McDonnell | https://github.com/colinhacks/zod | +| `zod-to-json-schema` | 3.25.2 | ISC | Copyright (c) 2020, Stefan Terdell | https://github.com/StefanTerdell/zod-to-json-schema | + +The pictures under `.github/assets/` are Kadal's: screenshots of store.kadal.cc and previews of +products sold there. They are not part of the npm package. diff --git a/tools/third-party-notices.mjs b/tools/third-party-notices.mjs new file mode 100644 index 0000000..20aa9e8 --- /dev/null +++ b/tools/third-party-notices.mjs @@ -0,0 +1,123 @@ +#!/usr/bin/env node +/** + * Writes THIRD_PARTY_NOTICES.md from what is installed: every package npm installs beside + * @kadal/store (the dependencies in package.json, and theirs, all the way down), with the version + * in node_modules, its licence as its own package.json states it, and the copyright lines of its + * licence file. + * + * bun install && node tools/third-party-notices.mjs # rewrite the file + * node tools/third-party-notices.mjs --check # exit 1 if it is out of date + */ +import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); +const read = (p) => JSON.parse(readFileSync(p, "utf8")); + +/** Node's lookup: node_modules/ in this folder, then in each folder above, up to the root. */ +function locate(name, from) { + for (let dir = from; dir.startsWith(root); dir = dirname(dir)) { + const at = join(dir, "node_modules", name); + if (existsSync(join(at, "package.json"))) return at; + if (dir === root) break; + } + return null; +} + +const licenceOf = (pkg) => + typeof pkg.license === "string" + ? pkg.license + : (pkg.license?.type ?? pkg.licenses?.map((l) => l.type ?? l).join(" OR ") ?? "UNKNOWN"); + +const sourceOf = (pkg) => { + const repo = typeof pkg.repository === "string" ? pkg.repository : pkg.repository?.url; + if (!repo) return pkg.homepage ?? `https://www.npmjs.com/package/${pkg.name}`; + return repo + .replace(/^git\+/, "") + .replace(/^git:\/\//, "https://") + .replace(/^github:/, "https://github.com/") + .replace(/^(?!https?:)([\w.-]+\/[\w.-]+)$/, "https://github.com/$1") + .replace(/\.git$/, ""); +}; + +/** The "Copyright …" lines of a package's licence file, or none if it has no file. */ +function copyrights(dir) { + const file = readdirSync(dir).find((f) => /^(licen[cs]e|copying)(\.(md|txt))?$/i.test(f)); + if (!file) return []; + const lines = readFileSync(join(dir, file), "utf8").split(/\r?\n/); + return [ + ...new Set(lines.map((l) => l.trim()).filter((l) => /copyright\s+(\(c\)|©|\d)/i.test(l))), + ]; +} + +const found = new Map(); +const own = read(join(root, "package.json")); +const queue = Object.keys(own.dependencies ?? {}).map((name) => ({ + name, + from: root, + via: own.name, +})); +while (queue.length) { + const { name, from, via } = queue.shift(); + const dir = locate(name, from); + if (!dir) { + // An optional dependency for another platform is simply not here. + continue; + } + const pkg = read(join(dir, "package.json")); + const key = `${pkg.name}@${pkg.version}`; + if (found.has(key)) continue; + found.set(key, { pkg, dir, via }); + for (const dep of Object.keys({ ...pkg.dependencies, ...pkg.optionalDependencies })) + queue.push({ name: dep, from: dir, via: pkg.name }); +} + +const rows = [...found.values()].sort((a, b) => a.pkg.name.localeCompare(b.pkg.name)); +const byLicence = new Map(); +for (const r of rows) byLicence.set(licenceOf(r.pkg), (byLicence.get(licenceOf(r.pkg)) ?? 0) + 1); +const summary = [...byLicence] + .sort((a, b) => b[1] - a[1]) + .map(([l, n]) => `${n} ${l}`) + .join(", "); + +const md = `# Third-party notices + +\`@kadal/store\` is AGPL-3.0-or-later (see [\`LICENSE\`](./LICENSE)). Its \`dist/\` is this +repository's own code: nothing from another package is copied or bundled into it. When you +install it, npm installs the packages below beside it, each under its own licence, which ships +in that package's folder in \`node_modules\`. + +Generated by \`node tools/third-party-notices.mjs\` from the installed packages. The versions are +the ones this repository's lockfile resolves; npm may pick newer ones within the same ranges. + +${rows.length} packages: ${summary}. + +| Package | Version | Licence | Copyright | Source | +| --- | --- | --- | --- | --- | +${rows + .map(({ pkg, dir }) => { + const c = + copyrights(dir) + .map((l) => l.replaceAll("<", "<").replaceAll(">", ">").replaceAll("|", "\\|")) + .join("
") || "—"; + return `| \`${pkg.name}\` | ${pkg.version} | ${licenceOf(pkg)} | ${c} | ${sourceOf(pkg)} |`; + }) + .join("\n")} + +The pictures under \`.github/assets/\` are Kadal's: screenshots of store.kadal.cc and previews of +products sold there. They are not part of the npm package. +`; + +const out = join(root, "THIRD_PARTY_NOTICES.md"); +if (process.argv.includes("--check")) { + const now = existsSync(out) ? readFileSync(out, "utf8") : ""; + if (now !== md) { + console.error("THIRD_PARTY_NOTICES.md is out of date: run node tools/third-party-notices.mjs"); + process.exit(1); + } + console.log(`THIRD_PARTY_NOTICES.md is current (${rows.length} packages).`); +} else { + writeFileSync(out, md); + console.log(`THIRD_PARTY_NOTICES.md: ${rows.length} packages (${summary}).`); +}