@smbcloud/xcrs 0.5.2

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.
Files changed (3) hide show
  1. package/README.md +87 -0
  2. package/lib/index.js +38 -0
  3. package/package.json +56 -0
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ <!-- LOGO -->
2
+ <h1>
3
+ <p align="center">
4
+ <img src="https://avatars.githubusercontent.com/u/89791739?s=200&v=4" alt="smbCloud Logo" width="128">
5
+ <br>xcrs
6
+ </h1>
7
+ <p align="center">
8
+ Cross-platform mobile and TV app automation over MCP.
9
+ <br />
10
+ <br />
11
+ <a href="https://smbcloud.xyz/">Website</a>
12
+ ·
13
+ <a href="https://smbcloud.xyz/posts">Documentation</a>
14
+ ·
15
+ <a href="https://github.com/smbcloudXYZ/smbcloud-cli/releases">Releases</a>
16
+ ·
17
+ <a href="https://github.com/smbcloudXYZ/smbcloud-cli/issues">Issues</a>
18
+ </p>
19
+ <p align="center">
20
+ <a href="https://www.npmjs.com/package/@smbcloud/xcrs"><img alt="npm" src="https://img.shields.io/npm/v/@smbcloud/xcrs"></a>
21
+ <a href="https://www.nuget.org/packages/SmbCloud.Xcrs"><img alt="NuGet" src="https://img.shields.io/nuget/v/SmbCloud.Xcrs"></a>
22
+ <a href="https://pypi.org/project/xcrs/"><img alt="PyPI" src="https://img.shields.io/pypi/v/xcrs"></a>
23
+ <a href="https://crates.io/crates/xcrs"><img alt="Crates.io" src="https://img.shields.io/crates/v/xcrs"></a>
24
+ <a href="https://github.com/smbcloudXYZ/smbcloud-cli/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/smbcloudXYZ/smbcloud-cli"></a>
25
+ </p>
26
+ </p>
27
+
28
+ ## About
29
+
30
+ **`xcrs`** drives mobile and TV apps — on iOS simulators, physical Apple
31
+ devices, and adb-connected Android phones, tablets, emulators, and TVs — through
32
+ the [Model Context Protocol](https://modelcontextprotocol.io/). It is the
33
+ standalone automation profile of the [smbCloud CLI](https://smbcloud.xyz/); the
34
+ same tools are also available via `smb --mcp --scope automation`.
35
+
36
+ This package installs the native `xcrs` executable for your platform directly —
37
+ no runtime dependencies.
38
+
39
+ ## Install
40
+
41
+ ```sh
42
+ npm install -g @smbcloud/xcrs
43
+ ```
44
+
45
+ ## Quick start
46
+
47
+ Run it as an MCP server over stdio and point your MCP client at it:
48
+
49
+ ```sh
50
+ xcrs --mcp
51
+ ```
52
+
53
+ **Recommended flow:** `device_list` → `device_select` → `device_capabilities`,
54
+ then inspect with `screen_capture` / `ui_describe` and drive with the `input_*`
55
+ tools.
56
+
57
+ ## Other installation methods
58
+
59
+ - Cargo: `cargo install xcrs`
60
+ - pip: `pip install xcrs`
61
+ - NuGet: `dotnet tool install --global SmbCloud.Xcrs`
62
+
63
+ ## Platform support
64
+
65
+ | Platform | Architecture |
66
+ | ------------- | ------------ |
67
+ | macOS | arm64, x64 |
68
+ | Linux (glibc) | arm64, x64 |
69
+ | Windows | arm64, x64 |
70
+
71
+ The full Apple automation surface (`ui_describe`, `ui_element_list`, simulator
72
+ control) requires macOS with Xcode command-line tools. Android automation over
73
+ `adb` works from any platform.
74
+
75
+ ## Source
76
+
77
+ - Repository: <https://github.com/smbcloudXYZ/smbcloud-cli>
78
+ - Documentation: <https://smbcloud.xyz/posts>
79
+ - Issues: <https://github.com/smbcloudXYZ/smbcloud-cli/issues>
80
+
81
+ ## License
82
+
83
+ Apache-2.0
84
+
85
+ ## Copyright
86
+
87
+ © 2026 [Splitfire AB](https://5mb.app) ([smbCloud](https://smbcloud.xyz)).
package/lib/index.js ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const child_process_1 = require("child_process");
5
+ /**
6
+ * Returns the executable path which is located inside `node_modules`
7
+ * The naming convention is xcrs-${os}-${arch}
8
+ * If the platform is `win32` or `cygwin`, executable will include a `.exe` extension.
9
+ * @see https://nodejs.org/api/os.html#osarch
10
+ * @see https://nodejs.org/api/os.html#osplatform
11
+ * @example "x/xx/node_modules/xcrs-darwin-arm64"
12
+ */
13
+ function getExePath() {
14
+ const arch = process.arch;
15
+ let os = process.platform;
16
+ let extension = "";
17
+ if (["win32", "cygwin"].includes(process.platform)) {
18
+ os = "windows";
19
+ extension = ".exe";
20
+ }
21
+ try {
22
+ // The binary lives in `node_modules`, so `require.resolve` gives us the installed path.
23
+ return require.resolve(`@smbcloud/xcrs-${os}-${arch}/bin/xcrs${extension}`);
24
+ }
25
+ catch (e) {
26
+ throw new Error(`Couldn't find application binary inside node_modules for ${os}-${arch}`);
27
+ }
28
+ }
29
+ /**
30
+ * Runs the native CLI with the current process arguments.
31
+ */
32
+ function run() {
33
+ var _a;
34
+ const args = process.argv.slice(2);
35
+ const processResult = (0, child_process_1.spawnSync)(getExePath(), args, { stdio: "inherit" });
36
+ process.exit((_a = processResult.status) !== null && _a !== void 0 ? _a : 0);
37
+ }
38
+ run();
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@smbcloud/xcrs",
3
+ "version": "0.5.2",
4
+ "mcpName": "io.github.smbcloudXYZ/xcrs",
5
+ "keywords": [
6
+ "xcrs",
7
+ "mcp",
8
+ "model-context-protocol",
9
+ "mobile",
10
+ "ios",
11
+ "android",
12
+ "tv",
13
+ "apple-tv",
14
+ "android-tv",
15
+ "automation",
16
+ "app-testing",
17
+ "device",
18
+ "simulator",
19
+ "adb",
20
+ "cli"
21
+ ],
22
+ "bin": {
23
+ "xcrs": "lib/index.js"
24
+ },
25
+ "files": [
26
+ "lib",
27
+ "README.md"
28
+ ],
29
+ "description": "Cross-platform mobile and TV app automation over MCP.",
30
+ "license": "Apache-2.0",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/smbcloudXYZ/smbcloud-cli.git"
34
+ },
35
+ "scripts": {
36
+ "typecheck": "tsc --noEmit",
37
+ "lint": "eslint .",
38
+ "lint:fix": "eslint . --fix",
39
+ "build": "tsc",
40
+ "dev": "npm run build && node lib/index.js"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^18.15.11",
44
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
45
+ "@typescript-eslint/parser": "^5.48.0",
46
+ "eslint": "^8.31.0",
47
+ "typescript": "^5.0.0"
48
+ },
49
+ "optionalDependencies": {
50
+ "@smbcloud/xcrs-darwin-arm64": "0.5.2",
51
+ "@smbcloud/xcrs-darwin-x64": "0.5.2",
52
+ "@smbcloud/xcrs-linux-x64": "0.5.2",
53
+ "@smbcloud/xcrs-windows-arm64": "0.5.2",
54
+ "@smbcloud/xcrs-windows-x64": "0.5.2"
55
+ }
56
+ }