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.2.0

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.

Commands

| Command | Description | |---------|-------------| | opencode-link | Link all standard plugins | | opencode-link all | Link ALL plugins (standard + optional) | | opencode-link <plugin> | Link a specific plugin | | opencode-link list | List available plugins | | opencode-link status | Show current links | | opencode-link clean | Remove all symlinks | | opencode-link schema | Regenerate schema |

Options

| Flag | Description | |------|-------------| | --target-dir=<path> | Override target directory | | --singular | Use singular directory names (agent/ instead of agents/) |

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';

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

// Get all content types
const types = getContentTypes(plugins);
console.log(`Content types: ${types.join(', ')}`);

License

MIT