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

@sketchi-app/opencode-excalidraw

v0.0.9

Published

OpenCode plugin for generating and manipulating Excalidraw diagrams via Sketchi

Downloads

1,789

Readme

@sketchi-app/opencode-excalidraw

OpenCode plugin for generating and manipulating Excalidraw diagrams via Sketchi.

Quickstart

  1. Add the plugin to your opencode.jsonc:
{
  "plugin": ["@sketchi-app/opencode-excalidraw"]
}
  1. Install the package:
npm i @sketchi-app/opencode-excalidraw
  1. Install Playwright browsers once per machine (required for diagram_to_png):
npx playwright install chromium

If browsers are missing, PNG-related tools fail fast with this install command. They do not auto-install browser binaries during execution.

Usage

The plugin exposes tools:

  • diagram_from_prompt
  • diagram_tweak
  • diagram_restructure
  • diagram_to_png
  • diagram_grade

diagram_grade is intentionally one-image-per-call. For multiple diagrams, invoke diagram_grade in separate follow-up messages.

When this plugin is loaded, it registers a sketchi-diagram subagent (without disabling built-in build/plan) and conditionally injects routing guidance only when the user request mentions diagram, sketchi, or excalidraw, so diagram requests route to diagram_* tools instead of defaulting to Mermaid (unless Mermaid is explicitly requested).

Configuration

Optional env override:

  • SKETCHI_API_URL (defaults to https://www.sketchi.app)
  • SKETCHI_ALLOW_UNSAFE_OUTPUT_PATH=1 to opt out of default output-path containment (power users only)

Authentication is required for diagram APIs. In OpenCode, select auth provider sketchi:

  • Sign in with Sketchi (device flow)
  • Open the verification URL, sign in, and approve the displayed device code

Optional env-based auth fallback (used when OpenCode auth is not configured):

  • SKETCHI_ACCESS_TOKEN or SKETCHI_BEARER_TOKEN (OAuth bearer token)

Output Paths

PNG outputs are session-scoped by default:

  • root: /.sketchi/sessions/<opencode-session-id>/png/
  • auto-generated files (diagram_from_prompt, diagram_tweak, diagram_restructure, diagram_to_png, diagram_grade) are written under this root
  • tool-provided outputPath values are constrained to this root by default

Examples:

  • outputPath: "foo.png" -> /.sketchi/sessions/<sessionID>/png/foo.png
  • outputPath: "exports/foo.png" -> /.sketchi/sessions/<sessionID>/png/exports/foo.png

Traversal attempts and absolute paths outside the session root are rejected unless SKETCHI_ALLOW_UNSAFE_OUTPUT_PATH=1 is set.

Testing

  • Fast package tests: bun run test
  • Optional live integration scenario (calls Sketchi API and renders PNG): bun run test:integration

Release Channels

Plugin publishing uses two channels:

  • next: published for plugin iterations on main when a formal release was not created.
  • latest: published only when release-please creates an actual release (after merging the release PR).

Practical flow:

  1. Keep the release PR open while validating behavior via real OpenCode install/upgrade cycles.
  2. Consume next builds for validation.
  3. Merge the release PR when ready to promote that version to latest.

Links

  • npm: https://www.npmjs.com/package/@sketchi-app/opencode-excalidraw
  • GitHub: https://github.com/shpitdev/sketchi/tree/main/packages/opencode-excalidraw