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

@techdivision/opencode-cli

v0.3.3

Published

CLI tools for OpenCode plugin management

Readme

@techdivision/opencode-cli

CLI tools for OpenCode plugin management.

Prerequisites

  • Node.js >= 18
  • npm >= 9

Installation

Option A: User-wide Plugins (recommended)

Install CLI globally and plugins in your user config directory:

# Install CLI globally
npm install -g github:techdivision/opencode-cli

# Install plugins in user config directory
cd ~/.config/opencode
npm install github:techdivision/opencode-plugins

# Link plugins (from user config directory)
opencode-link              # Links directly to ~/.config/opencode/commands/, etc.

# Or link in any project
cd /path/to/my-project
opencode-link              # Links to .opencode/commands/, etc.

Option B: Project-local Plugins

Install plugins locally in each project:

cd /path/to/my-project
mkdir -p .opencode && cd .opencode
npm install github:techdivision/opencode-plugins
npx opencode-link
cd ..

Option C: Global CLI + Local Plugins

Install CLI globally, plugins per project:

# Install CLI globally (once)
npm install -g github:techdivision/opencode-cli

# In each project: install plugins locally
cd /path/to/my-project/.opencode
npm install github:techdivision/opencode-plugins
cd ..

# Run from project root
opencode-link list         # Finds plugins in .opencode/node_modules/

Plugin Discovery

Plugins are discovered from two locations (priority: last wins):

| Priority | Location | Path | |----------|----------|------| | 1 (low) | User config | ~/.config/opencode/node_modules/ | | 2 (high) | Local | {project}/.opencode/node_modules/ |

Important: If a plugin exists in both locations, the local version wins.

Plugin Types

Monorepo Plugins

A monorepo contains multiple plugins in subdirectories, each with a .opencode/ folder.

Example: opencode-plugins

opencode-plugins/
├── package.json
├── core/
│   └── .opencode/
│       ├── commands/
│       ├── agents/
│       └── skills/
├── pm/
│   └── .opencode/
│       ├── commands/
│       └── agents/
└── magento/
    └── .opencode/
        └── commands/

Install: npm install github:techdivision/opencode-plugins

Singlerepo Plugins

A singlerepo is a standalone plugin with content directories in the package root.

Example: opencode-plugin-magento

opencode-plugin-magento/
├── package.json
├── plugin.json          # Plugin metadata (name, category, hooks)
├── commands/
│   ├── quality.md
│   └── deploy.md
├── agents/
│   └── magento-expert.md
└── skills/
    └── magento/
        └── ...

Install: npm install github:techdivision/opencode-plugin-magento

How Linking Works

When you run opencode-link <plugin>, the CLI:

  1. Discovers plugins from user config and local node_modules/
  2. Creates symlinks from target directory to plugin source files
  3. Runs postlink hooks if defined in plugin.json

Example: Linking in a Project

cd /path/to/my-project
opencode-link magento

Before:

my-project/
└── .opencode/
    └── node_modules/
        └── @techdivision/opencode-plugin-magento/
            └── commands/
                ├── quality.md
                └── deploy.md

After:

my-project/
└── .opencode/
    ├── commands/
    │   ├── magento.quality.md -> ../node_modules/.../commands/quality.md
    │   └── magento.deploy.md  -> ../node_modules/.../commands/deploy.md
    └── node_modules/
        └── ...

Example: Linking in User Config

cd ~/.config/opencode
opencode-link time-tracking

Result:

~/.config/opencode/
├── config.json              # OpenCode main config (not touched)
├── commands/
│   ├── time-tracking.init.md -> ./node_modules/.../commands/init.md
│   └── time-tracking.timesheet.md -> ...
├── agents/
│   └── time-tracking.md -> ./node_modules/.../agents/time-tracking.md
└── node_modules/
    └── @techdivision/opencode-plugin-time-tracking/
        └── ...

Symlink Naming Convention

| Content Type | Source File | Target Symlink | |--------------|-------------|----------------| | commands | commands/deploy.md | commands/{plugin}.deploy.md | | agents | agents/expert.md | agents/expert.md | | guidelines | guidelines/style.md | guidelines/style.md | | skills | skills/group/skill-name/ | skills/skill-name/ | | tools | tools/my-tool.ts | tools/my-tool.ts |

Note: Commands are prefixed with the plugin name to avoid conflicts between plugins.

External Skills

External skills are agent skills sourced directly from GitHub repositories, curated via skills.sh. They are downloaded and symlinked automatically — no npm install required.

Quick Start

# Search for skills
opencode-link external-skills:find react

# Add a skill to your project (updates opencode-project.json + installs immediately)
opencode-link external-skills:add vercel-labs/agent-skills vercel-react-best-practices

# Show installed external skills
opencode-link external-skills:list

How It Works

  1. Skills are configured in .opencode/opencode-project.json under externalSkills
  2. opencode-link (default run) detects the config and downloads/links them automatically
  3. Files land in .opencode/.external-skills/<skill-name>/SKILL.md (gitignored)
  4. Symlinks are created in .opencode/skills/<skill-name>/

Configuration (opencode-project.json)

{
  "externalSkills": [
    {
      "source": "vercel-labs/agent-skills",
      "skills": ["vercel-react-best-practices", "vercel-nextjs-app-router"],
      "branch": "main",
      "category": "optional"
    },
    {
      "source": "some-org/all-their-skills"
    }
  ]
}

| Field | Required | Default | Description | |-------|----------|---------|-------------| | source | yes | — | GitHub owner/repo | | skills | no | all | Skill names to install. Omit to install all skills in the repo. | | branch | no | main | Git branch to download from | | category | no | optional | standard or optional |

Security Checks

Before downloading, each skill is audited via three security partners (ATH, Socket, Snyk):

| Risk level | Behaviour | |------------|-----------| | safe / low | Installed automatically | | medium | Installed with a warning | | high | Interactive confirmation required (non-interactive: aborted) | | critical | Always skipped |

Use --force to bypass high-risk prompts or to force reinstall an up-to-date skill.

Note: Security data is fetched from add-skill.vercel.sh. If the service is unavailable, installation continues with a warning — it never blocks.

Update Detection

Skills store a SHA fingerprint (.skill-meta.json) after download. Subsequent runs skip skills whose SHA hasn't changed. Use external-skills:update to explicitly pull the latest version.

# Re-download skills where the upstream SHA changed
opencode-link external-skills:update

# Force-reinstall all skills regardless of SHA
opencode-link --force external-skills:install

GitHub Rate Limits

The GitHub API is used to fetch file SHAs. Set GITHUB_TOKEN to increase the rate limit:

export GITHUB_TOKEN=ghp_...
opencode-link external-skills:install

Commands

| Command | Description | |---------|-------------| | opencode-link | Link all standard plugins + install configured external skills | | opencode-link all | Link ALL plugins (standard + optional) | | opencode-link <plugin> | Link a specific plugin | | opencode-link list | List available plugins and configured external skills | | opencode-link status | Show current links | | opencode-link clean | Remove all symlinks and .external-skills/ directory | | opencode-link schema | Regenerate schema | | opencode-link external-skills:find <query> | Search skills.sh for skills | | opencode-link external-skills:add <owner/repo> <skill> | Add skill to config and install | | opencode-link external-skills:install | Install/update all configured external skills | | opencode-link external-skills:update | Re-download skills with upstream changes | | opencode-link external-skills:list | Show installed external skills with security status |

Options

| Flag | Description | |------|-------------| | --target-dir=<path> | Override target directory | | --singular | Use singular directory names (agent/ instead of agents/) | | --force | Force reinstall even if up to date; bypass high-risk security prompt |

Programmatic Usage

You can also use the CLI modules programmatically:

import { discoverPlugins, getContentTypes } from '@techdivision/opencode-cli/discovery';
import { createSymlink, getItemsToLink } from '@techdivision/opencode-cli/linker';
import { generateCombinedSchema } from '@techdivision/opencode-cli/schema';
import { searchSkills, fetchAuditData } from '@techdivision/opencode-cli/skills-registry';
import { installExternalSkills, listInstalledExternalSkills } from '@techdivision/opencode-cli/external-skills';

// Discover plugins
const plugins = discoverPlugins('/path/to/.opencode');
console.log(`Found ${plugins.size} plugins`);

// Search skills.sh
const results = await searchSkills('react');

// Install configured external skills
await installExternalSkills('/path/to/.opencode', { force: false });

// List installed external skills
const installed = listInstalledExternalSkills('/path/to/.opencode');

License

MIT