pushary 1.8.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.
Files changed (186) hide show
  1. package/CHANGELOG.md +1943 -0
  2. package/LICENSE +21 -0
  3. package/README.md +330 -0
  4. package/data/SKILL.md +591 -0
  5. package/data/cowork/SKILL.md +77 -0
  6. package/data/cursor-plugin/.cursor-plugin/plugin.json +25 -0
  7. package/data/cursor-plugin/CHANGELOG.md +70 -0
  8. package/data/cursor-plugin/CONTRIBUTING.md +40 -0
  9. package/data/cursor-plugin/LICENSE +21 -0
  10. package/data/cursor-plugin/README.md +113 -0
  11. package/data/cursor-plugin/SECURITY.md +33 -0
  12. package/data/cursor-plugin/assets/logo.png +0 -0
  13. package/data/cursor-plugin/commands/notify-when-done.md +14 -0
  14. package/data/cursor-plugin/commands/pushary-test.md +13 -0
  15. package/data/cursor-plugin/hooks/hooks.json +75 -0
  16. package/data/cursor-plugin/mcp.json +11 -0
  17. package/data/cursor-plugin/rules/pushary.mdc +40 -0
  18. package/data/cursor-plugin/scripts/pushary-gate.mjs +724 -0
  19. package/data/cursor-plugin/scripts/pushary-gate.test.mjs +137 -0
  20. package/data/cursor-plugin/scripts/redaction.mjs +51 -0
  21. package/data/cursor-plugin/skills/pushary/SKILL.md +584 -0
  22. package/data/vscode-plugin/.claude-plugin/plugin.json +28 -0
  23. package/data/vscode-plugin/.mcp.json +11 -0
  24. package/data/vscode-plugin/CHANGELOG.md +49 -0
  25. package/data/vscode-plugin/CONTRIBUTING.md +40 -0
  26. package/data/vscode-plugin/LICENSE +21 -0
  27. package/data/vscode-plugin/README.md +128 -0
  28. package/data/vscode-plugin/SECURITY.md +56 -0
  29. package/data/vscode-plugin/assets/logo.png +0 -0
  30. package/data/vscode-plugin/commands/notify-when-done.md +14 -0
  31. package/data/vscode-plugin/commands/pushary-test.md +13 -0
  32. package/data/vscode-plugin/hooks/hooks.json +60 -0
  33. package/data/vscode-plugin/scripts/pushary-gate.mjs +762 -0
  34. package/data/vscode-plugin/scripts/redaction.mjs +51 -0
  35. package/data/vscode-plugin/skills/pushary/SKILL.md +584 -0
  36. package/dist/bin/pushary-bell-hook.d.ts +1 -0
  37. package/dist/bin/pushary-bell-hook.js +46 -0
  38. package/dist/bin/pushary-bell.d.ts +1 -0
  39. package/dist/bin/pushary-bell.js +146 -0
  40. package/dist/bin/pushary-claude.d.ts +1 -0
  41. package/dist/bin/pushary-claude.js +1916 -0
  42. package/dist/bin/pushary-clean.d.ts +1 -0
  43. package/dist/bin/pushary-clean.js +1300 -0
  44. package/dist/bin/pushary-codex-bridge.d.ts +1 -0
  45. package/dist/bin/pushary-codex-bridge.js +599 -0
  46. package/dist/bin/pushary-codex-hook.d.ts +1 -0
  47. package/dist/bin/pushary-codex-hook.js +886 -0
  48. package/dist/bin/pushary-codex.d.ts +1 -0
  49. package/dist/bin/pushary-codex.js +125 -0
  50. package/dist/bin/pushary-connect.d.ts +1 -0
  51. package/dist/bin/pushary-connect.js +100 -0
  52. package/dist/bin/pushary-cowork.d.ts +1 -0
  53. package/dist/bin/pushary-cowork.js +36 -0
  54. package/dist/bin/pushary-daemon-supervisor.d.ts +1 -0
  55. package/dist/bin/pushary-daemon-supervisor.js +27 -0
  56. package/dist/bin/pushary-daemon.d.ts +1 -0
  57. package/dist/bin/pushary-daemon.js +878 -0
  58. package/dist/bin/pushary-disconnect.d.ts +1 -0
  59. package/dist/bin/pushary-disconnect.js +264 -0
  60. package/dist/bin/pushary-doctor.d.ts +1 -0
  61. package/dist/bin/pushary-doctor.js +1433 -0
  62. package/dist/bin/pushary-elicitation-hook.d.ts +1 -0
  63. package/dist/bin/pushary-elicitation-hook.js +149 -0
  64. package/dist/bin/pushary-gemini-bridge.d.ts +1 -0
  65. package/dist/bin/pushary-gemini-bridge.js +339 -0
  66. package/dist/bin/pushary-gemini-hook.d.ts +1 -0
  67. package/dist/bin/pushary-gemini-hook.js +381 -0
  68. package/dist/bin/pushary-hook.d.ts +1 -0
  69. package/dist/bin/pushary-hook.js +95 -0
  70. package/dist/bin/pushary-login.d.ts +1 -0
  71. package/dist/bin/pushary-login.js +198 -0
  72. package/dist/bin/pushary-logout.d.ts +1 -0
  73. package/dist/bin/pushary-logout.js +147 -0
  74. package/dist/bin/pushary-mcp.d.ts +1 -0
  75. package/dist/bin/pushary-mcp.js +114 -0
  76. package/dist/bin/pushary-mode.d.ts +1 -0
  77. package/dist/bin/pushary-mode.js +130 -0
  78. package/dist/bin/pushary-notification-hook.d.ts +1 -0
  79. package/dist/bin/pushary-notification-hook.js +56 -0
  80. package/dist/bin/pushary-opencode-hook.d.ts +1 -0
  81. package/dist/bin/pushary-opencode-hook.js +338 -0
  82. package/dist/bin/pushary-permission-denied-hook.d.ts +1 -0
  83. package/dist/bin/pushary-permission-denied-hook.js +60 -0
  84. package/dist/bin/pushary-permission-hook.d.ts +1 -0
  85. package/dist/bin/pushary-permission-hook.js +65 -0
  86. package/dist/bin/pushary-post-hook.d.ts +1 -0
  87. package/dist/bin/pushary-post-hook.js +70 -0
  88. package/dist/bin/pushary-prompt-hook.d.ts +1 -0
  89. package/dist/bin/pushary-prompt-hook.js +61 -0
  90. package/dist/bin/pushary-session-end-hook.d.ts +1 -0
  91. package/dist/bin/pushary-session-end-hook.js +59 -0
  92. package/dist/bin/pushary-session-start-hook.d.ts +1 -0
  93. package/dist/bin/pushary-session-start-hook.js +72 -0
  94. package/dist/bin/pushary-setup.d.ts +1 -0
  95. package/dist/bin/pushary-setup.js +2660 -0
  96. package/dist/bin/pushary-stats.d.ts +1 -0
  97. package/dist/bin/pushary-stats.js +44 -0
  98. package/dist/bin/pushary-status.d.ts +1 -0
  99. package/dist/bin/pushary-status.js +262 -0
  100. package/dist/bin/pushary-stop-hook.d.ts +1 -0
  101. package/dist/bin/pushary-stop-hook.js +63 -0
  102. package/dist/bin/pushary-stopfailure-hook.d.ts +1 -0
  103. package/dist/bin/pushary-stopfailure-hook.js +56 -0
  104. package/dist/bin/pushary-suggestions.d.ts +1 -0
  105. package/dist/bin/pushary-suggestions.js +100 -0
  106. package/dist/bin/pushary-transcript-register.d.ts +1 -0
  107. package/dist/bin/pushary-transcript-register.js +40 -0
  108. package/dist/bin/pushary-transcripts.d.ts +1 -0
  109. package/dist/bin/pushary-transcripts.js +77 -0
  110. package/dist/bin/pushary-upgrade.d.ts +1 -0
  111. package/dist/bin/pushary-upgrade.js +599 -0
  112. package/dist/bin/pushary-wait.d.ts +1 -0
  113. package/dist/bin/pushary-wait.js +122 -0
  114. package/dist/bin/pushary.d.ts +1 -0
  115. package/dist/bin/pushary.js +74 -0
  116. package/dist/chunk-2ABTSGFT.js +173 -0
  117. package/dist/chunk-2OY3ZZ5N.js +124 -0
  118. package/dist/chunk-3EGEA4KH.js +44 -0
  119. package/dist/chunk-3EVPNIBE.js +185 -0
  120. package/dist/chunk-5OP5MQI7.js +45 -0
  121. package/dist/chunk-6J2JC2RT.js +149 -0
  122. package/dist/chunk-7QLSKOSU.js +19 -0
  123. package/dist/chunk-7Z7Q4GGS.js +88 -0
  124. package/dist/chunk-A2A2YTMG.js +835 -0
  125. package/dist/chunk-AHV4LNB5.js +377 -0
  126. package/dist/chunk-AXPCESYO.js +197 -0
  127. package/dist/chunk-C2WCPBF7.js +86 -0
  128. package/dist/chunk-CJVVKOSR.js +73 -0
  129. package/dist/chunk-CULUZTWQ.js +2117 -0
  130. package/dist/chunk-CVQYGMSR.js +142 -0
  131. package/dist/chunk-CVWG2N3Y.js +16 -0
  132. package/dist/chunk-D2FX3EPW.js +15 -0
  133. package/dist/chunk-DB3ONZB4.js +44 -0
  134. package/dist/chunk-DE4Y6TCC.js +160 -0
  135. package/dist/chunk-E4FJTUH4.js +249 -0
  136. package/dist/chunk-EPCXUP3P.js +41 -0
  137. package/dist/chunk-EX3GAPA4.js +44 -0
  138. package/dist/chunk-EYK3GSRH.js +143 -0
  139. package/dist/chunk-GMXKITVA.js +70 -0
  140. package/dist/chunk-GPEGOGRJ.js +49 -0
  141. package/dist/chunk-GU3EJCVV.js +43 -0
  142. package/dist/chunk-HQ6G3B5R.js +59 -0
  143. package/dist/chunk-HZVVNGEW.js +22 -0
  144. package/dist/chunk-IPVKH2ST.js +231 -0
  145. package/dist/chunk-J5TIV3J6.js +238 -0
  146. package/dist/chunk-JU6W3XAU.js +64 -0
  147. package/dist/chunk-JYG4B33G.js +227 -0
  148. package/dist/chunk-JZTHGAPA.js +503 -0
  149. package/dist/chunk-KGDWDSNL.js +102 -0
  150. package/dist/chunk-KVQBWI5T.js +99 -0
  151. package/dist/chunk-KZERVKTD.js +16 -0
  152. package/dist/chunk-LXQ5FBBD.js +47 -0
  153. package/dist/chunk-M5ICYGHT.js +138 -0
  154. package/dist/chunk-M5JDZ45W.js +943 -0
  155. package/dist/chunk-MDEPU45E.js +1226 -0
  156. package/dist/chunk-MPWXGONV.js +157 -0
  157. package/dist/chunk-N6IOSZOE.js +185 -0
  158. package/dist/chunk-NGDD6TXY.js +192 -0
  159. package/dist/chunk-NQTHFF4W.js +2830 -0
  160. package/dist/chunk-OKXS7WDZ.js +68 -0
  161. package/dist/chunk-OLQRRFBX.js +21 -0
  162. package/dist/chunk-P7WQEVWA.js +307 -0
  163. package/dist/chunk-POFBE6ZY.js +12 -0
  164. package/dist/chunk-PQ4K74WL.js +30 -0
  165. package/dist/chunk-PUZZELE6.js +37 -0
  166. package/dist/chunk-Q7E4I6UA.js +767 -0
  167. package/dist/chunk-QCGNGEGE.js +15 -0
  168. package/dist/chunk-R7437YI3.js +151 -0
  169. package/dist/chunk-RHR6NARM.js +305 -0
  170. package/dist/chunk-SAXBC4AZ.js +60 -0
  171. package/dist/chunk-SGZJ5LYH.js +76 -0
  172. package/dist/chunk-SIFVFP6T.js +70 -0
  173. package/dist/chunk-SLFABHW3.js +150 -0
  174. package/dist/chunk-T7E75EKA.js +67 -0
  175. package/dist/chunk-TY4JT7W3.js +38 -0
  176. package/dist/chunk-U4TMAANR.js +111 -0
  177. package/dist/chunk-UI36QSBI.js +177 -0
  178. package/dist/chunk-VQKRG3AC.js +339 -0
  179. package/dist/chunk-WE2J62NC.js +1131 -0
  180. package/dist/chunk-XHKBHWLX.js +14 -0
  181. package/dist/chunk-ZSZSSJCV.js +275 -0
  182. package/dist/chunk-ZVSKMPBZ.js +135 -0
  183. package/dist/reapply-CW3MA66V.js +34 -0
  184. package/dist/src/index.d.ts +204 -0
  185. package/dist/src/index.js +64 -0
  186. package/package.json +108 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pushary
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,330 @@
1
+ # Pushary
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pushary/agent-hooks.svg)](https://www.npmjs.com/package/@pushary/agent-hooks)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@pushary/agent-hooks.svg)](https://www.npmjs.com/package/@pushary/agent-hooks)
5
+ [![license](https://img.shields.io/npm/l/@pushary/agent-hooks.svg)](./LICENSE)
6
+
7
+ Push notifications, questions, and permission approvals for AI agents. Get a push when your agent finishes work, answer its questions from your phone, and approve risky commands before they run. Works with Claude Code, Codex, Cursor, VS Code, OpenCode, Gemini CLI, Hermes, and fx.
8
+
9
+ Your agent froze waiting for a yes. This is how it reaches you.
10
+
11
+ ```bash
12
+ npx @pushary/agent-hooks@latest setup
13
+ ```
14
+
15
+ One command wires up the MCP server, the permission hooks, and the agent instruction files. Then you close your laptop and the agent still reaches you.
16
+
17
+ ## What it does
18
+
19
+ There are three things.
20
+
21
+ **Notify.** The agent sends a push when a long task finishes or when a build, test, or deploy fails. The notification can carry what changed, the error, and suggested next steps.
22
+
23
+ **Ask.** The agent asks you questions through push: yes/no, multiple choice, or free text. It waits for your answer. When Pushary is connected, the agent sends its questions to your phone instead of stalling in the terminal.
24
+
25
+ **Gate.** Risky shell commands (`rm -rf`, force pushes, history rewrites, database drops, deploys) are checked before they run. What happens is set by your dashboard policy: auto approve trusted read-only commands, push to your phone for approval, or hold for the phone and never auto-deny. If the check cannot run, the decision falls back to the agent's own permission prompt in the terminal; nothing is silently allowed. Without an API key configured, the hooks stay out of the way entirely and only count what they would have gated.
26
+
27
+ ## Just want a bell? That part is free.
28
+
29
+ If your agent runs in front of you and you only need to know when it finishes,
30
+ you do not need any of the above and you should not pay for it:
31
+
32
+ ```bash
33
+ npx @pushary/agent-hooks@latest bell
34
+ ```
35
+
36
+ That is the whole thing. It makes a noise in your terminal and raises a desktop
37
+ notification when Claude Code says an agent finished or is waiting on you.
38
+ It rides Claude Code's own notification events, so it fires when you have
39
+ actually stepped away rather than after every reply. No account,
40
+ no API key, no network call, nothing leaves your machine. Turn it off with
41
+ `pushary bell --off`; it touches nothing else in your settings.
42
+
43
+ ### If you landed here from `error: unknown option '--global'`
44
+
45
+ You probably ran this, from a blog post or an answer somewhere:
46
+
47
+ ```
48
+ claude config set --global preferrednotifchannel terminal_bell
49
+ error: unknown option '--global'
50
+ ```
51
+
52
+ `claude config set` no longer takes `--global`. The setting moved into
53
+ `~/.claude/settings.json`, so the direct equivalent is to put it there yourself:
54
+
55
+ ```json
56
+ { "preferredNotifChannel": "terminal_bell" }
57
+ ```
58
+
59
+ That rings on Claude Code's own notification events. `pushary bell` does the same
60
+ job through a hook instead, which means it also fires on Stop (the agent
61
+ finished, which is the case most people actually want) and can raise a real
62
+ desktop notification rather than only a beep. Either is fine. Neither costs
63
+ anything.
64
+
65
+ ### Where the free part stops
66
+
67
+ A bell has a ceiling, and the ceiling is how many agents you run:
68
+
69
+ - **One agent.** A bell is perfect. Pushary is overkill and we would rather you
70
+ did not buy it.
71
+ - **Two or three.** The bell rings and you cannot tell which agent. You alt-tab
72
+ looking for it.
73
+ - **Four or more.** The bell is noise, and you have left the room anyway.
74
+
75
+ Above three concurrent agents the bell says so, once a day, and then stops
76
+ talking. Set `PUSHARY_BELL_QUIET=1` if you would rather it never mentioned it.
77
+
78
+ ## Setup
79
+
80
+ Run setup:
81
+
82
+ ```bash
83
+ npx @pushary/agent-hooks@latest setup
84
+ ```
85
+
86
+ It shows a QR code and short link. Open either in the Pushary app, check that the
87
+ fingerprint matches, and approve. Setup then stores the credential and configures
88
+ the agents it detects. If this machine already has a key, setup reuses it and skips
89
+ pairing.
90
+
91
+ For CI or another non-interactive install, pass an existing key explicitly:
92
+
93
+ ```bash
94
+ npx @pushary/agent-hooks@latest setup --key pk_xxx.sk_xxx --skip-phone
95
+ ```
96
+
97
+ Verify it worked:
98
+
99
+ ```bash
100
+ npx @pushary/agent-hooks@latest doctor
101
+ ```
102
+
103
+ Setup installs this package globally with npm, at the version you ran, because the
104
+ hooks run from that install. You never install it by hand.
105
+
106
+ ## Remove it
107
+
108
+ ```bash
109
+ npx @pushary/agent-hooks@latest clean
110
+ ```
111
+
112
+ It removes the hooks, the MCP entries, the stored key and the background service.
113
+ Add `--dry-run` to see what it would remove first.
114
+
115
+ ## Supported agents
116
+
117
+ | Agent | Notify | Ask | Gate |
118
+ |-------|:------:|:---:|:----:|
119
+ | Claude Code | yes | yes | yes |
120
+ | Codex | yes | yes | yes |
121
+ | Cursor | yes | yes | yes |
122
+ | Gemini CLI | yes | yes | yes |
123
+ | Hermes | yes | yes | yes |
124
+ | VS Code | yes | yes | yes |
125
+ | OpenCode | yes | yes | yes |
126
+ | fx | yes | yes | no |
127
+
128
+ Any other MCP client can use notify and ask by pointing at the Pushary MCP endpoint directly.
129
+
130
+ ## Control an agent from your phone
131
+
132
+ The Pushary app can start an agent on a connected computer and send instructions
133
+ to a running session. It is deliberately not a remote shell: the phone submits a
134
+ task to the selected agent, and the agent still runs with its normal permissions,
135
+ hooks, and approval policy on your computer.
136
+
137
+ | Control | Claude Code | Codex | Gemini CLI | Other agents |
138
+ |---------|:-----------:|:-----:|:----------:|:------------:|
139
+ | Start a new session | yes | yes | yes | no |
140
+ | Send an instruction to a live session | yes | yes | yes | wrapper-dependent |
141
+ | Approve, deny, and answer | yes | yes | yes | yes via MCP |
142
+
143
+ Requirements and limits:
144
+
145
+ - Run setup once. It installs a per-user background service using LaunchAgent on
146
+ macOS, systemd on Linux, or Task Scheduler on Windows.
147
+ - The computer must be awake, logged in, online, and have the selected agent CLI
148
+ installed. Pushary advertises only providers it finds on that machine.
149
+ - Start and Send require Face ID, Touch ID, or the device passcode. Controls are
150
+ hidden when the machine or session has no recent live consumer.
151
+ - An instruction may remain queued on Pushary's server for up to one hour while
152
+ delivery retries. It is delivered to the agent session, never executed as a
153
+ raw terminal command.
154
+ - Agent control requires a paid plan after the trial. Current terms are on the
155
+ [pricing page](https://pushary.com/pricing).
156
+
157
+ Service lifecycle is explicit and cross-platform:
158
+
159
+ ```bash
160
+ pushary daemon status
161
+ pushary daemon install
162
+ pushary daemon stop
163
+ pushary daemon restart
164
+ pushary daemon uninstall
165
+ ```
166
+
167
+ `pushary setup` installs and verifies the service. `pushary upgrade` refreshes it,
168
+ and `pushary clean` stops and removes it.
169
+
170
+ ## Hook events, gated by version
171
+
172
+ Claude Code 2.1.239 names thirty-one hook events and the set grows release by release,
173
+ so the ones we register are gated on the version actually installed. The version is
174
+ read from disk and never by running the binary: `codex --version` once submitted the
175
+ Codex CLI to XProtect, which killed it and moved the 181 MB binary to the Trash, so
176
+ setup deleted the user's installation as a side effect of asking its version.
177
+
178
+ An unreadable version registers only the events that predate gating. Each registration
179
+ records `registered|<version>`, which is what lets an upgrade pick up newer events
180
+ without anyone re-running setup.
181
+
182
+ ## Admission rules
183
+
184
+ Publishing this package is a version bump merged to main, and a hook change is not
185
+ live until that happens, so a hook that floods on one event would otherwise need a
186
+ release to stop. `~/.pushary/admission-rules.json` can disable an `(agent, event)`
187
+ pair as data.
188
+
189
+ Deny-only by construction: a rule can silence a hook we ship, and no shape of the file
190
+ can enable one we do not. A file that cannot be read admits everything, because
191
+ failing closed would let one malformed download silence every hook on the machine.
192
+
193
+ ## Commands
194
+
195
+ <!-- Managed: every command below is declared in src/cli/commands.ts, and a test
196
+ asserts this list matches it. Do not edit one without the other. -->
197
+
198
+ ```
199
+ cowork Set up Claude Desktop and Cowork with the Pushary connector
200
+ setup Configure Claude Code, Codex, Gemini CLI, Hermes, Cursor, VS Code, OpenCode, or fx with Pushary
201
+ claude Run Claude Code through Pushary, reachable from your phone even when idle
202
+ daemon Keep this machine reachable so your phone can START a new session
203
+ status One screen: which key is in force, whether the server accepts it, what can receive an approval
204
+ login Sign in from this terminal, no key to copy (--with-token to pipe one in)
205
+ logout Remove the key this machine stores, and say what it does not remove
206
+ connect Connect a phone without re-running setup (--app for the Pushary app)
207
+ bell Free local bell when an agent finishes or needs you. No account, no key, no network
208
+ doctor Verify your Pushary installation is working
209
+ disconnect Turn off one agent (claude|codex|gemini|cursor)
210
+ clean Remove Pushary from this machine (--everything: the Mac app's setup too, --dry-run: preview)
211
+ mode Choose where approval requests appear
212
+ wait Show or set the "wait for your phone" ladder (pushary wait 45)
213
+ stats Show the approval moments your agents hit while not connected
214
+ suggestions List rules mined from your own approvals
215
+ upgrade Update the globally installed hooks to the latest version
216
+ hook Run as a PreToolUse hook (reads stdin, writes stdout)
217
+ transcripts Show or re-trust the keys this machine seals transcripts to
218
+ ```
219
+
220
+ Run `pushary <command> --help` for one command's options.
221
+
222
+ ### Non-interactive setup
223
+
224
+ `setup` asks which agents you use, so a run with no terminal on stdin needs to be
225
+ told instead. `--agents` or `--yes` does that; without either, setup takes the
226
+ defaults rather than waiting for a keypress that can never arrive.
227
+
228
+ ```bash
229
+ # Everything detected on this machine, no prompts
230
+ npx @pushary/agent-hooks@latest setup --key-stdin --yes --skip-phone < key.txt
231
+
232
+ # Named agents only
233
+ npx @pushary/agent-hooks@latest setup --agents claude_code,codex --yes --skip-phone
234
+
235
+ # Store the key and configure nothing
236
+ npx @pushary/agent-hooks@latest setup --agents none --yes
237
+
238
+ # Show what would be written, change nothing
239
+ npx @pushary/agent-hooks@latest setup --agents auto --dry-run
240
+
241
+ # One machine-readable object on stdout; every human line goes to stderr
242
+ npx @pushary/agent-hooks@latest setup --agents auto --yes --json
243
+ ```
244
+
245
+ Prefer `--key-stdin` over `--key` in CI: `--key` puts the secret in argv, where
246
+ any other user on the box can read it out of `ps`.
247
+
248
+ Exit codes: `0` done, `2` bad usage, `3` no key resolvable, `4` the server
249
+ rejected the key, `5` finished with problems (an inactive plan, or an installer
250
+ that failed), `130` cancelled with Ctrl-C.
251
+
252
+ Examples:
253
+
254
+ ```bash
255
+ npx @pushary/agent-hooks@latest mode push_only --for 30m
256
+ npx @pushary/agent-hooks@latest wait 45
257
+ npx @pushary/agent-hooks@latest clean
258
+ ```
259
+
260
+ ## Updates
261
+
262
+ From 1.5.0, Pushary updates itself. When an agent session starts, the session-start
263
+ hook checks at most once a day whether a newer version is published. If one is, it
264
+ installs that version in the background into the same global npm folder your hooks
265
+ already run from, then refreshes each agent's config the way `pushary upgrade` does.
266
+ The session does not wait for it, and the new version runs from the next hook call.
267
+
268
+ - It stays within the same major version. A new major shows in `pushary doctor`, and
269
+ you move to it with `npx @pushary/agent-hooks@latest upgrade`.
270
+ - It only updates a global npm install. A copy run through `npx`, a plugin, or the Mac
271
+ app updates by its own route.
272
+ - It never uses `sudo`. If npm cannot write to the global folder, the attempt is
273
+ recorded as failed and nothing changes.
274
+ - It does not run on Windows yet, or when `CI` is set. Linux automatic updates are paused because restarting the systemd daemon can terminate phone-started sessions. On Linux, finish running sessions before upgrading manually.
275
+ - If installation succeeds but configuration refresh fails, the next automatic check or manual upgrade retries the refresh before checking for another release.
276
+
277
+ Turn it off with either of these:
278
+
279
+ ```bash
280
+ pushary upgrade --auto=off # turn it back on with --auto=on
281
+ export PUSHARY_DISABLE_AUTOUPDATE=1 # in the environment your agents start from
282
+ ```
283
+
284
+ `pushary doctor` shows whether it is on and the result of the last check. The state is
285
+ kept in `~/.pushary/auto-update.json`, and the output of recent updates in
286
+ `~/.pushary/logs/auto-update.log`.
287
+
288
+ ## Manual MCP setup
289
+
290
+ If you only want notifications and questions (no permission gating), add Pushary to your MCP config directly:
291
+
292
+ ```json
293
+ {
294
+ "mcpServers": {
295
+ "pushary": {
296
+ "type": "http",
297
+ "url": "https://pushary.com/api/mcp/mcp",
298
+ "headers": {
299
+ "Authorization": "Bearer YOUR_API_KEY"
300
+ }
301
+ }
302
+ }
303
+ }
304
+ ```
305
+
306
+ The MCP server exposes `send_notification`, `ask_user`, `wait_for_answer`, and `cancel_question`. Full tool reference is in the [docs](https://pushary.com/docs?from=npm).
307
+
308
+ ## Security
309
+
310
+ If a policy cannot be fetched or a hook errors, the decision falls back to the agent's native permission prompt, never a silent allow. The Cursor gate is the strictest surface: it blocks matched risky commands outright when its check cannot run. Secrets in command arguments and environment are redacted before anything is sent to a phone or stored. Read-only commands can be allowlisted so trusted work never interrupts you, while writes and destructive commands still route through approval.
311
+
312
+ ## Links
313
+
314
+ - Website: [pushary.com](https://pushary.com/?from=npm)
315
+ - Docs: [pushary.com/docs](https://pushary.com/docs?from=npm)
316
+ - Sign up: [pushary.com/sign-up](https://pushary.com/sign-up?from=npm)
317
+ - Troubleshooting: [pushary.com/docs/agents/reference/troubleshooting](https://pushary.com/docs/agents/reference/troubleshooting?from=npm)
318
+ - Support and bug reports: [Discord](https://discord.gg/9v3VvUByrr) or [business@pushary.com](mailto:business@pushary.com)
319
+
320
+ ## License
321
+
322
+ MIT
323
+
324
+ ## Claude Desktop and Cowork
325
+
326
+ Run `pushary cowork` (or `npx @pushary/agent-hooks@latest cowork`) for connector setup. `pushary setup --agents cowork` opens the same setup path without storing a CLI key or writing hooks. Add the OAuth URL in Claude and sign in with the account used by your Pushary phone/Mac app.
327
+
328
+ Use `pushary cowork --instructions` for standing instructions or `pushary cowork --skill > SKILL.md` to export the bundled skill for upload. `--json` reports `manual_setup_required`; printing a link does not prove a connection. Ask a test question in Claude, answer it in Pushary, and verify Claude receives it.
329
+
330
+ This connector is cooperative. Cowork supports plugin hooks on supported versions, but this setup does not install or verify native permission hooks. Use the normal setup command for Claude Code CLI hooks.