npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-moshi-live

v0.1.1

Published

OpenCode plugin for Moshi Live Activity and notifications

Downloads

37

Readme

opencode-moshi-live

OpenCode plugin for Moshi Live Activity and notification updates.

This plugin sends OpenCode session events to the Moshi API so you can watch progress from the iPhone app.

Requires Bun at runtime. The plugin source and CLI helper both use Bun APIs.

Features

  • Tracks tool start and finish events
  • Sends permission and question prompts as approval-needed updates
  • Supports both legacy and newer OpenCode permission event variants
  • Distinguishes task completion from reply-needed states
  • Sends reasoning, step, and subtask progress as low-noise info updates
  • Skips child sessions to reduce notification spam

Install

Option 1: OpenCode plugin install

opencode plugin opencode-moshi-live --global

Then save your Moshi token:

bunx opencode-moshi-live token YOUR_TOKEN_HERE

Option 2: Setup via CLI helper

bunx opencode-moshi-live setup
bunx opencode-moshi-live token YOUR_TOKEN_HERE

Moshi Token

Get your token from the Moshi iOS app:

  1. Open Moshi
  2. Go to Settings -> Agent Hooks
  3. Copy the token

The token is stored at ~/.config/moshi/token.

Security Notes

  • The plugin stores the Moshi token locally at ~/.config/moshi/token and never writes it into project files.
  • The plugin only sends normalized event metadata to the Moshi API. It does not intentionally upload full repository contents or arbitrary file bodies.
  • Some notification messages may include short snippets such as command descriptions, file paths, reasoning summaries, or assistant reply text. Do not use this plugin if that metadata must never leave the machine.
  • Child sessions are skipped to reduce duplicate noise and accidental over-reporting.
  • Before publishing, review the exact package contents with npm pack --dry-run.

What It Sends

The plugin currently emits these user-facing event types:

  • Running Bash, Running Edit, etc.
  • Finished Bash, Finished Write, etc.
  • Permission Required
  • Question
  • Waiting for Reply
  • Thinking
  • Reasoning
  • Step Complete
  • Delegating
  • Task Complete
  • Retrying
  • Session Error

Example Notifications

  • Running Bash: prints current directory
  • Finished Bash: /Users/young/Developer/my-project
  • Permission Required: read ~/.ssh/config
  • Waiting for Reply: Should I read ~/.ssh/config?
  • Step Complete: analyzed current workspace and prepared next action
  • Task Complete: Reply ready

Behavior Notes

  • session.idle is not treated as completion if OpenCode is waiting for permission or a user reply.
  • Permission prompts are mapped from OpenCode permission events and sent as approval_required notifications.
  • The plugin handles both legacy permission.updated events and newer permission.asked / permission.replied flows.
  • Assistant messages like Should I ...? and May I ...? are treated as reply-needed states.
  • Repeated permission, question, reasoning, and subtask events are deduplicated with short TTL windows.
  • Child sessions are ignored to avoid duplicate progress noise.

Known Limitations

  • Reply-needed detection for assistant text is pattern-based, so it may not perfectly classify every prompt style.
  • The plugin intentionally sends only short summaries, so very detailed progress context is not preserved in notifications.
  • Sensitive environments should review the metadata examples in SECURITY.md before use.

Development

Local verification:

bun install
bun run typecheck
npm pack --dry-run

OpenCode can load the published package globally with:

opencode plugin opencode-moshi-live --global

Uninstall

bunx opencode-moshi-live uninstall

Publish Checklist

  1. Confirm repository, homepage, and bugs URLs in package.json
  2. Set the correct npm owner/package name
  3. Run bun install
  4. Run bun run typecheck
  5. Run npm pack --dry-run
  6. Commit and tag
  7. Publish with npm publish or bun publish

License

MIT