@usesocial/cli 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @usesocial/cli
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#91](https://github.com/usesocial/monorepo/pull/91) [`cdd0c08`](https://github.com/usesocial/monorepo/commit/cdd0c08cf5a532b9bb131256824ec159e5c67193) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Add `social mcp install` to print a shell-ready global `add-mcp` command.
8
+
9
+ ## 0.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#90](https://github.com/usesocial/monorepo/pull/90) [`d1715ee`](https://github.com/usesocial/monorepo/commit/d1715ee18fdb6dccb433e756ec0171fd229e412d) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Print the path-free `https://mcp.usesocial.dev` URL for the hosted MCP server.
14
+
3
15
  ## 0.14.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.mjs CHANGED
@@ -24052,7 +24052,7 @@ function createEnv(opts) {
24052
24052
  }
24053
24053
  //#endregion
24054
24054
  //#region package.json
24055
- var version$1 = "0.14.0";
24055
+ var version$1 = "0.16.0";
24056
24056
  //#endregion
24057
24057
  //#region src/lib/env.ts
24058
24058
  const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
@@ -37624,39 +37624,60 @@ const createCLIDeps = () => {
37624
37624
  };
37625
37625
  //#endregion
37626
37626
  //#region src/mcp/index.ts
37627
- const SOCIAL_MCP_URL = "https://mcp.usesocial.dev/mcp";
37627
+ const SOCIAL_MCP_URL = "https://mcp.usesocial.dev";
37628
+ const hasBunx = (pathEnv = process.env.PATH) => Boolean(pathEnv?.split(delimiter).some((directory) => [
37629
+ "bunx",
37630
+ "bunx.exe",
37631
+ "bunx.cmd"
37632
+ ].some((binary) => existsSync(join(directory, binary)))));
37633
+ const createSocialMCPInstallCommand = (runner) => `${runner === "bunx" ? "bunx" : "npx --yes"} add-mcp ${SOCIAL_MCP_URL} --name social --global`;
37628
37634
  const mcpCommand = defineCommand({
37629
37635
  meta: {
37630
37636
  name: "mcp",
37631
37637
  description: "Connect agents and MCP clients to Social."
37632
37638
  },
37633
- subCommands: { url: defineCommand({
37634
- meta: commandMeta({
37635
- name: "url",
37636
- description: "Print the canonical, secret-free Social MCP URL.",
37637
- contract: localCLIContract({
37638
- inputSchema: {
37639
- type: "object",
37640
- properties: { json: { type: "boolean" } }
37641
- },
37642
- outputSchema: {
37643
- type: "object",
37644
- properties: { url: { type: "string" } }
37645
- }
37646
- })
37639
+ subCommands: {
37640
+ install: defineCommand({
37641
+ meta: commandMeta({
37642
+ name: "install",
37643
+ description: "Print a command that installs Social in detected MCP clients.",
37644
+ contract: localCLIContract({
37645
+ outputSchema: { type: "string" },
37646
+ responseShaping: { formats: ["text"] }
37647
+ })
37648
+ }),
37649
+ run: () => {
37650
+ printLine(createSocialMCPInstallCommand(hasBunx() ? "bunx" : "npx"));
37651
+ }
37647
37652
  }),
37648
- args: { json: {
37649
- type: "boolean",
37650
- description: "Print a JSON object"
37651
- } },
37652
- run: ({ args }) => {
37653
- if (args.json) {
37654
- printData({ url: SOCIAL_MCP_URL });
37655
- return;
37653
+ url: defineCommand({
37654
+ meta: commandMeta({
37655
+ name: "url",
37656
+ description: "Print the canonical, secret-free Social MCP URL.",
37657
+ contract: localCLIContract({
37658
+ inputSchema: {
37659
+ type: "object",
37660
+ properties: { json: { type: "boolean" } }
37661
+ },
37662
+ outputSchema: {
37663
+ type: "object",
37664
+ properties: { url: { type: "string" } }
37665
+ }
37666
+ })
37667
+ }),
37668
+ args: { json: {
37669
+ type: "boolean",
37670
+ description: "Print a JSON object"
37671
+ } },
37672
+ run: ({ args }) => {
37673
+ if (args.json) {
37674
+ printData({ url: SOCIAL_MCP_URL });
37675
+ return;
37676
+ }
37677
+ printLine(SOCIAL_MCP_URL);
37656
37678
  }
37657
- printLine(SOCIAL_MCP_URL);
37658
- }
37659
- }) }
37679
+ })
37680
+ }
37660
37681
  });
37661
37682
  //#endregion
37662
37683
  //#region ../../packages/lib/src/cli-schema-contract.ts