capacitor-mobile-claw 1.4.0 → 1.4.1

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 (2) hide show
  1. package/README.md +42 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -31,38 +31,42 @@ The fastest way to see Mobile Claw in action is the included reference app — a
31
31
  ### Run on Android
32
32
 
33
33
  ```bash
34
- # Clone the repo
35
34
  git clone https://github.com/rogelioRuiz/capacitor-mobile-claw.git
36
35
  cd capacitor-mobile-claw
37
36
 
38
- # Install plugin dependencies
37
+ # Install plugin + reference app deps (postinstall auto-copies Node.js worker)
39
38
  npm install
40
-
41
- # Set up the reference app
42
39
  cd examples/reference-app
43
40
  npm install
44
41
 
45
- # Build the web app
46
- npm run build
42
+ # Build web app + sync native project
43
+ npm run cap:build
47
44
 
48
- # Add the Android platform (first time only)
45
+ # First time only add platform
49
46
  npx cap add android
50
47
 
51
- # Sync web assets native project
52
- npx cap sync android
53
-
54
- # Open in Android Studio — build & run from there
48
+ # Open in Android Studio build & run
55
49
  npx cap open android
56
50
  ```
57
51
 
58
52
  ### Run on iOS
59
53
 
60
54
  ```bash
55
+ git clone https://github.com/rogelioRuiz/capacitor-mobile-claw.git
56
+ cd capacitor-mobile-claw
57
+
58
+ npm install
61
59
  cd examples/reference-app
60
+ npm install
61
+
62
+ # Build web app + sync + copy iOS builtin_modules
63
+ npm run cap:build
64
+
65
+ # First time only — add platform
62
66
  npx cap add ios
63
- npx cap sync ios
67
+
68
+ # Open in Xcode — build & run
64
69
  npx cap open ios
65
- # Build & run from Xcode
66
70
  ```
67
71
 
68
72
  Once the app launches, enter your Anthropic API key in settings and start chatting. The agent can read/write files, run code, use git, and call any registered MCP device tools — all on-device.
@@ -97,18 +101,34 @@ Once the app launches, enter your Anthropic API key in settings and start chatti
97
101
  ## Install in Your Own App
98
102
 
99
103
  ```bash
100
- npm install capacitor-mobile-claw
104
+ npm install capacitor-mobile-claw @capacitor/core @capacitor/device @choreruiz/capacitor-node-js
101
105
  ```
102
106
 
103
- Peer dependencies:
104
- ```bash
105
- npm install @capacitor/core @capacitor/device
106
- # capacitor-nodejs is distributed via GitHub Releases (not npm):
107
- npm install https://github.com/hampoelz/Capacitor-NodeJS/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz
108
- # Optional (for MCP device tools):
109
- npm install @modelcontextprotocol/sdk
107
+ Then add these scripts to your `package.json`:
108
+
109
+ ```json
110
+ {
111
+ "scripts": {
112
+ "setup:worker": "rm -rf public/nodejs-project && cp -R node_modules/capacitor-mobile-claw/nodejs-assets/nodejs-project public/nodejs-project && cd public/nodejs-project && npm install --production",
113
+ "postinstall": "npm run setup:worker",
114
+ "cap:sync": "cap sync && cp -R node_modules/@choreruiz/capacitor-node-js/ios/assets/builtin_modules ios/App/App/public/builtin_modules 2>/dev/null; true",
115
+ "cap:build": "npm run setup:worker && vite build && npm run cap:sync"
116
+ }
117
+ }
110
118
  ```
111
119
 
120
+ And add to your `capacitor.config.ts`:
121
+
122
+ ```typescript
123
+ plugins: {
124
+ CapacitorNodeJS: {
125
+ nodeDir: 'nodejs-project',
126
+ },
127
+ }
128
+ ```
129
+
130
+ Add `public/nodejs-project` to your `.gitignore` — it's generated from the npm package.
131
+
112
132
  ### Basic Usage
113
133
 
114
134
  ```typescript
@@ -214,7 +234,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, workflow, and guid
214
234
  |-------|-----------|
215
235
  | Mobile framework | [Capacitor 8](https://capacitorjs.com/) |
216
236
  | Agent core | [Pi](https://www.npmjs.com/package/@mariozechner/pi-ai) by Mario Zechner |
217
- | Embedded runtime | [Capacitor-NodeJS](https://github.com/hampoelz/Capacitor-NodeJS) |
237
+ | Embedded runtime | [@choreruiz/capacitor-node-js](https://github.com/rogelioRuiz/capacitor-node-js) |
218
238
  | Tool protocol | [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) |
219
239
  | LLM provider | [Anthropic Claude](https://anthropic.com/) |
220
240
  | Git | [isomorphic-git](https://isomorphic-git.org/) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-mobile-claw",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "On-device AI agent engine for Capacitor apps — embedded Node.js worker with LLM, file tools, code execution, git, and extensible MCP server",
5
5
  "main": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",