From 8079ccc8568a5f1063185560e708d2b60ffc008b Mon Sep 17 00:00:00 2001 From: voson Date: Sat, 10 Jan 2026 02:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 126 ------------------------------------------------------ 1 file changed, 126 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 30a8d21..0000000 --- a/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# OpenCode Configuration - -This repository contains custom OpenCode configuration including commands, skills, and MCP services. - -## Structure - -``` -. -├── opencode.json # MCP services configuration -├── command/ # Custom commands -│ ├── auto-commit.md -│ ├── commit-push.md -│ ├── create-gitea-repo.md -│ ├── release-android.md -│ ├── review.md -│ ├── sync-oc-pull.md -│ └── sync-oc-push.md -└── skill/ # Agent skills - ├── android-developer/ - ├── electron-developer/ - ├── go-developer/ - └── ios-developer/ -``` - -## Setup - -### 1. Clone Configuration - -```bash -git clone https://git.digitevents.com/ai/opencode.git ~/.opencode -``` - -### 2. Configure Environment Variables - -Create `env.sh` file (not tracked in git) or use the one from iCloud: - -```bash -# Option 1: Create manually -cat > ~/.opencode/env.sh << 'EOF' -# OpenCode Environment Variables -export REF_API_KEY="your-ref-api-key" -export FIGMA_API_KEY="your-figma-api-key" -export GITEA_API_TOKEN="your-gitea-token" -EOF - -# Option 2: Use iCloud (macOS only) -# File location: ~/Library/Mobile Documents/com~apple~CloudDocs/opencode-env.sh -``` - -### 3. Load Environment Variables - -Add to your `~/.zshrc` or `~/.bashrc`: - -```bash -# Load from iCloud (macOS) -[[ -f ~/Library/Mobile\ Documents/com~apple~CloudDocs/opencode-env.sh ]] && \ - source ~/Library/Mobile\ Documents/com~apple~CloudDocs/opencode-env.sh - -# Or load from local file -[[ -f ~/.opencode/env.sh ]] && source ~/.opencode/env.sh -``` - -Then reload your shell: -```bash -source ~/.zshrc -``` - -## Usage - -### Commands - -Run custom commands in OpenCode TUI: - -- `/auto-commit` - Auto-generate commit and create tag -- `/commit-push` - Commit, tag and push to remote -- `/create-gitea-repo` - Create repository on Gitea -- `/release-android` - Build and release Android APK to Gitea -- `/sync-oc-pull` - Pull OpenCode config changes -- `/sync-oc-push` - Push OpenCode config changes -- `/review` - Review code or documentation - -### Skills - -Skills are automatically loaded by agents when needed: - -- `android-developer` - Android development with Kotlin/Compose -- `electron-developer` - Electron desktop app development -- `ios-developer` - iOS development with Swift/SwiftUI -- `go-developer` - Go backend development - -### MCP Services - -Configure MCP services in `opencode.json`: - -- `ref` - Ref.tools API (requires `REF_API_KEY`) -- `figma` - Figma Developer MCP (requires `FIGMA_API_KEY`) - -## Sync Across Devices - -### Push Changes - -```bash -cd ~/.opencode -git add . -git commit -m "chore: update config" -git push -``` - -### Pull Changes - -```bash -cd ~/.opencode -git pull -``` - -Or use the built-in commands: -- `/sync-oc-push` - Push changes -- `/sync-oc-pull` - Pull changes - -## Security - -**Important**: Never commit sensitive information like API keys to git. - -- `env.sh` is ignored by git -- Store credentials in iCloud or use a secure password manager -- Use environment variables instead of hardcoding secrets