mirror of
https://github.com/awesome-opencode/awesome-opencode.git
synced 2026-04-28 20:39:28 +00:00
refactor(examples): move example files to data/examples
Relocates all example YAML files from the `examples/` directory to `data/examples/`. Updates `docs/schema-design.md` to reflect the new path for example files.
This commit is contained in:
parent
a806755d0f
commit
050d3b4889
8 changed files with 13 additions and 13 deletions
81
data/examples/plugin.yaml
Normal file
81
data/examples/plugin.yaml
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# Example Plugin Entry
|
||||
# Plugins are JS/TS modules that extend OpenCode's core functionality.
|
||||
# Place actual entries in: data/plugins/your-plugin-name.yaml
|
||||
|
||||
# ============================================================================
|
||||
# REQUIRED FIELDS
|
||||
# ============================================================================
|
||||
|
||||
name: Example Plugin
|
||||
repo: https://github.com/example/opencode-example-plugin
|
||||
tagline: A brief description of what this plugin does (max 120 chars)
|
||||
description: |
|
||||
A longer description explaining the plugin in detail.
|
||||
Can be multiple lines and include:
|
||||
- Feature highlights
|
||||
- Use cases
|
||||
- Key benefits
|
||||
|
||||
# ============================================================================
|
||||
# OPTIONAL FIELDS
|
||||
# ============================================================================
|
||||
|
||||
# Scope defines where the extension can be installed (defaults to [global])
|
||||
# Most plugins work in both locations - omit or specify only what's relevant
|
||||
scope:
|
||||
- global # ~/.config/opencode/plugin/
|
||||
- project # .opencode/plugin/
|
||||
|
||||
# Tags for filtering and discoverability
|
||||
tags:
|
||||
- productivity
|
||||
- ai
|
||||
- authentication
|
||||
|
||||
# Minimum OpenCode version required (semver format)
|
||||
min_version: "1.0.0"
|
||||
|
||||
# Documentation URL if different from repository
|
||||
homepage: https://example.com/docs/opencode-plugin
|
||||
|
||||
# Detailed installation instructions (markdown format)
|
||||
# Include sections relevant to your plugin
|
||||
installation: |
|
||||
## Prerequisites
|
||||
- OpenCode 1.0.0 or later
|
||||
- Node.js 18+ (for local development)
|
||||
|
||||
## Installation
|
||||
|
||||
### Global (all projects)
|
||||
```bash
|
||||
# Clone to global plugins directory
|
||||
git clone https://github.com/example/opencode-example-plugin ~/.config/opencode/plugin/example-plugin
|
||||
```
|
||||
|
||||
### Project-only
|
||||
```bash
|
||||
# Clone to project plugins directory
|
||||
git clone https://github.com/example/opencode-example-plugin .opencode/plugin/example-plugin
|
||||
```
|
||||
|
||||
## Configuration
|
||||
Add to your `opencode.json`:
|
||||
```json
|
||||
{
|
||||
"plugins": {
|
||||
"example-plugin": {
|
||||
"enabled": true,
|
||||
"option1": "value"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Files Modified
|
||||
- `~/.config/opencode/opencode.json` (config entry)
|
||||
- `~/.config/opencode/plugin/example-plugin/` (plugin files)
|
||||
|
||||
## Removal
|
||||
1. Remove the plugin directory
|
||||
2. Remove the config entry from `opencode.json`
|
||||
Loading…
Add table
Add a link
Reference in a new issue