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-trailers

v0.1.2

Published

OpenCode plugin for managing git trailers

Downloads

246

Readme

opencode-git-trailers

OpenCode plugin that automatically adds git trailers to commits made through OpenCode.

Problem

Some projects require commits created with AI assistance to include metadata denoting this fact. Git trailers provide a standardized way to add such metadata to commit messages. This plugin ensures that trailers are deterministically added to all commits made through OpenCode.

What It Does

This plugin intercepts git commit commands invoked by OpenCode and automatically appends configured trailers to the commit message. Trailers are added to the end of the commit message following the git trailer format.

Installation

npm install opencode-git-trailers

Usage

Basic Setup

Add the plugin to your OpenCode configuration:

{
  "plugins": ["opencode-git-trailers"]
}

Configuration

Configure trailers using git config with the opencode.git-trailers prefix.

Global Configuration

Configure trailers globally to apply to all repositories:

# Add the model used for the commit
git config --global opencode.git-trailers.model '{{model}}'

# Add yourself as a co-author with the AI
git config --global opencode.git-trailers.co-authored-by 'AI Assistant <[email protected]>'

# Add a signed-off-by trailer
git config --global opencode.git-trailers.signed-off-by '{{user.name}} <{{user.email}}>'

Per-Repository Configuration

Configure trailers for a specific repository by running commands within the repository directory:

# Navigate to your repository
cd /path/to/your/repo

# Add the model used for the commit (repository-specific)
git config opencode.git-trailers.model '{{model}}'

# Add a signed-off-by trailer (repository-specific)
git config opencode.git-trailers.signed-off-by '{{user.name}} <{{user.email}}>'

Per-repository configuration overrides global configuration for the same trailer key.

Result

These configuration options result in the following trailers being added to commits:

Model: claude-sonnet-4-5@20250929
Co-authored-by: AI Assistant <[email protected]>
Signed-off-by: John Doe <[email protected]>

Variable Interpolation

Trailers support variable interpolation to include contextual information such as the model used:

# Configure a trailer with model interpolation
git config opencode.git-trailers.model '{{model}}'

# Use git user information
git config opencode.git-trailers.signed-off-by '{{user.name}} <{{user.email}}>'

Available Variables

  • {{model}} - The model identifier used for the commit
  • {{provider}} - The provider name (e.g., "anthropic", "openai")
  • {{timestamp}} - ISO 8601 timestamp of the commit
  • {{session}} - OpenCode session ID
  • {{user.name}} - Git user name from git config
  • {{user.email}} - Git user email from git config

Example Commit Message

Before this plugin:

Add user authentication

This commit implements JWT-based authentication
for the API endpoints.

After this plugin (with configured trailers):

Add user authentication

This commit implements JWT-based authentication
for the API endpoints.

Model: claude-sonnet-4-5@20250929
Co-authored-by: AI Assistant <[email protected]>
Signed-off-by: John Doe <[email protected]>

Development

Prerequisites

  • Bun 1.x or later

Setup

bun install

Build

bun run build

Test

# Run tests once
bun run test

# Run tests in watch mode
bun run test:watch

# Run tests with coverage
bun run test:coverage

Lint

bun run lint

License

MIT