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

@pnz1990/open-krode

v0.2.0

Published

OpenCode plugin for kro RGD visualization and live instance observability

Readme

open-krode

open-krode logo

An OpenCode plugin that adds a specialized krode agent for exploring and troubleshooting kro ResourceGraphDefinitions (RGDs) and their live instances — directly in your browser.

What it does

  • DAG visualization — renders the full resource dependency graph for any RGD: nodes, edges, CEL expressions, includeWhen conditions, forEach fan-outs, specPatch state nodes. Click any node or edge to inspect its CEL and concept explanation.
  • Live observability — watches a live CR instance with 5-second auto-refresh: spec/status diff, Kubernetes events, readiness conditions, live YAML.
  • Deep instance graph — recursively expands sub-RGDs, forEach instances, and all child resources up to 4 levels deep. Click any node to see its live YAML.

Installation

From npm (recommended)

Add to ~/.config/opencode/opencode.json:

{
  "plugin": ["open-krode"]
}

OpenCode will install it automatically via Bun on next startup. No separate npm install needed.

From local path (development)

{
  "plugin": ["/path/to/open-krode"]
}

Requirements

  • OpenCode with plugin support
  • kubectl configured with access to a cluster running kro
  • A browser (opens automatically)

Usage

Select the krode agent in OpenCode, then ask things like:

  • "Show me the my-app-graph RGD"
  • "What instances of my-app-graph exist in namespace prod?"
  • "Why isn't the database resource being created?"
  • "Explain the specPatch nodes in my-app-graph"
  • "Open a deep view for instance my-app in namespace default"

Tools

| Tool | Description | |---|---| | open_krode_session | Opens the browser UI and lists all RGDs from the cluster | | show_rgd_graph | Renders the DAG for an RGD in the browser | | list_rgd_instances | Lists all live CR instances of an RGD | | show_instance | Opens a live view with 5s auto-refresh for a CR instance | | show_deep_instance | Opens the full multi-level instance graph | | show_instance_events | Shows Kubernetes events for a CR instance | | show_instance_yaml | Shows raw YAML for a CR instance | | close_krode_session | Closes the browser and stops all watchers |

Architecture

src/
├── index.ts              # Plugin entry point — registers tools + krode agent config
├── agent/
│   └── prompt.ts         # System prompt for the krode agent
├── kro/
│   ├── types.ts          # RGD/instance/graph TypeScript types
│   ├── kubectl.ts        # kubectl wrappers: listRGDs, getInstance, buildRGDGraph, etc.
│   └── index.ts
├── session/
│   ├── types.ts          # KrodeSession, View, ViewMode, cache types
│   ├── manager.ts        # SessionManager: create/end sessions, views, watchers
│   ├── server.ts         # Bun HTTP+WebSocket server (one per session, random port)
│   ├── browser.ts        # Cross-platform browser opener
│   └── index.ts
├── tools/
│   └── index.ts          # MCP tool definitions
└── ui/
    └── bundle.ts         # Self-contained HTML/CSS/JS UI (no external dependencies)

Tech stack

  • Runtime: Bun (HTTP + WebSocket server)
  • Language: TypeScript 5 (strict)
  • Plugin SDK: @opencode-ai/plugin
  • UI: Vanilla HTML/CSS/JS with inline SVG DAG renderer — no external dependencies, no build step for the UI
  • k8s access: kubectl CLI — runs from your local kubeconfig, no in-cluster SDK

Development

bun install
bun run build           # build dist/index.js + write dist/ui.html
bun run typecheck       # type-check without emitting
bun run install:plugin  # build + copy to ~/.cache/opencode for local testing

UI changes (src/ui/bundle.ts) only need bun run build + browser refresh — no OpenCode restart required.

Logic changes (anything else in src/) require an OpenCode restart after bun run install:plugin.

License

MIT