Personal opencode configuration, synced across machines via Git.
Where each repo path lands on the target machine:
repo/
├── AGENTS.md → ~/.config/opencode/AGENTS.md
├── opencode.jsonc → ~/.config/opencode/opencode.jsonc
├── opencode/
│ ├── agents/ → ~/.config/opencode/agents/
│ └── commands/ → ~/.config/opencode/commands/
├── tui.json → ~/.config/opencode/tui.json
├── .agents/ → ~/.agents/ (skills, installed via skills.sh)
└── .secrets/ → ~/.config/opencode/.secrets/ (gitignored — recreate locally)
Clone anywhere, then deploy files to the locations opencode reads them from.
Run the deploy script — it copies everything to the right places:
python install.pyIf you prefer to copy files by hand:
Copy these into your opencode config directory:
AGENTS.mdopencode.jsonc
cp AGENTS.md opencode.jsonc ~/.config/opencode/Custom agents and commands live in the opencode/ directory.
Copy the entire opencode/ folder so opencode picks them up:
cp -r opencode ~/.config/opencode/Skills live in .agents/skills (not ~/.config/opencode/skills) because they are installed from skills.sh, which installs to ~/.agents/skills and offers no option to change the directory.
Copy the .agents/ folder into your home directory so skills load globally:
cp -r .agents ~/tui.json holds keybinds and TUI preferences (theme, scroll, etc.). Copy it next to opencode.jsonc:
cp tui.json ~/.config/opencode/opencode.jsonc reads credentials via {file:...}:
Paths are relative to the config file, so create the folder next to opencode.jsonc:
mkdir -p ~/.config/opencode/.secrets
# One value per file, no trailing newline:
echo -n "https://your-endpoint" > ~/.config/opencode/.secrets/base_url
echo -n "your-api-key" > ~/.config/opencode/.secrets/api_key.secrets/ is gitignored — recreate it on every machine. Do not commit real keys.
Installed skills are tracked by .skill-lock.json (sources + hashes). To add or update a skill, use opencode's skill install command; commit the updated .skill-lock.json and any new SKILL.md files so other machines pull the same versions.