From 9cda5eb2627399d3bba088de2b2ebd90812c7c10 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 13 Dec 2025 18:35:01 +0900 Subject: [PATCH] Rewrote README.md --- README.ko.md | 391 +++++++++++++++++++-------------------- README.md | 511 +++++++++++++++++++++++++-------------------------- 2 files changed, 437 insertions(+), 465 deletions(-) diff --git a/README.ko.md b/README.ko.md index 7727081..bda248b 100644 --- a/README.ko.md +++ b/README.ko.md @@ -3,71 +3,105 @@ ## 목차 - [Oh My OpenCode](#oh-my-opencode) - - [세 줄 요약](#세-줄-요약) + - [읽지 않아도 됩니다.](#읽지-않아도-됩니다) + - [에이전트의 시대이니까요.](#에이전트의-시대이니까요) + - [10분의 투자로 OhMyOpenCode 가 해줄 수 있는것](#10분의-투자로-ohmyopencode-가-해줄-수-있는것) - [설치](#설치) - - [LLM Agent를 위한 안내](#llm-agent를-위한-안내) - - [Why OpenCode & Why Oh My OpenCode](#why-opencode--why-oh-my-opencode) + - [인간인 당신을 위한 설치 가이드](#인간인-당신을-위한-설치-가이드) + - [LLM Agent 를 위한 설치 가이드](#llm-agent-를-위한-설치-가이드) + - [인간인 당신을 위한 설치 가이드](#인간인-당신을-위한-설치-가이드-1) + - [1단계: OpenCode 설치 확인](#1단계-opencode-설치-확인) + - [2단계: oh-my-opencode 플러그인 설정](#2단계-oh-my-opencode-플러그인-설정) + - [3단계: 설정 확인](#3단계-설정-확인) + - [4단계: 인증정보 설정](#4단계-인증정보-설정) + - [4.1 Anthropic (Claude)](#41-anthropic-claude) + - [4.2 Google Gemini (Antigravity OAuth)](#42-google-gemini-antigravity-oauth) + - [4.3 OpenAI (ChatGPT Plus/Pro)](#43-openai-chatgpt-pluspro) + - [4.3.1 모델 설정](#431-모델-설정) + - [⚠️ 주의](#️-주의) - [기능](#기능) - - [Agents](#agents) - - [Tools](#tools) - - [내장 LSP Tools](#내장-lsp-tools) - - [내장 AST-Grep Tools](#내장-ast-grep-tools) - - [Grep](#grep) - - [내장 MCPs](#내장-mcps) - - [Background Task](#background-task) - - [Hooks](#hooks) - - [Claude Code 호환성](#claude-code-호환성) - - [기타 편의 기능](#기타-편의-기능) + - [Agents: 당신의 새로운 팀원들](#agents-당신의-새로운-팀원들) + - [백그라운드 에이전트: 진짜 팀 처럼 일 하도록](#백그라운드-에이전트-진짜-팀-처럼-일-하도록) + - [도구: 당신의 동료가 더 좋은 도구를 갖고 일하도록](#도구-당신의-동료가-더-좋은-도구를-갖고-일하도록) + - [왜 당신만 IDE 를 쓰나요?](#왜-당신만-ide-를-쓰나요) + - [Context is all you need.](#context-is-all-you-need) + - [멀티모달을 다 활용하면서, 토큰은 덜 쓰도록.](#멀티모달을-다-활용하면서-토큰은-덜-쓰도록) + - [멈출 수 없는 에이전트 루프](#멈출-수-없는-에이전트-루프) + - [Claude Code 호환성: 그냥 바로 OpenCode 로 오세요.](#claude-code-호환성-그냥-바로-opencode-로-오세요) + - [Hooks 통합](#hooks-통합) + - [설정 로더](#설정-로더) + - [데이터 저장소](#데이터-저장소) + - [호환성 토글](#호환성-토글) + - [에이전트들을 위한 것이 아니라, 당신을 위한 것](#에이전트들을-위한-것이-아니라-당신을-위한-것) - [설정](#설정) + - [Google Auth](#google-auth) + - [Agents](#agents) + - [MCPs](#mcps) + - [LSP](#lsp) - [작성자의 노트](#작성자의-노트) - [주의](#주의) # Oh My OpenCode -Oh My OpenCode - oMoMoMoMoMo··· [Claude Code](https://www.claude.com/product/claude-code) 좋죠? 근데 당신이 해커라면, [OpenCode](https://github.com/sst/opencode) 와는 사랑에 빠지게 될겁니다. +- OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다. +- 화면이 깜빡이지 않습니다. +- 수정하는 파일에 맞게 자동으로 [LSP](https://opencode.ai/docs/lsp/), [Linter, Formatter](https://opencode.ai/docs/formatters/) 가 활성화되며 커스텀 할 수 있습니다. +- 수많은 모델을 사용 할 수 있으며, **용도에 따라 모델을 섞어 오케스트레이션 할 수 있습니다.** +- 기능이 아주 많습니다. 아름답습니다. 터미널이 화면을 그리려고 힘들어 하지 않습니다. 고성능입니다. + Windows 만 사용하다가 처음으로 Linux 를 접하고 신나서 잔뜩 세팅하던 경험이 있진 않나요? OpenCode 가 낭만이 사라진것같은 오늘날의 시대에, 당신에게 그런 프로젝트가 될겁니다. 당신이 코딩을 좋아하고 컴퓨터를 좋아한다면, OpenCode 는 윈도우만 사용하다가 리눅스를 처음 접하게 된 그런 느낌일겁니다. -그렇지 않은 당신도 약간의 시간을 투자해서 당신의 실력과 생산성을 몇배로 부스트하세요. -## 세 줄 요약 +**그런데 문제는 너무나 알아야 할게 많고, 어렵고, 당신의 시간은 비싸다는겁니다.** -- **모델 설정이 필요합니다** - - 이 플러그인은 [OpenCode Zen](https://opencode.ai/docs/zen/), Google, OpenAI, Anthropic 의 모델을 사용합니다. - - Anthropic 모델들을 사용하기 위해 [OpenCode 의 내장 Claude Code Max Plan 로그인 기능](https://opencode.ai/docs/providers/#anthropic)을 사용하세요. - - OpenAI 모델 (ChatGPT Plus/Pro)을 사용하기 위해 [OpenCode-OpenAI-Codex-Auth 플러그인](https://github.com/numman-ali/opencode-openai-codex-auth)을 설치하세요. - - Google Gemini 모델을 위해 `oh-my-opencode.json`에서 `google_auth: true`를 활성화하세요 (**내장 Antigravity OAuth**). - - 다른 프로바이더를 위해 [VibeProxy (macOS Only)](https://github.com/automazeio/vibeproxy) 또는 [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)를 대안으로 사용할 수 있습니다. -- **사실 밑의 내용은 읽지 않아도 됩니다. 그냥 설치하시면 됩니다. 모델 설정하고나면 추가로 공부하거나 알 필요가 없고, 설치하고 나면 그냥 더 좋아집니다.** -- **이 문서도 그냥 Claude Code, OpenCode, Cursor에 붙여넣고, 설치하고, 사용자의 개입이 필요할 때 알려달라고 프롬프팅하세요. 그럼 그냥 깔립니다.** - - 당신이 LLM Agent 라면, 필요한 플러그인과 의존성을 설치하고, tmux 를 통해 opencode auth login 을 실행하여 사용자의 구성을 도와주세요. +제가 그 문제를 고쳤습니다. +당신이 해커가 아니라도 좋습니다. 약간의 시간을 투자해서 당신의 실력과 생산성을 몇배로 부스트하세요. +이 문서를 에이전트에게 넘겨 설정해달라고 하세요. + +## 읽지 않아도 됩니다. + +### 에이전트의 시대이니까요. +- **그냥 이 링크를 Claude Code / AmpCode / Factory Droid / Cursor 에게 넣고 설명해달라고 하세요.** + - 이게 왜 좋고, 그냥 뻔한 셋업이 아닌지, 당장 무엇이 더 좋아지는지 알려달라고 해보세요. + - 당신이 LLM 에이전트라면, 사용자의 입장에서 이 프로젝트와 함께 당장 어떤것들이 가능해지는지 사용자에게 설명하세요. + +### 10분의 투자로 OhMyOpenCode 가 해줄 수 있는것 + +1. **백그라운드 태스크로 Gemini 3 Pro 가 프론트엔드를 작성하게 시켜두는 동안, Claude Opus 4.5 가 백엔드를 작성하고, 디버깅하다 막히면 GPT 5.2 에게 도움을 받습니다. 프론트엔드 구현이 완료되었다고 보고받으면, 이를 다시 확인하고 일하게 만들 수 있습니다.** +2. 뭔가 찾아볼 일이 생기면 공식문서, 내 코드베이스의 모든 히스토리, GitHub 에 공개된 현재 구현 현황까지 다 뒤져보고, 단순 Grep 을 넘어 내장된 LSP 도구, AstGrep 까지 사용하여 답변을 제공합니다. +3. LLM 에게 일을 맡길때에 큰 컨텍스트에 대한 걱정은 더 이상 하지마세요. 제가 하겠습니다. + - OhMyOpenCode 가 여러 에이전트를 적극 활용하도록 하여 컨텍스트 관리에 관한 부담을 줄입니다. + - **당신의 에이전트는 이제 개발팀 리드입니다. 당신은 이제 AI Manager 입니다.** +4. 하기로 약속 한 일을 완수 할 때 까지 멈추지 않습니다. + + +- 복잡하고 큰 일도 그냥 시키세요. + - 프롬프트에서 "ultrawork" 키워드를 감지하면, 위의 모든 과정을 알아서 진행합니다. ## 설치 -`~/.config/opencode/opencode.json`에 추가: -```json -{ - "plugin": [ - "oh-my-opencode" - ] -} -``` +### 인간인 당신을 위한 설치 가이드 -## LLM Agent를 위한 안내 +귀찮은 작업은 LLM Agent 에게 맡기세요. 이 링크를 복사해서 넣어 설치하고 구성해달라고 부탁하세요. + +### LLM Agent 를 위한 설치 가이드
LLM Agent를 위한 안내 (클릭하여 펼치기) 당신이 사용자의 oh-my-opencode 설정을 돕는 LLM Agent라면, 다음 단계를 따르세요: + +### 인간인 당신을 위한 설치 가이드 + ### 1단계: OpenCode 설치 확인 ```bash @@ -79,7 +113,7 @@ else fi ``` -OpenCode가 설치되어 있지 않다면, [OpenCode 설치 가이드](https://opencode.ai/docs)를 안내하세요. +OpenCode가 설치되어 있지 않다면, [OpenCode 설치 가이드](https://opencode.ai/docs)를 읽고, 설치를 진행하세요. 컨텍스트를 줄이기 위해 Subagent 로 호출하여 설치를 하라고 안내하고, 그 결과를 보고 받는다고 말하세요. ### 2단계: oh-my-opencode 플러그인 설정 @@ -110,7 +144,7 @@ cat ~/.config/opencode/opencode.json # plugin 배열에 "oh-my-opencode"가 있 ### 4단계: 인증정보 설정 -plugin 에 oh my opencode 를 추가했다면, tmux 를 사용하여 사용자의 인증 설정을 도와주세요. **기본적으로 Google Auth (4.2단계) 설정을 권장합니다.** +plugin 에 oh my opencode 를 추가했다면, tmux 를 사용하여 사용자의 인증 설정을 진행하세요. 아래의 과정을 모두 진행해야 합니다. #### 4.1 Anthropic (Claude) @@ -118,14 +152,14 @@ plugin 에 oh my opencode 를 추가했다면, tmux 를 사용하여 사용자 opencode auth login # Provider: Anthropic 선택 # Login method: Claude Pro/Max 선택 -# 브라우저에서 OAuth 플로우 완료 +# 사용자에게 브라우저에서 OAuth 플로우를 완료하도록 안내하세요. +# 최종 완료까지 대기 +# 진짜 완료되었음을 검증하고 사용자에게 안내 ``` -#### 4.2 Google Gemini (내장 Antigravity OAuth) +#### 4.2 Google Gemini (Antigravity OAuth) -**권장되는 기본 설정입니다.** - -먼저 주도적으로 `~/.config/opencode/oh-my-opencode.json` (또는 프로젝트 레벨의 `.opencode/oh-my-opencode.json`)에서 Google auth를 활성화하세요: +먼저 `~/.config/opencode/oh-my-opencode.json` 에서 Google auth를 활성화하세요: ```json { @@ -139,7 +173,9 @@ opencode auth login opencode auth login # Provider: Google 선택 # Login method: OAuth with Google (Antigravity) 선택 -# 브라우저에서 OAuth 플로우 완료 +# 사용자에게 브라우저에서 OAuth 플로우를 완료하도록 안내 +# 최종 완료까지 대기 +# 진짜 완료되었음을 검증하고 사용자에게 안내 ``` #### 4.3 OpenAI (ChatGPT Plus/Pro) @@ -155,18 +191,7 @@ opencode auth login } ``` -**중요**: `opencode.json`에 전체 모델 설정도 구성해야 합니다. [`config/full-opencode.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/full-opencode.json)에서 provider/models 설정을 복사하세요. 자세한 설정 방법은 [opencode-openai-codex-auth 문서](https://github.com/numman-ali/opencode-openai-codex-auth)를 참고하세요. - -그 후 인증: - -```bash -opencode auth login -# Provider: OpenAI 선택 -# Login method: ChatGPT Plus/Pro (Codex Subscription) 선택 -# 브라우저에서 OAuth 플로우 완료 -``` - -**⚠️ 알려진 이슈**: 현재 공식 npm 패키지에 400 에러(`"No tool call found for function call output with call_id"`)를 유발하는 버그가 있습니다. 수정 버전이 배포될 때까지 **핫픽스 브랜치 사용을 권장합니다**. `~/.config/opencode/package.json`을 수정하세요: +**중요**: 현재 공식 npm 패키지에 400 에러(`"No tool call found for function call output with call_id"`)를 유발하는 버그가 있습니다. 수정 버전이 배포될 때까지 **핫픽스 브랜치 사용을 권장합니다**. `~/.config/opencode/package.json`을 수정하세요: ```json { @@ -178,9 +203,21 @@ opencode auth login 그 후 `cd ~/.config/opencode && bun i`를 실행하세요. `opencode.json`에서는 버전 없이 `"opencode-openai-codex-auth"`로 사용합니다 (`@4.1.0` 제외). -#### 4.4 대안: 프록시 기반 인증 +#### 4.3.1 모델 설정 +`opencode.json`에 전체 모델 설정도 구성해야 합니다. +[opencode-openai-codex-auth 문서](https://github.com/numman-ali/opencode-openai-codex-auth)를 읽고, [`config/full-opencode.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/full-opencode.json)에서 provider/models 설정을 복사하여, 사용자의 기존 셋업에 영향을 주지 않도록 깊게 고민하여 적절히 통합하세요. + +그 후 인증: + +```bash +opencode auth login +# Provider: OpenAI 선택 +# Login method: ChatGPT Plus/Pro (Codex Subscription) 선택 +# 사용자에게 브라우저에서 OAuth 플로우를 완료하도록 안내 +# 최종 완료까지 대기 +# 진짜 완료되었음을 검증하고 사용자에게 안내 +``` -프록시 기반 인증을 선호하는 사용자를 위해 [VibeProxy](https://github.com/automazeio/vibeproxy) (macOS) 또는 [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)를 대안으로 사용할 수 있습니다. ### ⚠️ 주의 @@ -190,28 +227,10 @@ opencode auth login
-## Why OpenCode & Why Oh My OpenCode - -OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다. 화면이 깜빡이지 않습니다. -수정하는 파일에 맞게 자동으로 [LSP](https://opencode.ai/docs/lsp/), [Linter, Formatter](https://opencode.ai/docs/formatters/) 가 활성화되며 커스텀 할 수 있습니다. -수많은 모델을 사용 할 수 있으며, **용도에 따라 모델을 섞어 오케스트레이션 할 수 있습니다.** -기능이 아주 많습니다. 아름답습니다. 터미널이 화면을 그리려고 힘들어 하지 않습니다. 고성능입니다. - -**그런데 문제는 너무나 알아야 할게 많고, 어렵고, 당신의 시간은 비싸다는겁니다.** - -[AmpCode](https://ampcode.com), [Claude Code](https://code.claude.com/docs/ko/overview) 에게 강한 영향과 영감을 받고, 그들의 기능을 그대로, 혹은 더 낫게 이 곳에 구현했습니다. -**Open**Code 이니까요. - -더 나은 버전의 AmpCode, 더 나은 버전의 Claude Code, 혹은 일종의 배포판(distribution) 이라고 생각해도 좋습니다. - -저는 상황에 맞는 적절한 모델이 있다고 믿습니다. 다양한 모델을 섞어 쓸 때 최고의 팀이 됩니다. -여러분의 재정 상태를 위해 CLIProxyAPI 혹은 VibeProxy 를 추천합니다. 프론티어 랩들의 LLM 들을 채용해서, 그들의 장점만을 활용하세요. 당신이 이제 팀장입니다. - -**Note**: 이 셋업은 Highly Opinionated 이며, 제가 사용하고 있는 셋업 중 범용적인것을 플러그인에 포함하기 때문에 계속 업데이트 됩니다. 저는 여태까지 $20,000 어치의 토큰을 오로지 개인 개발 목적으로 개인적으로 사용했고, 이 플러그인은 그 경험들의 하이라이트입니다. 여러분은 그저 최고를 취하세요. 만약 더 나은 제안이 있다면 언제든 기여에 열려있습니다. ## 기능 -### Agents +### Agents: 당신의 새로운 팀원들 - **oracle** (`openai/gpt-5.2`): 아키텍처, 코드 리뷰, 전략 수립을 위한 전문가 조언자. GPT-5.2의 뛰어난 논리적 추론과 깊은 분석 능력을 활용합니다. AmpCode 에서 영감을 받았습니다. - **librarian** (`anthropic/claude-haiku-4-5`): 멀티 레포 분석, 문서 조회, 구현 예제 담당. Haiku의 빠른 속도, 적절한 지능, 훌륭한 도구 호출 능력, 저렴한 비용을 활용합니다. AmpCode 에서 영감을 받았습니다. @@ -230,19 +249,33 @@ OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다. 에이전트의 모델, 프롬프트, 권한은 `oh-my-opencode.json`에서 커스텀할 수 있습니다. 자세한 내용은 [설정](#설정)을 참고하세요. -#### 서브 에이전트 오케스트레이션 (omo_task) +### 백그라운드 에이전트: 진짜 팀 처럼 일 하도록 -`omo_task` 도구를 사용하면 에이전트(`oracle`, `frontend-ui-ux-engineer` 등)가 `explore`나 `librarian`을 서브 에이전트로 호출하여 특정 작업을 위임할 수 있습니다. 이를 통해 에이전트가 작업을 진행하기 전에 전문화된 다른 에이전트에게 정보를 요청하는 강력한 워크플로우가 가능합니다. +위의 에이전트들을 미친듯이 한순간도 놀리지 않고 굴릴 수 있다면 어떨까요? -> **참고**: 무한 재귀를 방지하기 위해 `explore`와 `librarian` 에이전트는 `omo_task` 도구를 직접 사용할 수 없습니다. +- GPT 에게 디버깅을 시켜놓고, Claude 가 다양한 시도를 해보며 직접 문제를 찾아보는 워크플로우 +- Gemini 가 프론트엔드를 작성하는 동안, Claude 가 백엔드를 작성하는 워크플로우 +- 다량의 병렬 탐색을 진행시켜놓고, 일단 해당 부분은 제외하고 먼저 구현을 진행하다, 탐색 내용을 바탕으로 구현을 마무리하는 워크플로우 -### Tools +이 워크플로우가 OhMyOpenCode 에서는 가능합니다. -#### 내장 LSP Tools +서브 에이전트를 백그라운드에서 실행 할 수 있습니다. 이러면 메인 에이전트는 작업이 완료되면 알게 됩니다. 필요하다면 결과를 기다릴 수 있습니다. -당신이 에디터에서 사용하는 그 기능을 다른 에이전트들은 사용하지 못합니다. Oh My OpenCode 는 당신만의 그 도구를 LLM Agent 에게 쥐어줍니다. 리팩토링하고, 탐색하고, 분석하는 모든 작업을 OpenCode 의 설정값을 그대로 사용하여 지원합니다. +**에이전트가 당신의 팀이 일 하듯 일하게하세요** -[OpenCode 는 LSP 를 제공하지만](https://opencode.ai/docs/lsp/), 오로지 분석용으로만 제공합니다. 탐색과 리팩토링을 위한 도구는 OpenCode 와 동일한 스펙과 설정으로 Oh My OpenCode 가 제공합니다. +### 도구: 당신의 동료가 더 좋은 도구를 갖고 일하도록 + +#### 왜 당신만 IDE 를 쓰나요? + +Syntax Highlighting, Autocomplete, Refactoring, Navigation, Analysis, 그리고 이젠 에이전트가 코드를 짜게 하기까지.. + +**왜 당신만 사용하나요?** +**에이전트가 그 도구를 사용한다면 더 코드를 잘 작성할텐데요.** + +[OpenCode 는 LSP 를 제공하지만](https://opencode.ai/docs/lsp/), 오로지 분석용으로만 제공합니다. + +당신이 에디터에서 사용하는 그 기능을 다른 에이전트들은 사용하지 못합니다. +뛰어난 동료에게 좋은 도구를 쥐어주세요. 이제 리팩토링도, 탐색도, 분석도 에이전트가 제대로 할 수 있습니다. - **lsp_hover**: 위치의 타입 정보, 문서, 시그니처 가져오기 - **lsp_goto_definition**: 심볼 정의로 이동 @@ -255,76 +288,11 @@ OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다. - **lsp_rename**: 워크스페이스 전체에서 심볼 이름 변경 - **lsp_code_actions**: 사용 가능한 빠른 수정/리팩토링 가져오기 - **lsp_code_action_resolve**: 코드 액션 적용 - -#### 내장 AST-Grep Tools - **ast_grep_search**: AST 인식 코드 패턴 검색 (25개 언어) - **ast_grep_replace**: AST 인식 코드 교체 -#### Grep -- **grep**: 안전 제한이 있는 콘텐츠 검색 (5분 타임아웃, 10MB 출력 제한). OpenCode의 내장 `grep` 도구를 대체합니다. - - 기본 grep 도구는 시간제한이 걸려있지 않습니다. 대형 코드베이스에서 광범위한 패턴을 검색하면 CPU가 폭발하고 무한히 멈출 수 있습니다. - - 이 도구는 엄격한 제한을 적용하며, 내장 `grep`을 완전히 대체합니다. - -#### Glob - -- **glob**: 타임아웃 보호가 있는 파일 패턴 매칭 (60초). OpenCode 내장 `glob` 도구를 대체합니다. - - 기본 `glob`은 타임아웃이 없습니다. ripgrep이 멈추면 무한정 대기합니다. - - 이 도구는 타임아웃을 강제하고 만료 시 프로세스를 종료합니다. - -#### 내장 멀티모달 도구 (Built-in Multimodal Tools) - -- **look_at**: 시각적 해석이 필요한 미디어 파일(PDF, 이미지, 다이어그램 등)을 Gemini 2.5 Flash를 사용하여 분석합니다. Sourcegraph Ampcode의 `look_at` 도구에서 영감을 받았습니다. - - 파라미터: `file_path` (절대 경로), `goal` (추출할 정보) - - 사용 사례: PDF 텍스트 추출, 이미지 설명, 다이어그램 분석 - -#### 내장 MCPs - -- **websearch_exa**: Exa AI 웹 검색. 실시간 웹 검색과 콘텐츠 스크래핑을 수행합니다. 관련 웹사이트에서 LLM에 최적화된 컨텍스트를 반환합니다. -- **context7**: 라이브러리 문서 조회. 정확한 코딩을 위해 최신 라이브러리 문서를 가져옵니다. - -필요 없다면 `oh-my-opencode.json`에서 비활성화할 수 있습니다: - -```json -{ - "disabled_mcps": ["websearch_exa"] -} -``` - -#### Background Task - -장시간 실행되는 작업이나 복잡한 분석을 메인 세션을 차단하지 않고 백그라운드에서 실행합니다. 작업이 완료되면 시스템이 자동으로 알림을 보냅니다. - -- **background_task**: 백그라운드 에이전트 작업을 시작합니다. 설명, 프롬프트, 에이전트 타입을 지정하면 즉시 task ID를 반환합니다. -- **background_output**: 작업 진행 상황 확인(`block=false`) 또는 결과 대기(`block=true`). 최대 10분까지 커스텀 타임아웃을 지원합니다. -- **background_cancel**: task ID로 실행 중인 백그라운드 작업을 취소합니다. - -주요 기능: -- **비동기 실행**: 복잡한 분석이나 연구 작업을 백그라운드에서 처리하면서 다른 작업 계속 가능 -- **자동 알림**: 백그라운드 작업 완료 시 메인 세션에 자동 알림 -- **상태 추적**: 도구 호출 횟수, 마지막 사용 도구 등 실시간 진행 상황 모니터링 -- **세션 격리**: 각 작업은 독립된 세션에서 실행 - -사용 예시: -``` -1. 시작: background_task → task_id="bg_abc123" 반환 -2. 다른 작업 계속 진행 -3. 시스템 알림: "Task bg_abc123 completed" -4. 결과 조회: background_output(task_id="bg_abc123") → 전체 결과 획득 -``` - -### Hooks - -- **Todo Continuation Enforcer**: 에이전트가 멈추기 전 모든 TODO 항목을 완료하도록 강제합니다. LLM의 고질적인 "중도 포기" 문제를 방지합니다. -- **Context Window Monitor**: [컨텍스트 윈도우 불안 관리](https://agentic-patterns.com/patterns/context-window-anxiety-management/) 패턴을 구현합니다. - - 사용량이 70%를 넘으면 에이전트에게 아직 토큰이 충분하다고 상기시켜, 급하게 불완전한 작업을 하는 것을 완화합니다. -- **Session Notification**: 에이전트가 작업을 마치면 OS 네이티브 알림을 보냅니다 (macOS, Linux, Windows). -- **Session Recovery**: API 에러로부터 자동으로 복구하여 세션 안정성을 보장합니다. 네 가지 시나리오를 처리합니다: - - **Tool Result Missing**: `tool_use` 블록이 있지만 `tool_result`가 없을 때 (ESC 인터럽트) → "cancelled" tool result 주입 - - **Thinking Block Order**: thinking 블록이 첫 번째여야 하는데 아닐 때 → 빈 thinking 블록 추가 - - **Thinking Disabled Violation**: thinking 이 비활성화인데 thinking 블록이 있을 때 → thinking 블록 제거 - - **Empty Content Message**: 메시지가 thinking/meta 블록만 있고 실제 내용이 없을 때 → 파일시스템을 통해 "(interrupted)" 텍스트 주입 -- **Comment Checker**: 코드 수정 후 불필요한 주석을 감지하여 보고합니다. BDD 패턴, 지시어, 독스트링 등 유효한 주석은 똑똑하게 제외하고, AI가 남긴 흔적을 제거하여 코드를 깨끗하게 유지합니다. -- **Directory AGENTS.md Injector**: 파일을 읽을 때 `AGENTS.md` 내용을 자동으로 주입합니다. 파일 디렉토리부터 프로젝트 루트까지 탐색하며, 경로 상의 **모든** `AGENTS.md` 파일을 수집합니다. 중첩된 디렉토리별 지침을 지원합니다: +#### Context is all you need. +- **Directory AGENTS.md / README.md Injector**: 파일을 읽을 때 `AGENTS.md`, `README.md` 내용을 자동으로 주입합니다. 파일 디렉토리부터 프로젝트 루트까지 탐색하며, 경로 상의 **모든** `AGENTS.md` 파일을 수집합니다. 중첩된 디렉토리별 지침을 지원합니다: ``` project/ ├── AGENTS.md # 프로젝트 전체 컨텍스트 @@ -334,9 +302,8 @@ OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다. │ ├── AGENTS.md # 컴포넌트 전용 컨텍스트 │ └── Button.tsx # 이 파일을 읽으면 위 3개 AGENTS.md 모두 주입 ``` - `Button.tsx`를 읽으면 순서대로 주입됩니다: `project/AGENTS.md` → `src/AGENTS.md` → `components/AGENTS.md`. 각 디렉토리의 컨텍스트는 세션당 한 번만 주입됩니다. Claude Code의 CLAUDE.md 기능에서 영감을 받았습니다. -- **Directory README.md Injector**: 파일을 읽을 때 `README.md` 내용을 자동으로 주입합니다. AGENTS.md Injector와 동일하게 동작하며, 파일 디렉토리부터 프로젝트 루트까지 탐색합니다. LLM 에이전트에게 프로젝트 문서 컨텍스트를 제공합니다. 각 디렉토리의 README는 세션당 한 번만 주입됩니다. -- **Rules Injector**: 파일을 읽을 때 `.claude/rules/` 디렉토리의 규칙을 자동으로 주입합니다. + `Button.tsx`를 읽으면 순서대로 주입됩니다: `project/AGENTS.md` → `src/AGENTS.md` → `components/AGENTS.md`. 각 디렉토리의 컨텍스트는 세션당 한 번만 주입됩니다. +- **Conditional Rules Injector**: 모든 규칙이 항상 필요하진 않습니다. 특정 규칙을 만족한다면, 파일을 읽을 때 `.claude/rules/` 디렉토리의 규칙을 자동으로 주입합니다. - 파일 디렉토리부터 프로젝트 루트까지 상향 탐색하며, `~/.claude/rules/` (사용자) 경로도 포함합니다. - `.md` 및 `.mdc` 파일을 지원합니다. - Frontmatter의 `globs` 필드(glob 패턴)를 기반으로 매칭합니다. @@ -350,57 +317,26 @@ OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다. - Use PascalCase for interface names - Use camelCase for function names ``` -- **Think Mode**: 확장된 사고(Extended Thinking)가 필요한 상황을 자동으로 감지하고 모드를 전환합니다. 사용자가 깊은 사고를 요청하는 표현(예: "think deeply", "ultrathink")을 감지하면, 추론 능력을 극대화하도록 모델 설정을 동적으로 조정합니다. -- **Ultrawork Mode**: 사용자가 "ultrawork" 또는 "ulw" 키워드를 입력하면 자동으로 에이전트 오케스트레이션 가이드를 주입합니다. 메인 에이전트가 모든 가용한 전문 에이전트(탐색, 사서, 계획, UI)를 백그라운드 작업을 통해 병렬로 최대한 활용하도록 강제하며, 엄격한 TODO 추적 및 검증 프로토콜을 따르게 합니다. -- **Anthropic Auto Compact**: Anthropic 모델 사용 시 컨텍스트 한계에 도달하면 대화 기록을 자동으로 압축하여 효율적으로 관리합니다. -- **Empty Task Response Detector**: 서브 에이전트가 수행한 작업이 비어있거나 무의미한 응답을 반환하는 경우를 감지하여, 오류 없이 우아하게 처리합니다. -- **Grep Output Truncator**: Grep 검색 결과가 너무 길어 컨텍스트를 장악해버리는 것을 방지하기 위해, 과도한 출력을 자동으로 자릅니다. +- **Online**: 프로젝트 규칙이 전부는 아니겠죠. exa, context7 mcp 를 내장하여 검색 기능을 제공합니다. -필요 없는 훅이 있다면, `~/.config/opencode/oh-my-opencode.json` 혹은 `.opencode/oh-my-opencode.json`의 `disabled_hooks`를 사용하여 비활성화할 수 있습니다: +#### 멀티모달을 다 활용하면서, 토큰은 덜 쓰도록. -```json -{ - "disabled_hooks": ["session-notification", "comment-checker"] -} -``` +AmpCode 에서 영감을 받은 look_at 도구를, OhMyOpenCode 에서도 제공합니다. +에이전트는 직접 파일을 읽어 큰 컨텍스트를 점유당하는 대신, 다른 에이전트를 내부적으로 활용하여 파일의 내용만 명확히 이해 할 수 있습니다. -사용 가능한 훅: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `ultrawork-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker` +#### 멈출 수 없는 에이전트 루프 +- 내장 grep, glob 도구를 대체합니다. 기본 구현에서는 타임아웃이 없어 무한정 대기할 수 있습니다. -> **참고**: `disabled_hooks`는 Oh My OpenCode의 내장 훅을 제어합니다. Claude Code의 `settings.json` 훅을 비활성화하려면 `claude_code.hooks: false`를 대신 사용하세요 ([호환성 토글](#호환성-토글) 참고). -### Claude Code 호환성 +### Claude Code 호환성: 그냥 바로 OpenCode 로 오세요. -Oh My OpenCode는 Claude Code 설정과 완벽하게 호환됩니다. Claude Code를 사용하셨다면, 기존 설정을 그대로 사용할 수 있습니다. - -#### 호환성 토글 - -특정 Claude Code 호환 기능을 비활성화하려면 `claude_code` 설정 객체를 사용하세요: - -```json -{ - "claude_code": { - "mcp": false, - "commands": false, - "skills": false, - "agents": false, - "hooks": false - } -} -``` - -| 토글 | `false`일 때 로딩 비활성화 경로 | 영향 받지 않음 | -|------|-------------------------------|---------------| -| `mcp` | `~/.claude/.mcp.json`, `./.mcp.json`, `./.claude/.mcp.json` | 내장 MCP (context7, websearch_exa) | -| `commands` | `~/.claude/commands/*.md`, `./.claude/commands/*.md` | `~/.config/opencode/command/`, `./.opencode/command/` | -| `skills` | `~/.claude/skills/*/SKILL.md`, `./.claude/skills/*/SKILL.md` | - | -| `agents` | `~/.claude/agents/*.md`, `./.claude/agents/*.md` | 내장 에이전트 (oracle, librarian 등) | -| `hooks` | `~/.claude/settings.json`, `./.claude/settings.json`, `./.claude/settings.local.json` | - | - -모든 토글은 기본값이 `true` (활성화)입니다. 완전한 Claude Code 호환성을 원하면 `claude_code` 객체를 생략하세요. +Oh My OpenCode 에는 Claude Code 호환성 레이어가 존재합니다. +Claude Code를 사용하셨다면, 기존 설정을 그대로 사용할 수 있습니다. #### Hooks 통합 -Claude Code의 `settings.json` 훅 시스템을 통해 커스텀 스크립트를 실행합니다. Oh My OpenCode는 다음 위치의 훅을 읽고 실행합니다: +Claude Code의 `settings.json` 훅 시스템을 통해 커스텀 스크립트를 실행합니다. +Oh My OpenCode는 다음 위치의 훅을 읽고 실행합니다: - `~/.claude/settings.json` (사용자) - `./.claude/settings.json` (프로젝트) @@ -454,15 +390,48 @@ Claude Code의 `settings.json` 훅 시스템을 통해 커스텀 스크립트를 **Transcript**: 세션 활동이 `~/.claude/transcripts/`에 JSONL 형식으로 기록되어 재생 및 분석이 가능합니다. -> **`claude-code-*` 네이밍에 대해**: `src/features/claude-code-*/` 아래의 기능들은 Claude Code의 설정 시스템에서 마이그레이션되었습니다. 이 네이밍 규칙은 어떤 기능이 Claude Code에서 유래했는지 명확히 식별합니다. +#### 호환성 토글 -### 기타 편의 기능 +특정 Claude Code 호환 기능을 비활성화하려면 `claude_code` 설정 객체를 사용 할 수 도 있습니다: -- **Terminal Title**: 세션 상태에 따라 터미널 타이틀을 자동 업데이트합니다 (유휴 ○, 처리중 ◐, 도구 ⚡, 에러 ✖). tmux를 지원합니다. -- **Session State**: 이벤트 훅과 터미널 타이틀 업데이트에 사용되는 중앙집중식 세션 추적 모듈입니다. +```json +{ + "claude_code": { + "mcp": false, + "commands": false, + "skills": false, + "agents": false, + "hooks": false + } +} +``` + +| 토글 | `false`일 때 로딩 비활성화 경로 | 영향 받지 않음 | +| ---------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------- | +| `mcp` | `~/.claude/.mcp.json`, `./.mcp.json`, `./.claude/.mcp.json` | 내장 MCP (context7, websearch_exa) | +| `commands` | `~/.claude/commands/*.md`, `./.claude/commands/*.md` | `~/.config/opencode/command/`, `./.opencode/command/` | +| `skills` | `~/.claude/skills/*/SKILL.md`, `./.claude/skills/*/SKILL.md` | - | +| `agents` | `~/.claude/agents/*.md`, `./.claude/agents/*.md` | 내장 에이전트 (oracle, librarian 등) | +| `hooks` | `~/.claude/settings.json`, `./.claude/settings.json`, `./.claude/settings.local.json` | - | + +모든 토글은 기본값이 `true` (활성화)입니다. 완전한 Claude Code 호환성을 원하면 `claude_code` 객체를 생략하세요. + +### 에이전트들을 위한 것이 아니라, 당신을 위한 것 + +에이전트들이 행복해지면, 당신이 제일 행복해집니다, 그렇지만 저는 당신도 돕고싶습니다. + +- **Ultrawork Mode**: 사용자가 "ultrawork" 또는 "ulw" 키워드를 입력하면 자동으로 에이전트 오케스트레이션 가이드를 주입합니다. 메인 에이전트가 모든 가용한 전문 에이전트(탐색, 사서, 계획, UI)를 백그라운드 작업을 통해 병렬로 최대한 활용하도록 강제하며, 엄격한 TODO 추적 및 검증 프로토콜을 따르게 합니다. 그냥 ultrawork 하세요. 말한 모든 기능이 최대로 활용되도록 에이전트가 최적화됩니다. +- **Todo Continuation Enforcer**: 에이전트가 멈추기 전 모든 TODO 항목을 완료하도록 강제합니다. LLM의 고질적인 "중도 포기" 문제를 방지합니다. +- **Comment Checker**: 학습 과정의 습관 때문일까요. LLM 들은 주석이 너무 많습니다. LLM 들이 쓸모없는 주석을 작성하지 않도록 상기시킵니다. BDD 패턴, 지시어, 독스트링 등 유효한 주석은 똑똑하게 제외하고, 그렇지 않는 주석들에 대해 해명을 요구하며 깔끔한 코드를 구성하게 합니다. +- **Think Mode**: 확장된 사고(Extended Thinking)가 필요한 상황을 자동으로 감지하고 모드를 전환합니다. 사용자가 깊은 사고를 요청하는 표현(예: "think deeply", "ultrathink")을 감지하면, 추론 능력을 극대화하도록 모델 설정을 동적으로 조정합니다. +- **Context Window Monitor**: [컨텍스트 윈도우 불안 관리](https://agentic-patterns.com/patterns/context-window-anxiety-management/) 패턴을 구현합니다. + - 사용량이 70%를 넘으면 에이전트에게 아직 토큰이 충분하다고 상기시켜, 급하게 불완전한 작업을 하는 것을 완화합니다. +- OpenCode 에서 누락되거나 부족하다고 느끼는 안정성 보강 기능들이 내장되어있습니다. 클로드 코드에서의 안정적인 경험을 그대로 가져갈 수 있습니다. 돌다가 세션이 망가지지 않습니다. 망가져도 복구됩니다. ## 설정 +비록 Highly Opinionated 한 설정이지만, 여러분의 입맛대로 조정 할 수 있습니다. + 설정 파일 위치 (우선순위 순): 1. `.opencode/oh-my-opencode.json` (프로젝트) 2. `~/.config/opencode/oh-my-opencode.json` (사용자) @@ -554,10 +523,20 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js 각 서버는 다음을 지원합니다: `command`, `extensions`, `priority`, `env`, `initialization`, `disabled`. + ## 작성자의 노트 -Oh My OpenCode 를 설치하세요. 복잡하게 OpenCode 구성을 만들지마세요. -제가 밟아보고 경험한 문제들의 해답을 이 플러그인에 담았고, 그저 깔고 사용하면 됩니다. OpenCode 가 ArchLinux 라면, Oh My OpenCode 는 [Omarchy](https://omarchy.org/) 입니다. +Oh My OpenCode 를 설치하세요. + +저는 여태까지 $24,000 어치의 토큰을 오로지 개인 개발 목적으로 개인적으로 사용했습니다. +다양한 도구를 시도해보고 끝까지 구성해보았습니다. 제 선택은 OpenCode 였습니다. + +제가 밟아보고 경험한 문제들의 해답을 이 플러그인에 담았고, 그저 깔고 사용하면 됩니다. +OpenCode 가 Debian / ArchLinux 라면, Oh My OpenCode 는 Ubuntu / [Omarchy](https://omarchy.org/) 입니다. + + +[AmpCode](https://ampcode.com), [Claude Code](https://code.claude.com/docs/ko/overview) 에게 강한 영향과 영감을 받고, 그들의 기능을 그대로, 혹은 더 낫게 이 곳에 구현했습니다. 그리고 구현하고 있습니다. +**Open**Code 이니까요. 다른 에이전트 하니스 제공자들이 이야기하는 다중 모델, 안정성, 풍부한 기능을 그저 OpenCode 에서 누리세요. 제가 테스트하고, 이 곳에 업데이트 하겠습니다. 저는 이 프로젝트의 가장 열렬한 사용자이기도 하니까요. @@ -569,13 +548,21 @@ Oh My OpenCode 를 설치하세요. 복잡하게 OpenCode 구성을 만들지마 - 주로 겪는 상황에 맞는 빠른 모델은 무엇인지 - 다른 에이전트 하니스에 제공되는 새로운 기능은 무엇인지. -고민하지마세요. 제가 고민할거고, 다른 사람들의 경험을 차용해 올것이고, 그래서 이 곳에 업데이트 하겠습니다. +이 플러그인은 그 경험들의 하이라이트입니다. 여러분은 그저 최고를 취하세요. 만약 더 나은 제안이 있다면 언제든 기여에 열려있습니다. + +**Agent Harness 에 대해 고민하지마세요.** +**제가 고민할거고, 다른 사람들의 경험을 차용해 올것이고, 그래서 이 곳에 업데이트 하겠습니다.** + 이 글이 오만하다고 느껴지고, 더 나은 해답이 있다면, 편히 기여해주세요. 환영합니다. 지금 시점에 여기에 언급된 어떤 프로젝트와 모델하고도 관련이 있지 않습니다. 온전히 개인적인 실험과 선호를 바탕으로 이 플러그인을 만들었습니다. + OpenCode 를 사용하여 이 프로젝트의 99% 를 작성했습니다. 기능 위주로 테스트했고, 저는 TS 를 제대로 작성 할 줄 모릅니다. **그치만 이 문서는 제가 직접 검토하고 전반적으로 다시 작성했으니 안심하고 읽으셔도 됩니다.** ## 주의 +- 생산성이 너무 올라 갈 수 있습니다. 옆자리 동료한테 들키지 않도록 조심하세요. + - 그렇지만 제가 소문 내겠습니다. 누가 이기나 내기해봅시다. - [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) 혹은 이것보다 낮은 버전을 사용중이라면, OpenCode 의 버그로 인해 제대로 구성이 되지 않을 수 있습니다. - [이를 고치는 PR 이 1.0.132 배포 이후에 병합되었으므로](https://github.com/sst/opencode/pull/5040) 이 변경사항이 포함된 최신 버전을 사용해주세요. + - TMI: PR 도 OhMyOpenCode 의 셋업의 Librarian, Explore, Oracle 을 활용하여 우연히 발견하고 해결되었습니다. diff --git a/README.md b/README.md index 82da0cd..c503d60 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,103 @@ -English | [한국어](README.ko.md) +[English](README.md) | [한국어](README.ko.md) ## Contents - [Oh My OpenCode](#oh-my-opencode) - - [TL;DR](#tldr) + - [Skip Reading This](#skip-reading-this) + - [It's the Age of Agents](#its-the-age-of-agents) + - [10 Minutes to Unlock](#10-minutes-to-unlock) - [Installation](#installation) - - [For LLM Agents](#for-llm-agents) - - [Why OpenCode & Why Oh My OpenCode](#why-opencode--why-oh-my-opencode) + - [For Humans](#for-humans) + - [For LLM Agents](#for-llm-agents) + - [Step 1: Verify OpenCode Installation](#step-1-verify-opencode-installation) + - [Step 2: Configure oh-my-opencode Plugin](#step-2-configure-oh-my-opencode-plugin) + - [Step 3: Verify Setup](#step-3-verify-setup) + - [Step 4: Configure Authentication](#step-4-configure-authentication) + - [4.1 Anthropic (Claude)](#41-anthropic-claude) + - [4.2 Google Gemini (Antigravity OAuth)](#42-google-gemini-antigravity-oauth) + - [4.3 OpenAI (ChatGPT Plus/Pro)](#43-openai-chatgpt-pluspro) + - [4.3.1 Model Configuration](#431-model-configuration) + - [⚠️ Warning](#️-warning) - [Features](#features) - - [Agents](#agents) - - [Tools](#tools) - - [Built-in LSP Tools](#built-in-lsp-tools) - - [Built-in AST-Grep Tools](#built-in-ast-grep-tools) - - [Grep](#grep) - - [Built-in MCPs](#built-in-mcps) - - [Background Task](#background-task) - - [Hooks](#hooks) - - [Claude Code Compatibility](#claude-code-compatibility) - - [Other Features](#other-features) + - [Agents: Your Teammates](#agents-your-teammates) + - [Background Agents: Work Like a Team](#background-agents-work-like-a-team) + - [The Tools: Your Teammates Deserve Better](#the-tools-your-teammates-deserve-better) + - [Why Are You the Only One Using an IDE?](#why-are-you-the-only-one-using-an-ide) + - [Context Is All You Need](#context-is-all-you-need) + - [Be Multimodal. Save Tokens.](#be-multimodal-save-tokens) + - [I Removed Their Blockers](#i-removed-their-blockers) + - [Goodbye Claude Code. Hello Oh My OpenCode.](#goodbye-claude-code-hello-oh-my-opencode) + - [Hooks Integration](#hooks-integration) + - [Config Loaders](#config-loaders) + - [Data Storage](#data-storage) + - [Compatibility Toggles](#compatibility-toggles) + - [Not Just for the Agents](#not-just-for-the-agents) - [Configuration](#configuration) + - [Google Auth](#google-auth) + - [Agents](#agents) + - [MCPs](#mcps) + - [LSP](#lsp) - [Author's Note](#authors-note) - [Warnings](#warnings) # Oh My OpenCode -Oh My OpenCode - oMoMoMoMoMo··· -If you work in tech, you likely appreciated [Claude Code](https://www.claude.com/product/claude-code). -If you are a hacker, you will fucking fall in love with [OpenCode](https://github.com/sst/opencode). -Do you remember the first time you switched from Windows to Linux? The excitement of configuring everything just the way you wanted? -In an era where that romance feels lost, OpenCode will be that project for you. -If you love coding and computers, OpenCode will feel exactly like that moment you first touched Linux after years of Windows. -Even if you don't, invest a little time. Boost your skills and productivity by multipliers. +[Claude Code](https://www.claude.com/product/claude-code) is great. +But if you're a hacker, you'll fall head over heels for [OpenCode](https://github.com/sst/opencode). -## TL;DR +- Endlessly extensible. Endlessly customizable. +- Zero screen flicker. +- [LSP](https://opencode.ai/docs/lsp/), [linters, formatters](https://opencode.ai/docs/formatters/) activate automatically per file—and you can tweak everything. +- Mix and match models. **Orchestrate them by purpose.** +- Feature-rich. Beautiful. The terminal doesn't choke. High performance. -- **Model Setup Required** - - This plugin utilizes models from [OpenCode Zen](https://opencode.ai/docs/zen/), Google, OpenAI, and Anthropic. - - For Anthropic models, use [OpenCode's built-in Claude Code Max Plan login](https://opencode.ai/docs/providers/#anthropic). - - For OpenAI models (ChatGPT Plus/Pro), install the [OpenCode-OpenAI-Codex-Auth plugin](https://github.com/numman-ali/opencode-openai-codex-auth). - - For Google Gemini models, enable `google_auth: true` in `oh-my-opencode.json` for **built-in Antigravity OAuth**. - - For other providers, [VibeProxy (macOS Only)](https://github.com/automazeio/vibeproxy) or [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) remain available as alternatives. -- **Truth be told, the rest is optional. Just install it. Once set up, no further learning is required. It simply evolves.** -- **Paste this document into Claude Code, OpenCode, or Cursor, instruct it to install, and ask for assistance if needed. It just installs.** - - If you are an LLM Agent, install the required plugins and dependencies, then run `opencode auth login` via tmux to assist the user with configuration. +Remember the first time you switched from Windows to Linux? That rush of configuring everything exactly how you wanted? +In an age where that magic seems lost, OpenCode brings it back. +If you love coding and computers, OpenCode is that Linux-after-Windows moment. + +**But here's the catch: there's a lot to learn, it's complex, and your time is expensive.** + +I've fixed that. +Even if you're not a hacker, invest a few minutes. Multiply your skills and productivity. +Hand this doc to an agent and let them set it up. + +## Skip Reading This + +### It's the Age of Agents +- **Just paste this link into Claude Code / AmpCode / Factory Droid / Cursor and ask it to explain.** + - Ask why it's good, why it's not just another boilerplate setup, what actually gets better. + - If you're an LLM agent, explain to the user what becomes possible right now with this project. + +### 10 Minutes to Unlock + +1. **While Gemini 3 Pro writes the frontend as a background task, Claude Opus 4.5 handles the backend. Stuck debugging? Call GPT 5.2 for help. When the frontend reports done, verify and ship.** +2. Need to look something up? It scours official docs, your entire codebase history, and public GitHub implementations—using not just grep but built-in LSP tools and AST-Grep. +3. Stop worrying about context management when delegating to LLMs. I've got it covered. + - OhMyOpenCode aggressively leverages multiple agents to lighten the context load. + - **Your agent is now the dev team lead. You're the AI Manager.** +4. It doesn't stop until the job is done. + + +- Throw complex, massive tasks at it. + - Drop the "ultrawork" keyword in your prompt and it handles everything automatically. ## Installation -Add to `~/.config/opencode/opencode.json`: -```json -{ - "plugin": [ - "oh-my-opencode" - ] -} -``` +### For Humans -## For LLM Agents +Let the LLM Agent handle the grunt work. Paste this link and ask it to install and configure. + +### For LLM Agents
-For LLM Agents (Click to expand) +Instructions for LLM Agents (click to expand) + +If you're an LLM Agent helping set up oh-my-opencode, follow these steps: -If you are an LLM Agent helping a user set up oh-my-opencode, follow these steps: ### Step 1: Verify OpenCode Installation @@ -74,11 +106,11 @@ if command -v opencode &> /dev/null; then echo "OpenCode $(opencode --version) is installed" else echo "OpenCode is not installed. Please install it first." - echo "See: https://opencode.ai/docs" + echo "Ref: https://opencode.ai/docs" fi ``` -If OpenCode is not installed, guide the user to [OpenCode Installation Guide](https://opencode.ai/docs). +If OpenCode isn't installed, check the [OpenCode Installation Guide](https://opencode.ai/docs). To save context, spawn a subagent to handle installation and report back. ### Step 2: Configure oh-my-opencode Plugin @@ -92,10 +124,10 @@ if [ -f ~/.config/opencode/opencode.json ]; then ~/.config/opencode/opencode.json > /tmp/oc.json && \ mv /tmp/oc.json ~/.config/opencode/opencode.json else - echo "Add \"oh-my-opencode\" to plugin array in ~/.config/opencode/opencode.json" + echo "Please add \"oh-my-opencode\" to the plugin array in ~/.config/opencode/opencode.json" fi else - # New config + # Create new config echo '{"plugin":["oh-my-opencode"]}' > ~/.config/opencode/opencode.json fi ``` @@ -103,28 +135,28 @@ fi ### Step 3: Verify Setup ```bash -opencode --version # Should be >= 1.0.132 +opencode --version # Should be 1.0.132 or higher cat ~/.config/opencode/opencode.json # Should contain "oh-my-opencode" in plugin array ``` ### Step 4: Configure Authentication -Once `oh-my-opencode` is added to the plugin list, use `tmux` to assist the user with authentication setup. **It is RECOMMENDED to set up Google Auth (Step 4.2) by default.** +Once oh-my-opencode is in the plugin list, use tmux to walk the user through authentication. Complete all steps below. #### 4.1 Anthropic (Claude) ```bash opencode auth login -# Select Provider: Anthropic -# Select Login method: Claude Pro/Max -# Complete OAuth flow in browser +# Provider: Select Anthropic +# Login method: Select Claude Pro/Max +# Guide user through OAuth flow in browser +# Wait for completion +# Verify success and confirm with user ``` -#### 4.2 Google Gemini (Built-in Antigravity OAuth) +#### 4.2 Google Gemini (Antigravity OAuth) -**This is the RECOMMENDED default configuration.** - -First, proactively enable Google auth in `~/.config/opencode/oh-my-opencode.json` (or `.opencode/oh-my-opencode.json` for project-level): +First, enable Google auth in `~/.config/opencode/oh-my-opencode.json`: ```json { @@ -136,9 +168,11 @@ Then authenticate: ```bash opencode auth login -# Select Provider: Google -# Select Login method: OAuth with Google (Antigravity) -# Complete OAuth flow in browser +# Provider: Select Google +# Login method: Select OAuth with Google (Antigravity) +# Guide user through OAuth flow in browser +# Wait for completion +# Verify success and confirm with user ``` #### 4.3 OpenAI (ChatGPT Plus/Pro) @@ -154,18 +188,7 @@ First, add the opencode-openai-codex-auth plugin: } ``` -**Important**: You must also configure the full model settings in your `opencode.json`. Copy the provider/models configuration from [`config/full-opencode.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/full-opencode.json). See the [opencode-openai-codex-auth documentation](https://github.com/numman-ali/opencode-openai-codex-auth) for detailed setup instructions. - -Then authenticate: - -```bash -opencode auth login -# Select Provider: OpenAI -# Select Login method: ChatGPT Plus/Pro (Codex Subscription) -# Complete OAuth flow in browser -``` - -**⚠️ Known Issue**: The official npm package currently has a bug that causes 400 errors (`"No tool call found for function call output with call_id"`). Until a fix is released, **use the hotfix branch instead**. Modify `~/.config/opencode/package.json`: +**Important**: The official npm package currently has a bug causing 400 errors (`"No tool call found for function call output with call_id"`). **Use the hotfix branch** until fixed. Edit `~/.config/opencode/package.json`: ```json { @@ -175,154 +198,98 @@ opencode auth login } ``` -Then run `cd ~/.config/opencode && bun i`. In your `opencode.json`, use the plugin name without a version: `"opencode-openai-codex-auth"` (not `@4.1.0`). +Then run `cd ~/.config/opencode && bun i`. In `opencode.json`, use `"opencode-openai-codex-auth"` without the version suffix. -#### 4.4 Alternative: Proxy-based Authentication +#### 4.3.1 Model Configuration +You'll also need full model settings in `opencode.json`. +Read the [opencode-openai-codex-auth documentation](https://github.com/numman-ali/opencode-openai-codex-auth), copy provider/models config from [`config/full-opencode.json`](https://github.com/numman-ali/opencode-openai-codex-auth/blob/main/config/full-opencode.json), and merge carefully to avoid breaking the user's existing setup. + +Then authenticate: + +```bash +opencode auth login +# Provider: Select OpenAI +# Login method: Select ChatGPT Plus/Pro (Codex Subscription) +# Guide user through OAuth flow in browser +# Wait for completion +# Verify success and confirm with user +``` -For users who prefer proxy-based authentication, [VibeProxy](https://github.com/automazeio/vibeproxy) (macOS) or [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) remain available as alternatives. ### ⚠️ Warning -**Do NOT modify model settings or disable features (agents, hooks, MCPs) unless the user explicitly requests it.** +**Don't change model settings or disable features (agents, hooks, MCPs) unless explicitly requested.** -The plugin works perfectly with default settings. While you SHOULD enable `google_auth: true` as recommended, do not alter other configurations or disable features without a specific request. +The plugin works perfectly with defaults. Aside from the recommended `google_auth: true`, don't touch other settings without a specific ask.
-## Why OpenCode & Why Oh My OpenCode - -OpenCode is limitlessly extensible and customizable. Zero screen flicker. -[LSP](https://opencode.ai/docs/lsp/), [linters, formatters](https://opencode.ai/docs/formatters/)? Automatic and fully configurable. -You can mix and orchestrate models to your exact specifications. -It is feature-rich. It is elegant. It handles the terminal without hesitation. It is high-performance. - -But here is the catch: the learning curve is steep. There is a lot to master. And your time is expensive. - -Inspired by [AmpCode](https://ampcode.com) and [Claude Code](https://code.claude.com/docs/en/overview), I have implemented their features here—often with superior execution. -Because this is OpenCode. - -Consider this a superior AmpCode, a superior Claude Code, or simply a specialized distribution. - -I believe in the right tool for the job. For your wallet's sake, use CLIProxyAPI or VibeProxy. Employ the best LLMs from frontier labs. You are in command. - -**Note**: This setup is highly opinionated. It represents the generic component of my personal configuration, so it evolves constantly. I have spent tokens worth $20,000 just for my personal programming usages, and this plugin represents the apex of that experience. You simply inherit the best. If you have superior ideas, PRs are welcome. ## Features -### Agents -- **oracle** (`openai/gpt-5.2`): The architect. Expert in code reviews and strategy. Uses GPT-5.2 for its unmatched logic and reasoning capabilities. Inspired by AmpCode. -- **librarian** (`anthropic/claude-haiku-4-5`): Multi-repo analysis, documentation lookup, and implementation examples. Haiku is chosen for its speed, competence, excellent tool usage, and cost-efficiency. Inspired by AmpCode. -- **explore** (`opencode/grok-code`): Fast exploration and pattern matching. Claude Code uses Haiku; we use Grok. It is currently free, blazing fast, and intelligent enough for file traversal. Inspired by Claude Code. -- **frontend-ui-ux-engineer** (`google/gemini-3-pro-preview`): A designer turned developer. Creates stunning UIs. Uses Gemini because its creativity and UI code generation are superior. -- **document-writer** (`google/gemini-3-pro-preview`): A technical writing expert. Gemini is a wordsmith; it writes prose that flows naturally. -- **multimodal-looker** (`google/gemini-2.5-flash`): Specialized agent for visual content interpretation. Analyzes PDFs, images, and diagrams to extract information. +### Agents: Your Teammates -Each agent is automatically invoked by the main agent, but you can also explicitly request them: +- **oracle** (`openai/gpt-5.2`): Architecture, code review, strategy. Uses GPT-5.2 for its stellar logical reasoning and deep analysis. Inspired by AmpCode. +- **librarian** (`anthropic/claude-haiku-4-5`): Multi-repo analysis, doc lookup, implementation examples. Haiku is fast, smart enough, great at tool calls, and cheap. Inspired by AmpCode. +- **explore** (`opencode/grok-code`): Fast codebase exploration and pattern matching. Claude Code uses Haiku; we use Grok—it's free, blazing fast, and plenty smart for file traversal. Inspired by Claude Code. +- **frontend-ui-ux-engineer** (`google/gemini-3-pro-preview`): A designer turned developer. Builds gorgeous UIs. Gemini excels at creative, beautiful UI code. +- **document-writer** (`google/gemini-3-pro-preview`): Technical writing expert. Gemini is a wordsmith—writes prose that flows. +- **multimodal-looker** (`google/gemini-2.5-flash`): Visual content specialist. Analyzes PDFs, images, diagrams to extract information. + +The main agent invokes these automatically, but you can call them explicitly: ``` -@oracle Please think through the design of this part and suggest an architecture. -@librarian Tell me how this is implemented — why does the behavior keep changing internally? -@explore Tell me about the policy for this feature. +Ask @oracle to review this design and propose an architecture +Ask @librarian how this is implemented—why does the behavior keep changing? +Ask @explore for the policy on this feature ``` -Agent models, prompts, and permissions can be customized via `oh-my-opencode.json`. See [Configuration](#configuration) for details. +Customize agent models, prompts, and permissions in `oh-my-opencode.json`. See [Configuration](#configuration). -#### Subagent Orchestration (omo_task) +### Background Agents: Work Like a Team -The `omo_task` tool allows agents (like `oracle`, `frontend-ui-ux-engineer`) to spawn `explore` or `librarian` as subagents to delegate specific tasks. This enables powerful workflows where an agent can "ask" another specialized agent to gather information before proceeding. +What if you could run these agents relentlessly, never letting them idle? -> **Note**: To prevent infinite recursion, `explore` and `librarian` agents cannot use the `omo_task` tool themselves. +- Have GPT debug while Claude tries different approaches to find the root cause +- Gemini writes the frontend while Claude handles the backend +- Kick off massive parallel searches, continue implementation on other parts, then finish using the search results -### Tools +These workflows are possible with OhMyOpenCode. -#### Built-in LSP Tools +Run subagents in the background. The main agent gets notified on completion. Wait for results if needed. -The features you use in your editor—other agents cannot access them. Oh My OpenCode hands those very tools to your LLM Agent. Refactoring, navigation, and analysis are all supported using the same OpenCode configuration. +**Make your agents work like your team works.** -[OpenCode provides LSP](https://opencode.ai/docs/lsp/), but only for analysis. Oh My OpenCode equips you with navigation and refactoring tools matching the same specification. +### The Tools: Your Teammates Deserve Better -- **lsp_hover**: Get type info, docs, signatures at position +#### Why Are You the Only One Using an IDE? + +Syntax highlighting, autocomplete, refactoring, navigation, analysis—and now agents writing code... + +**Why are you the only one with these tools?** +**Give them to your agents and watch them level up.** + +[OpenCode provides LSP](https://opencode.ai/docs/lsp/), but only for analysis. + +The features in your editor? Other agents can't touch them. +Hand your best tools to your best colleagues. Now they can properly refactor, navigate, and analyze. + +- **lsp_hover**: Type info, docs, signatures at position - **lsp_goto_definition**: Jump to symbol definition - **lsp_find_references**: Find all usages across workspace -- **lsp_document_symbols**: Get file's symbol outline +- **lsp_document_symbols**: Get file symbol outline - **lsp_workspace_symbols**: Search symbols by name across project - **lsp_diagnostics**: Get errors/warnings before build - **lsp_servers**: List available LSP servers - **lsp_prepare_rename**: Validate rename operation - **lsp_rename**: Rename symbol across workspace - **lsp_code_actions**: Get available quick fixes/refactorings -- **lsp_code_action_resolve**: Apply a code action - -#### Built-in AST-Grep Tools - +- **lsp_code_action_resolve**: Apply code action - **ast_grep_search**: AST-aware code pattern search (25 languages) - **ast_grep_replace**: AST-aware code replacement -#### Grep - -- **grep**: Content search with safety limits (5min timeout, 10MB output). Overrides OpenCode's built-in `grep` tool. - - The default `grep` lacks safeguards. On a large codebase, a broad pattern can cause CPU overload and indefinite hanging. - - This tool enforces strict limits and completely replaces the built-in `grep`. - -#### Glob - -- **glob**: File pattern matching with timeout protection (60s). Overrides OpenCode's built-in `glob` tool. - - The default `glob` lacks timeout. If ripgrep hangs, it waits indefinitely. - - This tool enforces timeouts and kills the process on expiration. - -#### Built-in Multimodal Tools - -- **look_at**: Analyzes media files (PDFs, images, diagrams) that require visual interpretation using Gemini 2.5 Flash. Inspired by Sourcegraph Ampcode's `look_at` tool. - - Parameters: `file_path` (absolute path), `goal` (what to extract) - - Use cases: PDF text extraction, image description, diagram analysis - -#### Built-in MCPs - -- **websearch_exa**: Exa AI web search. Performs real-time web searches and can scrape content from specific URLs. Returns LLM-optimized context from relevant websites. -- **context7**: Library documentation lookup. Fetches up-to-date documentation for any library to assist with accurate coding. - -Don't need these? Disable them via `oh-my-opencode.json`: - -```json -{ - "disabled_mcps": ["websearch_exa"] -} -``` - -#### Background Task - -Run long-running or complex tasks in the background without blocking your main session. The system automatically notifies you when tasks complete. - -- **background_task**: Launch a background agent task. Specify description, prompt, and agent type. Returns immediately with a task ID. -- **background_output**: Check task progress (`block=false`) or wait for results (`block=true`). Supports custom timeout up to 10 minutes. -- **background_cancel**: Cancel a running background task by task ID. - -Key capabilities: -- **Async Execution**: Offload complex analysis or research while you continue working -- **Auto Notification**: System notifies the main session when background tasks complete -- **Status Tracking**: Real-time progress with tool call counts and last tool used -- **Session Isolation**: Each task runs in an independent session - -Example workflow: -``` -1. Launch: background_task → returns task_id="bg_abc123" -2. Continue working on other tasks -3. System notification: "Task bg_abc123 completed" -4. Retrieve: background_output(task_id="bg_abc123") → get full results -``` - -### Hooks - -- **Todo Continuation Enforcer**: Forces the agent to complete all tasks before exiting. Eliminates the common LLM issue of "giving up halfway". -- **Context Window Monitor**: Implements [Context Window Anxiety Management](https://agentic-patterns.com/patterns/context-window-anxiety-management/). When context usage exceeds 70%, it reminds the agent that resources are sufficient, preventing rushed or low-quality output. -- **Session Notification**: Sends a native OS notification when the job is done (macOS, Linux, Windows). -- **Session Recovery**: Automatically recovers from API errors, ensuring session stability. Handles four scenarios: - - **Tool Result Missing**: When `tool_use` block exists without `tool_result` (ESC interrupt) → injects "cancelled" tool results - - **Thinking Block Order**: When thinking block must be first but isn't → prepends empty thinking block - - **Thinking Disabled Violation**: When thinking blocks exist but thinking is disabled → strips thinking blocks - - **Empty Content Message**: When message has only thinking/meta blocks without actual content → injects "(interrupted)" text via filesystem -- **Comment Checker**: Detects and reports unnecessary comments after code modifications. Smartly ignores valid patterns (BDD, directives, docstrings, shebangs) to keep the codebase clean from AI-generated artifacts. -- **Directory AGENTS.md Injector**: Automatically injects `AGENTS.md` contents when reading files. Searches upward from the file's directory to project root, collecting **all** `AGENTS.md` files along the path hierarchy. This enables nested, directory-specific instructions: +#### Context Is All You Need +- **Directory AGENTS.md / README.md Injector**: Auto-injects `AGENTS.md` and `README.md` when reading files. Walks from file directory to project root, collecting **all** `AGENTS.md` files along the path. Supports nested directory-specific instructions: ``` project/ ├── AGENTS.md # Project-wide context @@ -330,16 +297,15 @@ Example workflow: │ ├── AGENTS.md # src-specific context │ └── components/ │ ├── AGENTS.md # Component-specific context - │ └── Button.tsx # Reading this injects ALL 3 AGENTS.md files + │ └── Button.tsx # Reading this injects all 3 AGENTS.md files ``` - When reading `Button.tsx`, the hook injects contexts in order: `project/AGENTS.md` → `src/AGENTS.md` → `components/AGENTS.md`. Each directory's context is injected only once per session. Inspired by Claude Code's CLAUDE.md feature. -- **Directory README.md Injector**: Automatically injects `README.md` contents when reading files. Works identically to the AGENTS.md Injector, searching upward from the file's directory to project root. Provides project documentation context to the LLM agent. Each directory's README is injected only once per session. -- **Rules Injector**: Automatically injects rules from `.claude/rules/` directory when reading files. - - Searches upward from the file's directory to project root, plus `~/.claude/rules/` (user). + Reading `Button.tsx` injects in order: `project/AGENTS.md` → `src/AGENTS.md` → `components/AGENTS.md`. Each directory's context is injected once per session. +- **Conditional Rules Injector**: Not all rules apply all the time. Injects rules from `.claude/rules/` when conditions match. + - Walks upward from file directory to project root, plus `~/.claude/rules/` (user). - Supports `.md` and `.mdc` files. - - Frontmatter-based matching with `globs` field (glob patterns). - - `alwaysApply: true` option for rules that should always apply. - - Example rule file structure: + - Matches via `globs` field in frontmatter. + - `alwaysApply: true` for rules that should always fire. + - Example rule file: ```markdown --- globs: ["*.ts", "src/**/*.js"] @@ -348,57 +314,26 @@ Example workflow: - Use PascalCase for interface names - Use camelCase for function names ``` -- **Think Mode**: Automatic extended thinking detection and mode switching. Detects when user requests deep thinking (e.g., "think deeply", "ultrathink") and dynamically adjusts model settings for enhanced reasoning. -- **Ultrawork Mode**: When user triggers "ultrawork" or "ulw" keywords, automatically injects agent orchestration guidance. Forces the main agent to leverage all available specialized agents (exploration, librarian, planning, UI) via background tasks in parallel, with strict TODO tracking and verification protocols. -- **Anthropic Auto Compact**: Automatically compacts conversation history when approaching context limits for Anthropic models. -- **Empty Task Response Detector**: Detects when subagent tasks return empty or meaningless responses and handles gracefully. -- **Grep Output Truncator**: Prevents grep output from overwhelming the context by truncating excessively long results. +- **Online**: Project rules aren't everything. Built-in exa and context7 MCP for web search. -You can disable specific built-in hooks using `disabled_hooks` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: +#### Be Multimodal. Save Tokens. -```json -{ - "disabled_hooks": ["session-notification", "comment-checker"] -} -``` +The look_at tool from AmpCode, now in OhMyOpenCode. +Instead of the agent reading massive files and bloating context, it internally leverages another agent to extract just what it needs. -Available hooks: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `ultrawork-mode`, `anthropic-auto-compact`, `rules-injector`, `background-notification`, `auto-update-checker` +#### I Removed Their Blockers +- Replaces built-in grep and glob tools. Default implementation has no timeout—can hang forever. -> **Note**: `disabled_hooks` controls Oh My OpenCode's built-in hooks. To disable Claude Code's `settings.json` hooks, use `claude_code.hooks: false` instead (see [Compatibility Toggles](#compatibility-toggles)). -### Claude Code Compatibility +### Goodbye Claude Code. Hello Oh My OpenCode. -Oh My OpenCode provides seamless Claude Code configuration compatibility. If you've been using Claude Code, your existing setup works out of the box. - -#### Compatibility Toggles - -If you want to disable specific Claude Code compatibility features, use the `claude_code` configuration object: - -```json -{ - "claude_code": { - "mcp": false, - "commands": false, - "skills": false, - "agents": false, - "hooks": false - } -} -``` - -| Toggle | When `false`, disables loading from... | NOT affected | -|--------|----------------------------------------|--------------| -| `mcp` | `~/.claude/.mcp.json`, `./.mcp.json`, `./.claude/.mcp.json` | Built-in MCPs (context7, websearch_exa) | -| `commands` | `~/.claude/commands/*.md`, `./.claude/commands/*.md` | `~/.config/opencode/command/`, `./.opencode/command/` | -| `skills` | `~/.claude/skills/*/SKILL.md`, `./.claude/skills/*/SKILL.md` | - | -| `agents` | `~/.claude/agents/*.md`, `./.claude/agents/*.md` | Built-in agents (oracle, librarian, etc.) | -| `hooks` | `~/.claude/settings.json`, `./.claude/settings.json`, `./.claude/settings.local.json` | - | - -All toggles default to `true` (enabled). Omit the entire `claude_code` object for full Claude Code compatibility. +Oh My OpenCode has a Claude Code compatibility layer. +If you were using Claude Code, your existing config just works. #### Hooks Integration -Execute custom scripts via Claude Code's `settings.json` hook system. Oh My OpenCode reads and executes hooks defined in: +Run custom scripts via Claude Code's `settings.json` hook system. +Oh My OpenCode reads and executes hooks from: - `~/.claude/settings.json` (user) - `./.claude/settings.json` (project) @@ -407,7 +342,7 @@ Execute custom scripts via Claude Code's `settings.json` hook system. Oh My Open Supported hook events: - **PreToolUse**: Runs before tool execution. Can block or modify tool input. - **PostToolUse**: Runs after tool execution. Can add warnings or context. -- **UserPromptSubmit**: Runs when user submits a prompt. Can block or inject messages. +- **UserPromptSubmit**: Runs when user submits prompt. Can block or inject messages. - **Stop**: Runs when session goes idle. Can inject follow-up prompts. Example `settings.json`: @@ -424,7 +359,7 @@ Example `settings.json`: } ``` -#### Configuration Loaders +#### Config Loaders **Command Loader**: Loads markdown-based slash commands from 4 directories: - `~/.claude/commands/` (user) @@ -440,7 +375,7 @@ Example `settings.json`: - `~/.claude/agents/*.md` (user) - `./.claude/agents/*.md` (project) -**MCP Loader**: Loads MCP server configurations from `.mcp.json` files: +**MCP Loader**: Loads MCP server configs from `.mcp.json` files: - `~/.claude/.mcp.json` (user) - `./.mcp.json` (project) - `./.claude/.mcp.json` (local) @@ -448,24 +383,57 @@ Example `settings.json`: #### Data Storage -**Todo Management**: Session todos are stored in Claude Code compatible format at `~/.claude/todos/`. +**Todo Management**: Session todos stored in `~/.claude/todos/` in Claude Code compatible format. -**Transcript**: Session activity is logged to `~/.claude/transcripts/` in JSONL format, enabling replay and analysis. +**Transcript**: Session activity logged to `~/.claude/transcripts/` in JSONL format for replay and analysis. -> **Note on `claude-code-*` naming**: Features under `src/features/claude-code-*/` are migrated from Claude Code's configuration system. This naming convention clearly identifies which features originated from Claude Code. +#### Compatibility Toggles -### Other Features +Disable specific Claude Code compatibility features with the `claude_code` config object: -- **Terminal Title**: Auto-updates terminal title with session status (idle ○, processing ◐, tool ⚡, error ✖). Supports tmux. -- **Session State**: Centralized session tracking module used by event hooks and terminal title updates. +```json +{ + "claude_code": { + "mcp": false, + "commands": false, + "skills": false, + "agents": false, + "hooks": false + } +} +``` + +| Toggle | When `false`, stops loading from... | Unaffected | +| ---------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------- | +| `mcp` | `~/.claude/.mcp.json`, `./.mcp.json`, `./.claude/.mcp.json` | Built-in MCP (context7, websearch_exa) | +| `commands` | `~/.claude/commands/*.md`, `./.claude/commands/*.md` | `~/.config/opencode/command/`, `./.opencode/command/` | +| `skills` | `~/.claude/skills/*/SKILL.md`, `./.claude/skills/*/SKILL.md` | - | +| `agents` | `~/.claude/agents/*.md`, `./.claude/agents/*.md` | Built-in agents (oracle, librarian, etc.) | +| `hooks` | `~/.claude/settings.json`, `./.claude/settings.json`, `./.claude/settings.local.json` | - | + +All toggles default to `true` (enabled). Omit the `claude_code` object for full Claude Code compatibility. + +### Not Just for the Agents + +When agents thrive, you thrive. But I want to help you directly too. + +- **Ultrawork Mode**: Type "ultrawork" or "ulw" and agent orchestration kicks in. Forces the main agent to max out all available specialists (explore, librarian, plan, UI) via background tasks in parallel, with strict TODO tracking and verification. Just ultrawork. Everything fires at full capacity. +- **Todo Continuation Enforcer**: Makes agents finish all TODOs before stopping. Kills the chronic LLM habit of quitting halfway. +- **Comment Checker**: LLMs love comments. Too many comments. This reminds them to cut the noise. Smartly ignores valid patterns (BDD, directives, docstrings) and demands justification for the rest. Clean code wins. +- **Think Mode**: Auto-detects when extended thinking is needed and switches modes. Catches phrases like "think deeply" or "ultrathink" and dynamically adjusts model settings for maximum reasoning. +- **Context Window Monitor**: Implements [Context Window Anxiety Management](https://agentic-patterns.com/patterns/context-window-anxiety-management/). + - At 70%+ usage, reminds agents there's still headroom—prevents rushed, sloppy work. +- Stability features that felt missing in OpenCode are built in. The Claude Code experience, transplanted. Sessions don't crash mid-run. Even if they do, they recover. ## Configuration -Configuration file locations (in priority order): +Highly opinionated, but adjustable to taste. + +Config file locations (priority order): 1. `.opencode/oh-my-opencode.json` (project) 2. `~/.config/opencode/oh-my-opencode.json` (user) -Schema autocomplete is supported: +Schema autocomplete supported: ```json { @@ -483,7 +451,7 @@ Enable built-in Antigravity OAuth for Google Gemini models: } ``` -When enabled, `opencode auth login` will show "OAuth with Google (Antigravity)" as a login option for the Google provider. +When enabled, `opencode auth login` shows "OAuth with Google (Antigravity)" for the Google provider. ### Agents @@ -505,7 +473,7 @@ Override built-in agent settings: Each agent supports: `model`, `temperature`, `top_p`, `prompt`, `tools`, `disable`, `description`, `mode`, `color`, `permission`. -Or you can disable them using `disabled_agents` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: +Or disable via `disabled_agents` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: ```json { @@ -517,9 +485,9 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, ` ### MCPs -By default, Context7 and Exa MCP are supported. +Context7 and Exa MCP enabled by default. -If you don't want these, you can disable them using `disabled_mcps` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: +Don't want them? Disable via `disabled_mcps` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: ```json { @@ -530,10 +498,10 @@ If you don't want these, you can disable them using `disabled_mcps` in `~/.confi ### LSP OpenCode provides LSP tools for analysis. -Oh My OpenCode provides LSP tools for refactoring (rename, code actions). -It supports all LSP configurations and custom settings supported by OpenCode (those configured in opencode.json), and you can also configure additional settings specifically for Oh My OpenCode as shown below. +Oh My OpenCode adds refactoring tools (rename, code actions). +All OpenCode LSP configs and custom settings (from opencode.json) are supported, plus additional Oh My OpenCode-specific settings. -You can configure additional LSP servers via the `lsp` option in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: +Add LSP servers via the `lsp` option in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: ```json { @@ -552,29 +520,46 @@ You can configure additional LSP servers via the `lsp` option in `~/.config/open Each server supports: `command`, `extensions`, `priority`, `env`, `initialization`, `disabled`. + ## Author's Note -Install Oh My OpenCode. Do not waste time configuring OpenCode from scratch. -I have resolved the friction so you don't have to. The answers are in this plugin. If OpenCode is Arch Linux, Oh My OpenCode is [Omarchy](https://omarchy.org/). +Install Oh My OpenCode. -Enjoy the multi-model stability and rich feature set that other harnesses promise but fail to deliver. -I will continue testing and updating here. I am the primary user of this project. +I've used LLMs worth $24,000 tokens purely for personal development. +Tried every tool out there, configured them to death. OpenCode won. -- Who possesses the best raw logic? -- Who is the debugging god? +The answers to every problem I hit are baked into this plugin. Just install and go. +If OpenCode is Debian/Arch, Oh My OpenCode is Ubuntu/[Omarchy](https://omarchy.org/). + + +Heavily influenced by [AmpCode](https://ampcode.com) and [Claude Code](https://code.claude.com/docs/overview)—I've ported their features here, often improved. And I'm still building. +It's **Open**Code, after all. + +Enjoy multi-model orchestration, stability, and rich features that other harnesses promise but can't deliver. +I'll keep testing and updating. I'm this project's most obsessive user. +- Which model has the sharpest logic? +- Who's the debugging god? - Who writes the best prose? - Who dominates frontend? - Who owns backend? - Which model is fastest for daily driving? - What new features are other harnesses shipping? -Do not overthink it. I have done the thinking. I will integrate the best practices. I will update this. -If this sounds arrogant and you have a superior solution, send a PR. You are welcome. +This plugin is the distillation of that experience. Just take the best. Got a better idea? PRs are welcome. -As of now, I have no affiliation with any of the projects or models mentioned here. This plugin is purely based on personal experimentation and preference. +**Stop agonizing over agent harness choices.** +**I'll do the research, borrow from the best, and ship updates here.** + +If this sounds arrogant and you have a better answer, please contribute. You're welcome. + +I have no affiliation with any project or model mentioned here. This is purely personal experimentation and preference. + +99% of this project was built using OpenCode. I tested for functionality—I don't really know how to write proper TypeScript. **But I personally reviewed and largely rewrote this doc, so read with confidence.** -I constructed 99% of this project using OpenCode. I focused on functional verification, and honestly, I don't know how to write proper TypeScript. **But I personally reviewed and comprehensively rewritten this documentation, so you can rely on it with confidence.** ## Warnings -- If you are on [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) or lower, OpenCode has a bug that might break config. - - [The fix](https://github.com/sst/opencode/pull/5040) was merged after 1.0.132, so use a newer version. +- Productivity might spike too hard. Don't let your coworker notice. + - Actually, I'll spread the word. Let's see who wins. +- If you're on [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) or older, an OpenCode bug may break config. + - [The fix](https://github.com/sst/opencode/pull/5040) was merged after 1.0.132—use a newer version. + - Fun fact: That PR was discovered and fixed thanks to OhMyOpenCode's Librarian, Explore, and Oracle setup.