clawty 0.0.1 → 0.0.3
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/README.md +6 -10
- package/package.json +4 -3
- package/src/cli.ts +1 -1
- package/src/imessage/sender.ts +2 -2
- package/bin/imessage-claude.ts +0 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Clawty
|
|
2
2
|
|
|
3
3
|
Bridge iMessage to Claude Code CLI — text Claude from your phone.
|
|
4
4
|
|
|
@@ -33,9 +33,7 @@ You can also type messages directly in the terminal — they're sent to Claude t
|
|
|
33
33
|
### 1. Install
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
|
|
37
|
-
cd imessage-claude-code
|
|
38
|
-
bun install
|
|
36
|
+
bun add -g clawty
|
|
39
37
|
```
|
|
40
38
|
|
|
41
39
|
### 2. Grant macOS Permissions
|
|
@@ -52,7 +50,7 @@ bun install
|
|
|
52
50
|
### 3. Start the Bridge
|
|
53
51
|
|
|
54
52
|
```bash
|
|
55
|
-
|
|
53
|
+
clawty --contact "+1234567890"
|
|
56
54
|
```
|
|
57
55
|
|
|
58
56
|
Replace `+1234567890` with your phone number (the one you'll text from). If you omit `--contact`, the bridge will prompt you for it interactively.
|
|
@@ -71,19 +69,17 @@ Options:
|
|
|
71
69
|
--help, -h Show help
|
|
72
70
|
```
|
|
73
71
|
|
|
74
|
-
Also available as `clawty` (alias for `imessage-claude`).
|
|
75
|
-
|
|
76
72
|
### Examples
|
|
77
73
|
|
|
78
74
|
```bash
|
|
79
75
|
# Basic — respond to texts from your phone number
|
|
80
|
-
|
|
76
|
+
clawty -c "+1234567890"
|
|
81
77
|
|
|
82
78
|
# With a project directory so Claude has file context
|
|
83
|
-
|
|
79
|
+
clawty -c "+1234567890" -d ~/projects/myapp
|
|
84
80
|
|
|
85
81
|
# Use a specific model
|
|
86
|
-
|
|
82
|
+
clawty -c "+1234567890" -m opus
|
|
87
83
|
```
|
|
88
84
|
|
|
89
85
|
### Terminal UI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawty",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"module": "src/index.ts",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@types/bun": "latest"
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"typescript": "^5"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"imessage-claude": "./bin/imessage-claude.ts",
|
|
13
12
|
"clawty": "./bin/clawty.ts"
|
|
14
13
|
},
|
|
15
14
|
"description": "Bridge iMessage to Claude Code CLI — text Claude from your phone",
|
|
@@ -40,5 +39,7 @@
|
|
|
40
39
|
"dev": "bun run src/cli.ts"
|
|
41
40
|
},
|
|
42
41
|
"type": "module",
|
|
43
|
-
"dependencies": {
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"clawty": "^0.0.2"
|
|
44
|
+
}
|
|
44
45
|
}
|
package/src/cli.ts
CHANGED
|
@@ -332,7 +332,7 @@ function printUsage(): void {
|
|
|
332
332
|
${BRIGHT_MAGENTA}\u2726${RESET} ${BOLD}iMessage ${BRIGHT_MAGENTA}\u2194${RESET}${BOLD} Claude Code${RESET}
|
|
333
333
|
${DIM}Text Claude Code from your phone via iMessage${RESET}
|
|
334
334
|
|
|
335
|
-
${BOLD}Usage${RESET} ${DIM}
|
|
335
|
+
${BOLD}Usage${RESET} ${DIM}clawty [options]${RESET}
|
|
336
336
|
|
|
337
337
|
${BOLD}Options${RESET}
|
|
338
338
|
${BRIGHT_MAGENTA}--contact, -c${RESET} ${DIM}<phone|email>${RESET} Contact to bridge with ${DIM}(required)${RESET}
|
package/src/imessage/sender.ts
CHANGED
|
@@ -18,7 +18,7 @@ async function cleanupTmpFile(path: string): Promise<void> {
|
|
|
18
18
|
* from a temp file to avoid all string escaping issues.
|
|
19
19
|
*/
|
|
20
20
|
async function sendViaJxa(contact: string, text: string): Promise<{ ok: boolean; error?: string }> {
|
|
21
|
-
const tmpFile = join(tmpdir(), `
|
|
21
|
+
const tmpFile = join(tmpdir(), `clawty-${Date.now()}-${Math.random().toString(36).slice(2)}.txt`);
|
|
22
22
|
await Bun.write(tmpFile, text);
|
|
23
23
|
|
|
24
24
|
try {
|
|
@@ -58,7 +58,7 @@ function run() {
|
|
|
58
58
|
* Reads message from temp file. Tries participant syntax, then buddy syntax.
|
|
59
59
|
*/
|
|
60
60
|
async function sendViaAppleScript(contact: string, text: string): Promise<{ ok: boolean; error?: string }> {
|
|
61
|
-
const tmpFile = join(tmpdir(), `
|
|
61
|
+
const tmpFile = join(tmpdir(), `clawty-${Date.now()}.txt`);
|
|
62
62
|
await Bun.write(tmpFile, text);
|
|
63
63
|
|
|
64
64
|
const escapedContact = contact.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
package/bin/imessage-claude.ts
DELETED