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-git-graph

v1.1.1

Published

OpenCode TUI plugin that renders a graphical git commit graph in the sidebar

Readme

opencode-git-graph

Colour-coded git commit graph for the OpenCode TUI.

Opens a dialog with a vertical git-log lane graph, commit list, and a right-hand detail pane. Works as a TUI plugin for OpenCode.

Git Graph screenshot


What you get

  • Lane graph with branch colours; current branch lane uses the theme primary colour
  • Stable lanes - column order and colours persist across branch switches (first-seen order per repo, not "current branch first")
  • HEAD marker - the current commit shows ◉ in the graph and → short-sha in the list; detached HEAD shows HEAD → sha in the header and a detached@sha lane
  • Collapsed refs - branches that share the same history draw one lane; the tip shows ×N and the legend/detail show name +N
  • Worktree badges - lanes checked out in a worktree show ⌂ on the tip, colour-coded per worktree (primary for the current worktree); detached worktrees badge the lane that contains their HEAD sha
  • Merge visibility - ⑂ badge, horizontal bridge in the graph; detail pane lists first: / merged: parents and the merge-base
  • Click a commit → message, parents, merge-base, author/date on the right (graph stays left)
  • Legend toggle - press w or click the branches / worktrees tabs in the bottom panel
  • ↗ open unified diff in your IDE / default diff viewer
  • Scroll arrows (▲/▼) for the commit list and message; wheel over the detail pane scrolls the message; ⇧↑/⇧↓ also scroll it
  • Auto-refresh on session/file/git events plus a periodic fallback
  • Sidebar footer shows path:branch and the OpenCode version (alongside the built-in footer content)
  • A ⑂ Git Graph shortcut sits below the prompt text box, so it stays visible even when the sidebar is hidden

Install (any PC with OpenCode)

CLI (recommended)

opencode plugin -g opencode-git-graph

Then restart OpenCode. (-g writes global config; omit for project-local .opencode/tui.json.)

Config file

Add the plugin to ~/.config/opencode/tui.json (Windows: C:\Users\<user>\.config\opencode\tui.json):

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["opencode-git-graph"]
}

Restart OpenCode after editing. The package is downloaded into OpenCode's plugin cache on startup.

Open the graph

  • Command palette: git-graph.open or slash command /gitgraph
  • Or click ⑂ Git Graph below the prompt text box

If you previously installed the local file plugin (./plugins/git-graph.tsx), remove that entry when adding the npm package - both use id git-graph and the second is rejected as a duplicate.


Configuration (environment variables)

| Variable | Default | Description | | --- | --- | --- | | OPENCODE_GIT_GRAPH_COMMITS | 10 | Commits shown per branch | | OPENCODE_GIT_GRAPH_BRANCHES | 8 | Branches shown (most recently committed first) | | OPENCODE_GIT_GRAPH_REFRESH_MS | 3000 | Periodic refresh interval |


Requirements

  • OpenCode >= 1.14.50
  • git available on PATH

License

MIT © 2026 Sahil Yousaf

See LICENSE.