From 4e6b2d8a78c0d596e13f4562270d81f45bf0e574 Mon Sep 17 00:00:00 2001 From: ditus Date: Mon, 10 Nov 2025 12:53:53 +0100 Subject: [PATCH] Complete global configuration setup - Add comprehensive global setup documentation - Create ~/.config/opencode/config.json with all agents - Copy all prompt files to global location - Update README with detailed global configuration steps - Include verification instructions and structure overview --- README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4f226b0..beb5be7 100644 --- a/README.md +++ b/README.md @@ -244,35 +244,70 @@ opencode #### Step 1: Install Globally ```bash # Copy to global OpenCode config directory -mkdir -p ~/.config/opencode/agent +mkdir -p ~/.config/opencode/agent ~/.config/opencode/prompts cp /path/to/nano-opencode-agents/.opencode/agent/* ~/.config/opencode/agent/ +cp /path/to/nano-opencode-agents/prompts/* ~/.config/opencode/prompts/ ``` -#### Step 2: Create Global opencode.json +#### Step 2: Create Global config.json ```bash -# Create global config file +# Create global config file with all agents cat > ~/.config/opencode/config.json << 'EOF' { - "$schema": "https://opencode.ai/config.json", - "agent": { + "agents": { + "build": { + "type": "prompt", + "path": "prompts/build.txt" + }, "cleanup": { - "description": "Repository cleanup and maintenance", - "mode": "subagent", - "prompt": "{file:~/.config/opencode/prompts/cleanup.txt}", - "tools": { "write": true, "bash": true } + "type": "prompt", + "path": "prompts/cleanup.txt" + }, + "security": { + "type": "prompt", + "path": "prompts/security.txt" + }, + "review": { + "type": "prompt", + "path": "prompts/review.txt" + }, + "docs-writer": { + "type": "markdown", + "path": "agent/docs-writer.md" + }, + "plan": { + "type": "json", + "path": "agent/plan.json" } - // ... add other agents as needed } } EOF ``` -#### Step 3: Use in Any Project +#### Step 3: Verify Global Setup ```bash -cd /path/to/any/project +# Check global configuration +ls -la ~/.config/opencode/ +cat ~/.config/opencode/config.json + +# Test from any directory +cd /tmp opencode # Will load global agents ``` +#### Global Structure +``` +~/.config/opencode/ +├── config.json # Main configuration +├── agent/ # Markdown/JSON agents +│ └── docs-writer.md # Documentation writer +└── prompts/ # Text-based prompts + ├── build.txt # Build automation + ├── cleanup.txt # Repository cleanup + ├── review.txt # Code review + └── security.txt # Security analysis +``` + ### Method 3: Project-Specific Customization #### Step 1: Initialize Project