moshi-opencode-hooks 1.0.12 → 1.0.13

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 +66 -30
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,38 +1,74 @@
1
1
  # moshi-opencode-hooks
2
2
 
3
- OpenCode plugin for Moshi live activity integration. Provides real-time progress updates in the Moshi iOS app when using OpenCode.
3
+ OpenCode plugin that sends real-time events to the [Moshi](https://getmoshi.app) iOS app for live activity integration.
4
+
5
+ ![Live Activity](https://img.shields.io/badge/Live%20Activity-Moshi-blue)
6
+
7
+ ## Motivation
8
+
9
+ [Moshi](https://getmoshi.app) is an iOS SSH app that provides live activity widgets on the lock screen and Dynamic Island. While it already supports Cloud Code, this plugin brings the same live activity experience to [OpenCode](https://opencode.ai) users.
10
+
11
+ Track your coding session progress in real-time:
12
+ - See which tool is currently running
13
+ - Get notified when permissions are needed
14
+ - Know when your task completes
4
15
 
5
16
  ## Setup
6
17
 
7
- 1. **Install the token** (if not already done with Claude Code):
8
- ```bash
9
- bunx moshi-hooks token Xjqyek7li0vXgBnIlvXEn3VJgdhWf8qW
10
- ```
11
-
12
- 2. **Add as npm plugin** in `~/.config/opencode/opencode.json`:
13
- ```json
14
- {
15
- "$schema": "https://opencode.ai/config.json",
16
- "plugin": ["moshi-opencode-hooks"]
17
- }
18
- ```
19
-
20
- Or use a local path for development:
21
- ```json
22
- {
23
- "$schema": "https://opencode.ai/config.json",
24
- "plugin": ["/path/to/moshi-opencode-hooks"]
25
- }
26
- ```
27
-
28
- ## Events Sent to Moshi
29
-
30
- - `tool.execute.before/after` - Tool execution (Bash, Edit, Write, Read, Glob, Grep, Task)
31
- - `permission.ask` - Permission prompts
32
- - `session.created` - Session start
33
- - `session.idle` - Task completion
18
+ ```bash
19
+ # 1. Install the plugin (pulls from npm)
20
+ bunx moshi-opencode-hooks setup
21
+
22
+ # 2. Add your Moshi token
23
+ bunx moshi-opencode-hooks token YOUR_TOKEN_HERE
24
+ ```
25
+
26
+ That's it! OpenCode will now send events to Moshi whenever you start a session or run a tool.
27
+
28
+ ### Manual Setup
29
+
30
+ Add to `~/.config/opencode/opencode.json`:
31
+
32
+ ```json
33
+ {
34
+ "$schema": "https://opencode.ai/config.json",
35
+ "plugin": ["moshi-opencode-hooks"]
36
+ }
37
+ ```
38
+
39
+ ## Events
40
+
41
+ The plugin sends these events to Moshi:
42
+
43
+ | OpenCode Event | Moshi Display |
44
+ |----------------|--------------|
45
+ | `session.created` | Session started |
46
+ | `tool.execute.before` | Running tool (Bash, Edit, Write, Read, Glob, Grep, Task) |
47
+ | `tool.execute.after` | Tool finished |
48
+ | `permission.ask` | Permission required |
49
+ | `session.idle` | Task complete |
34
50
 
35
51
  ## Requirements
36
52
 
37
- - OpenCode
38
- - Moshi iOS app with Cloud Code hook token
53
+ - [OpenCode](https://opencode.ai)
54
+ - [Moshi iOS app](https://getmoshi.app) with Cloud Code subscription
55
+
56
+ ## Moshi Token
57
+
58
+ Get your token from the Moshi iOS app:
59
+ 1. Open Moshi → Settings → Coding Agents
60
+ 2. Copy the hook token
61
+
62
+ ## Uninstall
63
+
64
+ ```bash
65
+ bunx moshi-opencode-hooks uninstall
66
+ ```
67
+
68
+ ## How It Works
69
+
70
+ The plugin hooks into OpenCode's plugin system and subscribes to session and tool events. When events occur, they're normalized and POSTed to the Moshi API endpoint, which pushes updates to your live activity.
71
+
72
+ ## License
73
+
74
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moshi-opencode-hooks",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "OpenCode plugin for Moshi live activity integration",
5
5
  "repository": {
6
6
  "type": "git",