opencode config
* fix(memory): check index.json not .rag dir in setup step 5 * docs(readme): align to real state after memory PRs * chore(env): remove dead vars from env example * docs(handoff): add handoff + ADR-037 for memory setup step5 fix * docs(handoff): set PR number --------- Co-authored-by: opencode-agent <agent@opencode.local> |
||
|---|---|---|
| .github | ||
| .opencode | ||
| app_data | ||
| docs | ||
| src/memory | ||
| tests | ||
| .editorconfig | ||
| .env.example | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
opencode-config
Docker-based AI coding assistant with persistent memory — opencode configuration.
Quick start
Docker
git clone https://github.com/slaid098/opencode-config.git
cd opencode-config
cp .env.example .env # fill in your keys
docker compose up -d
Access at http://localhost:4096.
Bare (without Docker)
git clone https://github.com/slaid098/opencode-config.git
cd opencode-config
opencode # .opencode/ auto-discovered
Structure
AGENTS.md— global orchestrator rules (main agent = plan only, all via subagents).opencode/— project-local config (auto-discovered, zero env var)agents/— subagent definitions (docs-reviewer, memory-syncer, reviewer)commands/— slash commands (run-pipeline, spec, configure-opencode)skills/— skill definitions (14 skills)tools/— custom tools (commit, create-issue, create-pr, memory-setup, merge-pr, pipeline-status, post-docs-review, post-review, spec-status, tunnel)scripts/— Python scripts (pipeline-status, spec-status, check-adr-refs, etc.)opencode.json— main config (providers, MCP servers, permissions)
app_data/workspaces/— agent working directoryapp_data/ssh/— SSH keys (not in git)src/— Python RAG CLI (memory)docs/— handoffs, decisions (ADRs), project map.github/workflows/— CI workflows (ubuntu-latest)
Configuration
Copy .env.example to .env and fill in:
| Variable | Description |
|---|---|
AI_PROVIDER_BASE_URL |
AI provider API URL |
AI_PROVIDER_API_KEY |
AI provider API key |
OPENAI_BASE_URL |
Embeddings API URL (OpenRouter default) |
OPENAI_API_KEY |
Embeddings API key (OpenRouter) |
OPENAI_EMBEDDING_MODEL |
Embedding model (default: qwen/qwen3-embedding-8b) |
OPENAI_EMBEDDING_BATCH_SIZE |
Embedding batch size (default: 50) |
OPENCODE_SERVER_PASSWORD |
opencode server password |
GITHUB_TOKEN |
GitHub personal access token |
CONTEXT7_API_KEY |
Context7 MCP API key |
OPENCODE_MEMORY_REMOTE |
Git remote for your opencode-memory fork (required) |
MEMORY_CHUNK_SIZE |
Memory index chunk size (default: 512) |
MEMORY_CHUNK_OVERLAP |
Memory index chunk overlap (default: 64) |
ANTIDETECT_BROWSER_MCP_URL |
Antidetect browser MCP URL (optional) |
Memory setup
Memory uses @mathew-cf/opencode-memory plugin (hybrid search: ripgrep + cloud embeddings (OpenRouter Qwen3 8B)).
OPENCODE_MEMORY_DIRenv var points to memory directory (default:/root/.local/share/opencode/opencode-memory)OPENCODE_MEMORY_REMOTEmust point at your git remote — fork the upstreamslaid098/opencode-memoryrepo and set the URL in.env- Run
.opencode/scripts/setup-memory.shto initialize memory repo
License
MIT — see LICENSE