Welcome to my OpenCode command center! ✨
This repo gives you a clean, portable OpenCode setup with fast MCP controls inside OpenCode itself. Keep autonomous coding smooth, and only turn on external context when you actually need it. ⚡
- One source of truth for global OpenCode config.
- Token-aware workflow by keeping heavy MCPs disabled by default.
- Instant MCP toggling with
/mcpcommands in the OpenCode prompt. - Portable install with a one-liner script and symlinked default config path.
- Worktree-friendly repo so you can iterate on config safely in feature branches.
- 🧠 Built-in
/mcpcommand forstatus,enable, anddisable. - 🎛️ Built-in
/plugincommand to enable or disable plugins without editing JSON. - 🔔 Built-in
/notifycommand to tune notification behavior by level (all, channel, event, per-channel event). - 🧾 Built-in
/digestcommand for session snapshots and optional exit hooks. - 📡 Built-in
/telemetrycommand to manage LangGraph/local event forwarding. - ✅ Built-in
/post-sessioncommand to configure auto test/lint hooks on session end. - 🛡️ Built-in
/policycommand for strict/balanced/fast permission-risk presets. - 🧵 Built-in
/bgcommand for minimal background job orchestration and retrieval. - 🧱 Built-in
/refactor-litecommand for preflighted, safe-first refactor workflows. - 🩺 Built-in
/doctorumbrella command for one-shot health checks. - 💾 Built-in
/configcommand for backup/restore snapshots. - 🧩 Built-in
/stackbundles for coordinated multi-command profiles. - 🌐 Built-in
/browsercommand for provider switching and dependency diagnostics. - 🧠 Built-in
/nvimcommand to install and validate deeperopencode.nvimkeymap integration. - 🧰 Built-in
/devtoolscommand to manage external productivity tooling. - 💸 Better token control by enabling
context7/gh_greponly on demand. - 🔒 Autonomous-friendly permissions for trusted project paths.
- 🔁 Easy updates by rerunning the installer.
- 🧩 Clear, versioned config for experiments and rollbacks.
- Track upcoming orchestration features in
IMPLEMENTATION_ROADMAP.md.
@mohak34/opencode-notifier@latest- desktop and sound alerts for completion, errors, and permission prompts.opencode-supermemory- persistent memory across sessions.opencode-wakatime- tracks OpenCode coding activity and AI line changes in WakaTime.
github:kdcokenny/opencode-worktree- git worktree automation with terminal spawning for isolated agent sessions.github:JRedeker/opencode-morph-fast-apply- high-speed Morph Fast Apply edits for large or scattered code changes.
These two can fail to auto-resolve on some setups and are disabled by default. Enable them only when you want to test them.
instructions/shell_strategy.md- non-interactive shell strategy rules to avoid hangs and improve autonomous execution.
These are not managed by opencode.json plugins, but they pair well with this setup.
- Repo:
nickjvandyke/opencode.nvim - Best for editor-native OpenCode workflows (selection-aware prompts, statusline, and provider controls)
Minimal lazy.nvim setup:
{
"nickjvandyke/opencode.nvim",
config = function()
vim.o.autoread = true
vim.keymap.set({ "n", "x" }, "<leader>oa", function()
require("opencode").ask("@this: ", { submit = true })
end, { desc = "Ask opencode" })
vim.keymap.set({ "n", "x" }, "<leader>os", function()
require("opencode").select()
end, { desc = "Select opencode action" })
end,
}Quick verify inside Neovim:
:checkhealth opencodeUse OpenCode-native setup and diagnostics:
/nvim status
/nvim help
/nvim install minimal --link-init
/nvim install power --link-init
/nvim doctor
/nvim doctor --json
/nvim uninstall --unlink-init
Autocomplete-friendly shortcuts:
/nvim-help
/nvim-status
/nvim-install-minimal
/nvim-install-power
/nvim-doctor-json
Profiles:
minimal: two keymaps (<leader>oa,<leader>os) for fast ask/select loops.power: adds draft ask and health shortcuts for heavier editor-driven workflows.
Installed integration file path:
~/.config/nvim/lua/my_opencode/opencode.lua
When --link-init is used, the command appends:
require("my_opencode.opencode")to~/.config/nvim/init.lua.
- Repo:
btriapitsyn/openchamber - Best for visual session management, remote/browser access, and mobile continuation
Install and run:
npm install -g @openchamber/web
openchamber --port 3000Useful commands:
openchamber status
openchamber serve --daemon --port 3111
openchamber stop --port 3111opencode.nvim: recommended when your main loop is Neovim and you want context-rich editor prompts.OpenChamber: recommended when you want a richer visual layer over OpenCode sessions and remote access.- Keep both optional; core repo behavior remains terminal-first and fully functional without them.
Recommended baseline stack:
direnvfor per-project environment auto-loading (.envrc).gh-dashfor terminal-native GitHub issue/PR/check workflow.ripgrep-all(rga) for broad content search beyond plain source files.pre-commit+lefthookfor fast local hooks aligned with CI checks.
Use these directly in OpenCode:
/devtools status
/devtools help
/devtools install all
/devtools doctor
/devtools doctor --json
/devtools hooks-install
Autocomplete-friendly shortcuts:
/devtools-help
/devtools-install
/devtools-doctor-json
First-time shell setup for direnv (zsh):
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrcProject setup for direnv:
cp .envrc.example .envrc
direnv allowNotes:
- This repo ships
lefthook.ymland.pre-commit-config.yaml. gh-dashis installed as a GitHub CLI extension (gh extension install dlvhdr/gh-dash).- For Node-only repositories, Husky is also a valid alternative to Lefthook.
Run this from anywhere:
curl -fsSL https://raw.githubusercontent.com/dmoliveira/my_opencode/main/install.sh | bashCI/non-interactive mode:
curl -fsSL https://raw.githubusercontent.com/dmoliveira/my_opencode/main/install.sh | bash -s -- --non-interactiveRun guided setup/reconfigure wizard:
curl -fsSL https://raw.githubusercontent.com/dmoliveira/my_opencode/main/install.sh | bash -s -- --wizardRun wizard on an existing install:
~/.config/opencode/my_opencode/install.sh --wizard --reconfigureThis will:
- clone or update this repo into
~/.config/opencode/my_opencode - link
~/.config/opencode/opencode.jsonto this repo config - enable
/mcpcommand backend automatically - run a post-install self-check (
/mcp status,/plugin status,/notify status,/digest show,/telemetry status,/post-session status,/policy status,/config status,/bg status,/refactor-lite profile --scope scripts/*.py --dry-run --json,/stack status,/browser status,/doctor run,/plugin doctor)
git clone https://github.com/dmoliveira/my_opencode.git ~/.config/opencode/my_opencode
ln -sfn ~/.config/opencode/my_opencode/opencode.json ~/.config/opencode/opencode.json
chmod +x ~/.config/opencode/my_opencode/install.sh ~/.config/opencode/my_opencode/scripts/mcp_command.py
chmod +x ~/.config/opencode/my_opencode/scripts/plugin_command.py
chmod +x ~/.config/opencode/my_opencode/scripts/notify_command.py ~/.config/opencode/my_opencode/scripts/session_digest.py ~/.config/opencode/my_opencode/scripts/opencode_session.sh ~/.config/opencode/my_opencode/scripts/telemetry_command.py ~/.config/opencode/my_opencode/scripts/post_session_command.py ~/.config/opencode/my_opencode/scripts/policy_command.py ~/.config/opencode/my_opencode/scripts/doctor_command.py ~/.config/opencode/my_opencode/scripts/config_command.py ~/.config/opencode/my_opencode/scripts/stack_profile_command.py ~/.config/opencode/my_opencode/scripts/browser_command.py ~/.config/opencode/my_opencode/scripts/start_work_command.py ~/.config/opencode/my_opencode/scripts/install_wizard.py ~/.config/opencode/my_opencode/scripts/nvim_integration_command.py
chmod +x ~/.config/opencode/my_opencode/scripts/devtools_command.py
chmod +x ~/.config/opencode/my_opencode/scripts/background_task_manager.pyThe wizard lets each user decide what they want now and reconfigure later.
- Select plugin profile (
lean,stable,experimental, or custom plugin-by-plugin). - Select MCP, policy, telemetry, and post-session defaults.
- Select browser automation provider (
playwrightrecommended stable-first,agent-browseroptional). - Optionally install/uninstall ecosystem integrations (
opencode.nvim,OpenChamber). - When
opencode.nvimis selected, wizard bootstraps a minimal integration profile at~/.config/nvim/lua/my_opencode/opencode.lua. - Stable-first recommendation: keep
playwrightunless you specifically rely onagent-browserworkflows. - Re-run any time to change choices:
~/.config/opencode/my_opencode/install.sh --wizard --reconfigure. - Wizard state is stored in
~/.config/opencode/my_opencode-install-state.json.
Use these directly in OpenCode:
/stack status
/stack help
/stack apply focus
/stack apply research
/stack apply quiet-ci
Autocomplete-friendly shortcuts:
/stack-help
/stack-focus
/stack-research
/stack-quiet-ci
Profiles:
focus: notify focus, telemetry off, post-session disabled, policy strictresearch: notify all, telemetry local, post-session enabled withmake selftest, policy balancedquiet-ci: notify quiet + no complete event, telemetry off, post-session manualmake validate, policy strict
Use these directly in OpenCode:
/config status
/config layers
/config layers --json
/config backup
/config backup --name pre-upgrade
/config list
/config restore <backup-id>
Autocomplete-friendly shortcuts:
/config-help
/config-backup
/config-list
/config-layers
/config-layers-json
/config snapshots all opencode*.json files under ~/.config/opencode/ into ~/.config/opencode/my_opencode-backups/.
/config layers shows effective layered config precedence and selected write path.
/mcp, /plugin, /notify, /telemetry, /post-session, /policy, and /stack now resolve configuration with stable layered precedence:
OPENCODE_CONFIG_PATH(runtime override, highest priority).opencode/my_opencode.jsonc(project override).opencode/my_opencode.json~/.config/opencode/my_opencode.jsonc(user override)~/.config/opencode/my_opencode.json~/.config/opencode/opencode.jsonc(legacy user override)~/.config/opencode/opencode.json(legacy user override)- bundled
opencode.jsonfrom this repo (base)
Notes:
- Merge behavior is deep for objects and replace-on-write for arrays.
- JSONC files support comments and trailing commas.
- Writes target the highest-precedence existing config path (or
~/.config/opencode/opencode.jsonwhen no override exists). - Legacy per-command files remain supported for compatibility and env-var override use.
Use these directly in OpenCode:
/doctor run
/doctor run --json
/doctor help
Autocomplete-friendly shortcuts:
/doctor-json
/doctor-help
/doctor runs diagnostics across mcp, plugin, notify, digest, telemetry, post-session, policy, bg, and optional refactor-lite checks in one pass.
Use these directly in OpenCode:
/refactor-lite <target>
/refactor-lite <target> --scope scripts/*.py --dry-run --json
/refactor-lite <target> --scope scripts/*.py --run-selftest --json
Autocomplete-friendly shortcuts:
/refactor-lite-help
/refactor-lite-dry-run <target> --scope scripts/*.py
/refactor-lite backend behavior:
- runs deterministic preflight analysis (target search + file map)
- defaults to
--strategy safeguardrails - executes verification hooks on non-dry runs (
make validate, optionalmake selftest)
Strategies:
safe(default): blocks ambiguous broad targets unless scope is narrowed.balanced: broader analysis with the same verification expectations.aggressive: explicit opt-in for broad target analysis when ambiguity is acceptable.
Recommended flow:
- Start with
--dry-run --jsonand inspectpreflight.file_map. - Narrow with
--scopeuntil safe mode is deterministic. - Run without
--dry-runto enforce verification hooks.
Epic 4 starts with a minimal hook framework in scripts/hook_framework.py.
- Supported events:
PreToolUse,PostToolUse,Stop - Config section:
hooks.enabled,hooks.disabled,hooks.order - Deterministic ordering for each event:
- explicit
hooks.order - numeric
priority(ascending) - hook id (lexicographic)
- explicit
This baseline intentionally ships without default active hooks. Epic 4.2 adds concrete hook implementations.
Use these directly in OpenCode:
/hooks status
/hooks enable
/hooks disable
/hooks disable-hook truncate-safety
/hooks enable-hook truncate-safety
/hooks doctor
/hooks doctor --json
/hooks run continuation-reminder --json '{"checklist":["update docs","run tests"]}'
/hooks run truncate-safety --json '{"text":"...large output...","max_lines":120,"max_chars":8000}'
/hooks run error-hints --json '{"command":"git status","exit_code":128,"stderr":"fatal: not a git repository"}'
Autocomplete-friendly shortcut:
/hooks-help
/hooks-enable
/hooks-disable
/hooks-status
/hooks-doctor
/hooks-doctor-json
Hook behavior:
continuation-remindertriggers when checklist items remain unfinished.truncate-safetyclips oversized output and returns warnings with limits used.error-hintsmaps common failures (missing command/path, permission, git context, timeout) to actionable hints.
Governance controls:
- global toggle in config:
hooks.enabled - per-hook opt-out list:
hooks.disabled - telemetry-safe audit log:
~/.config/opencode/hooks/actions.jsonl - audit log records only metadata (hook id, category, triggered, exit status), not raw command output
Epic 5 starts with a schema contract in scripts/model_routing_schema.py and docs in
instructions/model_routing_schema.md.
Baseline categories:
quickdeepvisualwriting
Each category includes model, temperature, reasoning, verbosity, and description.
Fallback behavior is deterministic:
- unknown category ->
default_category - unavailable model ->
default_category
Fallback explanation contract (Epic 12 Task 12.1):
instructions/model_fallback_explanation_model.md- trace stages:
requested -> attempted -> selected - output levels:
compactandverbose - redaction policy for sensitive provider details
Resolution precedence (Task 5.2):
system_defaults- selected category defaults
- explicit user overrides
- model availability fallback (category -> system default)
Use:
/model-routing status
/model-routing set-category deep
/model-routing resolve --category deep --override-model openai/gpt-5.3-codex --json
/model-routing trace --json
/model-routing resolve now emits a structured fallback trace (requested -> attempted -> selected) and persists the latest trace for /model-routing trace debug introspection.
Routing command surface (Epic 12 Task 12.3):
/routing status
/routing explain --category deep --available-models openai/gpt-5-mini --json
Troubleshooting unexpected model selection:
- run
/routing explain --jsonand inspectfallback_reason - confirm
attempted_countis non-zero and reviewresolution_trace.attempted - verify available model set passed to resolve commands matches runtime availability
Model-profile aliases:
/model-profile status
/model-profile set visual
/model-profile resolve --category writing
Practical routing examples:
- Fast repo hygiene (
git status, light checks):quick - Architecture/debug planning and complex refactors:
deep - UI polish and design-heavy implementation notes:
visual - Changelogs, release notes, and long-form docs:
writing
Integration points:
/stack apply <profile>now sets a routing category (focus/research -> deep,quiet-ci -> quick).- install wizard supports
--model-profile <quick|deep|visual|writing>.
Use:
/browser status
/browser profile playwright
/browser profile agent-browser
/browser doctor --json
Provider trade-offs:
playwright: stable-first default and broad compatibility.agent-browser: optional path when your workflow depends on agent-browser tooling.
Recommended defaults:
- start with
playwright - switch to
agent-browseronly when you need those capabilities - run
/browser doctor --jsonafter changes to confirm dependency readiness
Wizard support:
install_wizard.pysupports--browser-profile <playwright|agent-browser>- interactive wizard includes the same provider choice during fresh setup and reconfigure
Epic 8 Task 8.2 adds a deterministic keyword detector engine:
- schema + precedence rules:
scripts/keyword_mode_schema.py - command wrapper:
scripts/keyword_mode_command.py - dictionary contract:
instructions/keyword_execution_modes.md
Use:
/keyword-mode status
/keyword-mode detect --prompt "safe-apply deep-analyze review this migration" --json
/keyword-mode apply --prompt "parallel-research deep-analyze inspect API usage" --json
/keyword-mode disable-keyword ulw
/keyword-mode enable-keyword ulw
/keyword-mode disable
/keyword-mode enable
/keyword-mode doctor --json
Detector behavior:
- case-insensitive keyword token matching (
ulw,deep-analyze,parallel-research,safe-apply) - deterministic precedence for conflicts (
safe-apply>deep-analyze>parallel-research>ulw) - prompt-level opt-out support (
no-keyword-modeandno-<keyword>tokens) - persisted runtime context via
keyword_modesconfig section (active_modes,effective_flags)
Examples:
- basic:
/keyword-mode apply --prompt "safe-apply review this migration" --json - intermediate:
/keyword-mode disable-keyword ulwthen/keyword-mode detect --prompt "ulw deep-analyze audit" --json - override path:
/keyword-mode detect --prompt "no-keyword-mode safe-apply deep-analyze" --json
Anti-patterns:
- avoid mixing contradictory intent keywords casually (
ulw+deep-analyze) unless you expect precedence conflict resolution. - avoid relying on partial words (
deeporsafe) because matching is exact-token only. - avoid forgetting local opt-outs in copied prompts;
no-keyword-modeintentionally disables all activation for that request.
Epic 9 introduces a rules engine for conditional instruction injection:
- schema contract:
instructions/conditional_rules_schema.md - team pack examples:
instructions/rules_team_pack_examples.md - engine implementation:
scripts/rules_engine.py - command wrapper:
scripts/rules_command.py
Use:
/rules status
/rules explain scripts/selftest.py --json
/rules disable-id style-python
/rules enable-id style-python
/rules doctor --json
Rules are discovered from:
- user scope:
~/.config/opencode/rules/**/*.md - project scope:
.opencode/rules/**/*.md
Precedence is deterministic: priority desc, then scope (project before user), then lexical rule id.
Recommended workflow:
- create project rules under
.opencode/rules/ - run
/rules statusafter edits to validate discovery - use
/rules explain <path> --jsonto verify effective rule stack before relying on behavior
Epic 14 Task 14.1 defines the baseline plan format and execution-state rules for the upcoming /start-work <plan> command:
- contract spec:
instructions/plan_artifact_contract.md - backend command:
scripts/start_work_command.py - format scope: markdown checklist + YAML metadata frontmatter
- validation scope: deterministic preflight failures with line-level remediation hints
- state model scope:
pending/in_progress/completed/failed/skippedwith strict transition semantics
Use:
/start-work path/to/plan.md --json
/start-work-bg path/to/plan.md
/bg run --id <job-id>
/start-work status --json
/start-work deviations --json
/start-work-doctor-json
Integration notes:
- use
/start-work-bgwhen you want queued, reviewable execution via the background subsystem before running/bg run /digest runnow includes aplan_executionrecap block (status, plan id, step counts, deviation count)/doctor runincludesstart-workhealth diagnostics for execution-state visibility
Epic 11 Task 11.1 defines the baseline policy schema for context-window resilience:
- schema contract:
instructions/context_resilience_policy_schema.md - tuning guide:
instructions/context_resilience_tuning.md - pruning engine:
scripts/context_resilience.py - command diagnostics:
scripts/context_resilience_command.py
Initial schema covers:
- truncation modes (
default,aggressive) - protected tools/messages to preserve critical evidence
- pruning/recovery notification levels (
quiet,normal,verbose)
Engine behavior currently includes:
- duplicate message pruning for repeated non-protected context entries
- superseded write pruning (older writes to same target path)
- stale error purging once newer successful command outcomes exist beyond threshold
- preservation of protected artifacts and latest command outcomes as critical evidence
- recovery planning with automatic resume hints, safe fallback steps, and pruning diagnostics
Use:
/resilience status --json
/resilience doctor --json
Use these directly in OpenCode:
/bg start -- python3 scripts/selftest.py
/bg status
/bg status <job-id>
/bg list
/bg list --status running
/bg read <job-id>
/bg cancel <job-id>
/bg cleanup
/bg doctor --json
/bg status --json
Autocomplete-friendly shortcuts:
/bg-help
/bg-list
/bg-running
/bg-doctor-json
/bg-status-json
/bg uses ~/.config/opencode/my_opencode/bg/ by default with:
jobs.jsonas authoritative stateruns/<job-id>.logfor combined stdout/stderrruns/<job-id>.meta.jsonfor execution metadata
Examples:
- Basic async start + read:
/bg start -- make validatethen/bg list --status runningand/bg read <job-id> - Intermediate queue workflow:
/bg enqueue -- make selftest,/bg enqueue -- make install-test, then/bg run --max-jobs 1 - Failure/recovery:
/bg start -- python3 -c "import time; time.sleep(5)" --timeout-seconds 1, inspect with/bg doctor --json, then/bg cleanup
Notification behavior:
- Background terminal states emit optional alerts through the existing notify stack (
notifyconfig event/channel rules). - Set
MY_OPENCODE_BG_NOTIFICATIONS_ENABLED=0to suppress background notifications without changing global notify settings.
Use these directly in OpenCode:
/mcp status
/mcp help
/mcp doctor
/mcp doctor --json
/mcp profile minimal
/mcp profile research
/mcp profile context7
/mcp profile ghgrep
/mcp enable context7
/mcp disable context7
/mcp enable gh_grep
/mcp disable gh_grep
/mcp enable all
/mcp disable all
MCP autocomplete-friendly shortcuts:
/mcp-help
/mcp-doctor
/mcp-doctor-json
/mcp-profile-minimal
/mcp-profile-research
/mcp-profile-context7
/mcp-profile-ghgrep
Use these directly in OpenCode:
/plugin status
/plugin help
/plugin doctor
/plugin doctor --json
/setup-keys
/plugin enable supermemory
/plugin disable supermemory
/plugin profile lean
/plugin profile stable
/plugin profile experimental
/plugin enable notifier
/plugin disable notifier
/plugin enable all
/plugin disable all
Autocomplete-friendly shortcuts:
/plugin-help
/plugin-enable-notifier
/plugin-enable-supermemory
/plugin-enable-wakatime
/plugin-enable-morph
/plugin-enable-worktree
/plugin-profile-lean
/plugin-profile-stable
/plugin-profile-experimental
/plugin-doctor-json
Supported plugin names: notifier, supermemory, morph, worktree, wakatime.
all applies only to the stable set: notifier, supermemory, wakatime.
/plugin doctor checks the current plugin setup and reports missing prerequisites before you enable additional plugins.
/plugin doctor --json (or /plugin-doctor-json) prints machine-readable diagnostics for automation.
/setup-keys prints exact environment/file snippets for missing API keys.
Profiles:
lean->notifierstable->notifier,supermemory,wakatimeexperimental->stable+morph,worktree
For Morph Fast Apply, set MORPH_API_KEY in your shell before enabling morph.
For WakaTime, configure ~/.wakatime.cfg with your api_key before enabling wakatime.
Use these directly in OpenCode:
/notify status
/notify help
/notify doctor
/notify doctor --json
/notify profile all
/notify profile quiet
/notify profile focus
/notify profile sound-only
/notify profile visual-only
/notify enable all
/notify disable all
/notify enable sound
/notify disable visual
/notify disable complete
/notify enable permission
/notify channel question sound off
/notify channel error visual on
Autocomplete-friendly shortcuts:
/notify-help
/notify-doctor
/notify-doctor-json
/notify-profile-all
/notify-profile-focus
/notify-sound-only
/notify-visual-only
/notify writes preferences into layered config under notify (or OPENCODE_NOTIFICATIONS_PATH when explicitly set):
- global:
enabled - channel:
sound.enabled,visual.enabled - event:
events.<type> - per-event channel:
channels.<type>.sound|visual
Use these directly in OpenCode:
/digest run --reason manual
/digest run --reason manual --run-post
/digest show
/digest doctor
/digest doctor --json
Autocomplete-friendly shortcuts:
/digest-run
/digest-run-post
/digest-show
/digest-doctor
/digest-doctor-json
The digest command writes to ~/.config/opencode/digests/last-session.json by default.
For automatic digest-on-exit behavior (including Ctrl+C), launch OpenCode through:
~/.config/opencode/my_opencode/scripts/opencode_session.shOptional environment variables:
MY_OPENCODE_DIGEST_PATHcustom output pathMY_OPENCODE_DIGEST_HOOKcommand to run after digest is writtenDIGEST_REASON_ON_EXITcustom reason label (defaultexit)
When --run-post is used, digest also evaluates post_session config and stores hook results in the digest JSON.
Use these directly in OpenCode:
/post-session status
/post-session enable
/post-session disable
/post-session set command make test
/post-session set timeout 120000
/post-session set run-on exit,manual
Autocomplete-friendly shortcuts:
/post-session-help
/post-session-enable
/post-session writes to layered config under post_session (or MY_OPENCODE_SESSION_CONFIG_PATH when explicitly set):
post_session.enabledpost_session.commandpost_session.timeout_mspost_session.run_on(exit,manual,idle)
Typical flow:
- Configure command with
/post-session set command <your-test-or-lint-command> - Enable with
/post-session enable - Use wrapper
opencode_session.shso command runs automatically on exit/Ctrl+C - Optionally run now with
/digest run --reason manual --run-post
Use these directly in OpenCode:
/policy status
/policy help
/policy profile strict
/policy profile balanced
/policy profile fast
Autocomplete-friendly shortcuts:
/policy-help
/policy-profile-strict
/policy-profile-balanced
/policy-profile-fast
/policy writes profile metadata to layered config under policy and applies notification posture under notify (legacy path env overrides remain supported).
Profiles:
strict: visual alerts for high-risk events, minimal noisebalanced: visual for all events, sound on risk-heavy eventsfast: all channels and events enabled for immediate feedback
Use these directly in OpenCode:
/telemetry status
/telemetry help
/telemetry doctor
/telemetry doctor --json
/telemetry profile off
/telemetry profile local
/telemetry profile errors-only
/telemetry set endpoint http://localhost:3000/opencode/events
/telemetry set timeout 1500
/telemetry enable error
/telemetry disable question
Autocomplete-friendly shortcuts:
/telemetry-help
/telemetry-doctor
/telemetry-doctor-json
/telemetry-profile-off
/telemetry-profile-local
/telemetry writes to layered config under telemetry (or OPENCODE_TELEMETRY_PATH when explicitly set) and supports:
- global on/off (
enabled) - endpoint URL (
endpoint) - timeout (
timeout_ms) - per-event toggles (
events.complete|error|permission|question)
For your LangGraph setup, default endpoint target is http://localhost:3000/opencode/events.
opencode.json- global OpenCode config (linked to default path)scripts/mcp_command.py- backend script for/mcpscripts/plugin_command.py- backend script for/pluginscripts/notify_command.py- backend script for/notifyscripts/session_digest.py- backend script for/digestscripts/opencode_session.sh- optional wrapper to run digest on process exitscripts/telemetry_command.py- backend script for/telemetryscripts/post_session_command.py- backend script for/post-sessionscripts/policy_command.py- backend script for/policyscripts/doctor_command.py- backend script for/doctorscripts/config_command.py- backend script for/configscripts/stack_profile_command.py- backend script for/stackscripts/browser_command.py- backend script for/browserscripts/start_work_command.py- backend script for/start-workscripts/install_wizard.py- interactive install/reconfigure wizardscripts/nvim_integration_command.py- backend script for/nvimscripts/devtools_command.py- backend script for/devtoolsscripts/config_layering.py- shared layered config + JSONC loader for command scriptsinstall.sh- one-step installer/updaterMakefile- common maintenance commands (make help).pre-commit-config.yaml- pre-commit hook definitionslefthook.yml- fast git hook runner config.envrc.example- direnv template for local environment variables.github/workflows/ci.yml- CI checks and installer smoke test
make help
make validate
make selftest
make doctor
make doctor-json
make devtools-status
make hooks-install
make install-test
make release-check
make release VERSION=0.1.1Tip: for local branch testing, installer accepts REPO_REF.
Happy shipping! 😄