Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,21 @@ OpenCode가 설치되어 있지 않다면, [OpenCode 설치 가이드](https://o
```bash
mkdir -p ~/.config/opencode
Comment on lines 149 to 150
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the PR description, this update adds support for JSONC (JSON with Comments) files. Consider adding a brief note at the beginning of this code block explaining that users can use either opencode.json or opencode.jsonc, and that JSONC allows adding comments to configuration files. This would help users understand the benefit of the new feature.

Copilot uses AI. Check for mistakes.

if [ -f ~/.config/opencode/opencode.json ]; then
CONFIG_FILE=""
if [ -f ~/.config/opencode/opencode.jsonc ]; then
CONFIG_FILE=~/.config/opencode/opencode.jsonc
elif [ -f ~/.config/opencode/opencode.json ]; then
CONFIG_FILE=~/.config/opencode/opencode.json
fi

if [ -n "$CONFIG_FILE" ]; then
# 기존 설정 파일이 있는 경우: jq 또는 python으로 plugin 추가
if command -v jq &> /dev/null; then
jq '.plugin = ((.plugin // []) + ["oh-my-opencode"] | unique)' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
"$CONFIG_FILE" > /tmp/oc.json && \
mv /tmp/oc.json "$CONFIG_FILE"
else
echo "~/.config/opencode/opencode.json의 plugin 배열에 \"oh-my-opencode\"를 추가하세요"
echo "$CONFIG_FILE 의 plugin 배열에 \"oh-my-opencode\"를 추가하세요"
fi
else
# 새 설정 파일 생성
Expand All @@ -168,7 +175,7 @@ fi

```bash
opencode --version # 1.0.132 이상이어야 함
cat ~/.config/opencode/opencode.json # plugin 배열에 "oh-my-opencode"가 있어야 함
cat ~/.config/opencode/opencode.json 2>/dev/null || cat ~/.config/opencode/opencode.jsonc # plugin 배열에 "oh-my-opencode"가 있어야 함
```

### 4단계: 인증정보 설정
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,21 @@ If OpenCode isn't installed, check the [OpenCode Installation Guide](https://ope
```bash
mkdir -p ~/.config/opencode

if [ -f ~/.config/opencode/opencode.json ]; then
CONFIG_FILE=""
if [ -f ~/.config/opencode/opencode.jsonc ]; then
CONFIG_FILE=~/.config/opencode/opencode.jsonc
elif [ -f ~/.config/opencode/opencode.json ]; then
CONFIG_FILE=~/.config/opencode/opencode.json
fi

if [ -n "$CONFIG_FILE" ]; then
# Existing config: add plugin using jq or python
if command -v jq &> /dev/null; then
jq '.plugin = ((.plugin // []) + ["oh-my-opencode"] | unique)' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
"$CONFIG_FILE" > /tmp/oc.json && \
mv /tmp/oc.json "$CONFIG_FILE"
else
echo "Please add \"oh-my-opencode\" to the plugin array in ~/.config/opencode/opencode.json"
echo "Please add \"oh-my-opencode\" to the plugin array in $CONFIG_FILE"
fi
else
# Create new config
Expand All @@ -169,7 +176,7 @@ fi

```bash
opencode --version # Should be 1.0.132 or higher
cat ~/.config/opencode/opencode.json # Should contain "oh-my-opencode" in plugin array
cat ~/.config/opencode/opencode.json 2>/dev/null || cat ~/.config/opencode/opencode.jsonc # Should contain "oh-my-opencode" in plugin array
```

### Step 4: Configure Authentication
Expand Down