This repository provides configuration files and helper scripts for OpenCode and Oh‑My‑OpenCode. It simplifies installing, configuring, and managing these tools on macOS or Linux.
- Homebrew installed (
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"). - Access to the internet to download Homebrew packages.
- Optional:
pandocif you wish to generate HTML documentation (brew install pandoc).
-
Install dependencies and tools
make install
This target runs the following sub‑targets:
opencode– installs the OpenCode CLI, copiesopencode.jsonto~/.config/opencode/, and installs the helper functions from.oc_functions.oh-my-opencode– installs Oh‑My‑OpenCode, Node.js, Bun, and a set of language servers, then registers theoh‑my‑opencodeplugin.skills– installs Vercel agent‑skills and theagent-browserskill.- (Later) runs linting and the placeholder test suite.
-
Configure the tools
The installation copies required configuration files into
~/.config/opencodeand appendssource ~/.oc_functionsto your shell startup files (~/.bashrc,~/.zshrc,~/.profile).Note: Ensure you export
OPENAI_API_KEYandOPENAI_BASE_URLin your environment (e.g., add them to~/.bashrc). -
Start using OpenCode
opencode
This launches the OpenCode CLI in the current directory.
The repository ships a small library of convenience functions that are sourced automatically after running make opencode.
oc_plugin <add|remove> <plugin-name>– Adds or removes a plugin name from thepluginarray in~/.config/opencode/opencode.json.oc– Runsopencodeafter ensuring theoh‑my‑opencodeplugin is disabled.omo– Enables theoh‑my‑opencodeplugin, selects an available port, and starts an OpenCode session inside a TMUX window (or directly if TMUX is not running). It also setsOPENCODE_PORTfor the session.
These helpers simplify switching between a plain OpenCode environment and the feature‑rich Oh‑My‑OpenCode setup.
| Target | Description |
|---|---|
help |
Show a list of available make targets. |
opencode |
Install OpenCode, copy configuration, and install the .oc_functions helpers. |
oh-my-opencode |
Install Oh‑My‑OpenCode, Node.js, Bun, language servers, and register the Oh‑My‑OpenCode plugin. |
skills |
Install Vercel agent‑skills and the agent-browser skill. |
install |
Run opencode, oh‑my‑opencode, and skills together (full environment setup). |
update |
Update Homebrew and upgrade installed formulas. |
test |
Placeholder for running the test suite. |
docs |
Generate HTML documentation from README.md using pandoc. |
lint |
Run optional linters: ShellCheck, jq for JSON, and markdownlint. |
clean |
Remove generated files such as node_modules, lock files, .sisyphus, and build artifacts. |
all |
Default no‑op target. |
make docs # Produces README.html from the markdown sourcemake lint # Runs shellcheck, jq, and markdownlint if they are installedmake clean # Deletes generated files and directoriesContributions are welcome. Since this repository mainly contains configuration files, please ensure any changes maintain compatibility across supported platforms. Feel free to open issues or pull requests to improve documentation, add new make targets, or enhance existing scripts.