Initial commit: opencode config with 32 skills, 3 agents, 11 MCPs
- Cross-platform install scripts (Windows PowerShell + Unix bash) - Template-based config generation with env var support - Skills: coding-standards, frontend-patterns, backend-patterns, security-review, tdd-workflow, e2e-testing, deep-research, exa-search, content-engine, crosspost, x-api, and 20 more - Agents: explorer, reviewer, docs-researcher - MCPs: codegraph, brave-search, playwright, github, context7, exa, memory, sequential-thinking, git, filesystem
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
# Opencode Config Sync
|
||||
|
||||
Cross-machine synchronization for opencode AI configuration.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Windows (PowerShell)
|
||||
|
||||
```powershell
|
||||
git clone <your-repo-url> $env:USERPROFILE\opencode-config
|
||||
cd $env:USERPROFILE\opencode-config
|
||||
.\install.ps1
|
||||
```
|
||||
|
||||
### macOS / Linux
|
||||
|
||||
```bash
|
||||
git clone <your-repo-url> ~/.config/opencode-config
|
||||
cd ~/.config/opencode-config
|
||||
chmod +x install.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js & npm
|
||||
- Python 3 (for git MCP)
|
||||
- Git
|
||||
- opencode CLI installed
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Set these before running install, or the script will prompt you:
|
||||
|
||||
| Variable | Description | Required |
|
||||
|----------|-------------|----------|
|
||||
| `OPENCODE_API_KEY` | Your AI provider API key | Yes |
|
||||
| `BRAVE_API_KEY` | Brave Search API key | No (brave-search MCP will be disabled if not set) |
|
||||
| `PROJECTS_PATH` | Path to your projects directory | No (defaults: Windows=`D:\Projects`, Unix=`~/projects`) |
|
||||
|
||||
### Setting Env Vars (Windows)
|
||||
|
||||
```powershell
|
||||
[Environment]::SetEnvironmentVariable("OPENCODE_API_KEY", "sk-...", "User")
|
||||
[Environment]::SetEnvironmentVariable("BRAVE_API_KEY", "BSA...", "User")
|
||||
```
|
||||
|
||||
### Setting Env Vars (Unix)
|
||||
|
||||
```bash
|
||||
echo 'export OPENCODE_API_KEY=sk-...' >> ~/.bashrc
|
||||
echo 'export BRAVE_API_KEY=BSA...' >> ~/.bashrc
|
||||
```
|
||||
|
||||
## What's Synced
|
||||
|
||||
- **32 Skills** - Coding standards, frontend/backend patterns, security review, etc.
|
||||
- **3 Agents** - explorer, reviewer, docs-researcher
|
||||
- **11 MCP Servers** - codegraph, brave-search, playwright, github, etc.
|
||||
- **Model Config** - Kimi K2.6 + 7 other models via OpenAI-compatible API
|
||||
|
||||
## Updating
|
||||
|
||||
```bash
|
||||
cd ~/opencode-config
|
||||
git pull
|
||||
# Re-run install if templates changed
|
||||
./install.ps1 # or ./install.sh
|
||||
```
|
||||
|
||||
## Security Notes
|
||||
|
||||
- API keys are **never** committed to git
|
||||
- `opencode.json` is generated locally from template
|
||||
- Use a **private** GitHub repository
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**MCP not loading?**
|
||||
- Restart opencode after install
|
||||
- Check `opencode.json` syntax with `python -m json.tool ~/.config/opencode/opencode.json`
|
||||
|
||||
**CodeGraph not working?**
|
||||
- Run `npm install -g @colbymchenry/codegraph` on new machine
|
||||
- Run `codegraph init` in your project directory
|
||||
|
||||
**Git MCP fails?**
|
||||
- Install Python package: `pip install mcp-server-git`
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
opencode-config/
|
||||
├── opencode.json.template # Config template with placeholders
|
||||
├── agents/ # Agent definitions
|
||||
│ ├── explorer.md
|
||||
│ ├── reviewer.md
|
||||
│ └── docs-researcher.md
|
||||
├── skills/ # 32 reusable skills
|
||||
│ ├── coding-standards/
|
||||
│ ├── frontend-patterns/
|
||||
│ └── ...
|
||||
├── install.ps1 # Windows installer
|
||||
├── install.sh # macOS/Linux installer
|
||||
└── README.md
|
||||
```
|
||||
Reference in New Issue
Block a user