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

@activade/opencode-auth-sync

v0.0.2

Published

OpenCode plugin to sync auth credentials to GitHub repositories as secrets

Readme

@activade/opencode-auth-sync

OpenCode plugin that automatically syncs your authentication credentials to GitHub repositories as secrets whenever they change.

Why?

When using OpenCode with Claude Max, OpenAI, or other OAuth providers, your tokens refresh periodically. This plugin watches for those changes and automatically syncs the updated credentials to your GitHub repositories, keeping your CI/CD workflows authenticated.

Quick Start

bunx @activade/opencode-auth-sync

The interactive setup wizard will:

  1. Check prerequisites (GitHub CLI)
  2. List your repositories
  3. Let you select which repos to sync
  4. Configure the plugin automatically

Running the wizard again will merge your changes with the existing configuration, preserving any custom settings like debounceMs or credentialsPath that you've modified.

Manual Installation

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

{
  "plugin": [
    "@activade/opencode-auth-sync"
  ]
}

Create ~/.config/opencode/opencode-auth-sync.json:

{
  "$schema": "https://raw.githubusercontent.com/activadee/opencode-auth-sync/main/schema.json",
  "enabled": true,
  "repositories": [
    "your-username/repo1",
    "your-org/private-repo"
  ]
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabled | boolean | true | Enable/disable the plugin | | credentialsPath | string | ~/.local/share/opencode/auth.json | Path to OpenCode auth file | | secretName | string | OPENCODE_AUTH | GitHub secret name | | repositories | string[] | [] | Repositories to sync (owner/repo format) | | debounceMs | number | 1000 | Debounce delay for file changes | | authFileHashes | object | (auto-managed) | Per-repository SHA-256 hashes of last synced auth.json (managed by plugin) |

Prerequisites

  • GitHub CLI installed and authenticated (gh auth login)
  • Write access to target repositories

How It Works

  1. Plugin watches ~/.local/share/opencode/auth.json for changes
  2. When tokens refresh, the file updates
  3. Plugin computes a SHA-256 hash of the file content and compares it against the stored hash
  4. If the hash differs (content actually changed), syncs to configured repositories via gh secret set
  5. Toast notifications show sync status

The hash-based change detection reduces unnecessary GitHub API calls when file metadata changes but content remains the same.

Using the Secret in GitHub Actions

# .github/workflows/example.yml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Setup OpenCode Auth
        run: |
          mkdir -p ~/.local/share/opencode
          echo '${{ secrets.OPENCODE_AUTH }}' > ~/.local/share/opencode/auth.json

Extracting Specific Tokens

- name: Extract Anthropic Token
  run: |
    ANTHROPIC_TOKEN=$(echo '${{ secrets.OPENCODE_AUTH }}' | jq -r '.anthropic.access')
    echo "::add-mask::$ANTHROPIC_TOKEN"
    echo "ANTHROPIC_API_KEY=$ANTHROPIC_TOKEN" >> $GITHUB_ENV

Synced Providers

The auth file contains credentials for all configured OpenCode providers:

  • anthropic - Claude Max (OAuth)
  • openai - ChatGPT Plus/Pro (OAuth)
  • google - Gemini (OAuth)
  • API key providers

License

MIT