@usesocial/cli 0.15.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 +6 -0
- package/dist/index.mjs +47 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 0.15.0
|
|
4
10
|
|
|
5
11
|
### 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.
|
|
24055
|
+
var version$1 = "0.16.0";
|
|
24056
24056
|
//#endregion
|
|
24057
24057
|
//#region src/lib/env.ts
|
|
24058
24058
|
const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
|
|
@@ -37625,38 +37625,59 @@ const createCLIDeps = () => {
|
|
|
37625
37625
|
//#endregion
|
|
37626
37626
|
//#region src/mcp/index.ts
|
|
37627
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: {
|
|
37634
|
-
|
|
37635
|
-
|
|
37636
|
-
|
|
37637
|
-
|
|
37638
|
-
|
|
37639
|
-
type: "
|
|
37640
|
-
|
|
37641
|
-
}
|
|
37642
|
-
|
|
37643
|
-
|
|
37644
|
-
|
|
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
|
-
|
|
37649
|
-
|
|
37650
|
-
|
|
37651
|
-
|
|
37652
|
-
|
|
37653
|
-
|
|
37654
|
-
|
|
37655
|
-
|
|
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
|
-
|
|
37658
|
-
|
|
37659
|
-
}) }
|
|
37679
|
+
})
|
|
37680
|
+
}
|
|
37660
37681
|
});
|
|
37661
37682
|
//#endregion
|
|
37662
37683
|
//#region ../../packages/lib/src/cli-schema-contract.ts
|