Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

feat(opencode): add OpenCode integration (activity tracking, plugin, config) (#1807)

Axel H.4ef64c47adbb
diff --git a/.config/lychee.toml b/.config/lychee.toml
index 614009a03..3f2962a65 100644
--- a/.config/lychee.toml
+++ b/.config/lychee.toml
@@ -74,4 +74,7 @@ exclude = [
# Local dev server URLs (not running during CI)
"127\\.0\\.0\\.1",
"localhost",
+
+ # Not yet on main (remove after first release with dev/opencode-plugin.ts)
+ "github\\.com/max-sixty/worktrunk/tree/main/dev/opencode-plugin\\.ts",
]
diff --git a/Taskfile.yaml b/Taskfile.yaml
index fd9366659..3bff1359d 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -300,7 +300,7 @@ tasks:
echo "Done! Fixture at: tests/fixtures/standard/"
bench-llm-commits:
- desc: Benchmark LLM commit message tools (claude, llm, aichat, codex)
+ desc: Benchmark LLM commit message tools (claude, llm, aichat, codex, opencode)
silent: true
cmds:
- |
@@ -389,13 +389,14 @@ tasks:
COMMANDS["llm"]='llm -m claude-haiku-4.5'
COMMANDS["aichat"]='aichat -m claude:claude-haiku-4.5'
COMMANDS["codex"]='codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='"'"'low'"'"' -c system_prompt='"'"''"'"' --sandbox=read-only --json - | jq -sr '"'"'[.[] | select(.item.type? == "agent_message")] | last.item.text'"'"''
+ COMMANDS["opencode"]='opencode run -m anthropic/claude-haiku-4.5 --variant fast'
# Check which tools are available
echo "=== LLM Commit Message Benchmark ==="
echo ""
echo "Checking available tools..."
AVAILABLE=()
- for tool in claude llm aichat codex; do
+ for tool in claude llm aichat codex opencode; do
if command -v "$tool" &>/dev/null; then
echo " βœ“ $tool"
AVAILABLE+=("$tool")
@@ -417,6 +418,7 @@ tasks:
echo " llm: uv tool install llm llm-anthropic"
echo " aichat: https://github.com/sigoden/aichat"
echo " codex: npm install -g @openai/codex"
+ echo " opencode: https://opencode.ai/download"
exit 1
fi
diff --git a/dev/config.example.toml b/dev/config.example.toml
index 9c7f5c888..1274903d5 100644
--- a/dev/config.example.toml
+++ b/dev/config.example.toml
@@ -53,7 +53,7 @@
# [commit.generation]
# command = "codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"
#
-# ### opencode
+# ### OpenCode
#
# [commit.generation]
# command = "opencode run -m anthropic/claude-haiku-4.5 --variant fast"
diff --git a/dev/opencode-plugin.ts b/dev/opencode-plugin.ts
new file mode 100644
index 000000000..c3ca701a0
--- /dev/null
+++ b/dev/opencode-plugin.ts
@@ -0,0 +1,28 @@
+// Worktrunk activity tracking plugin for OpenCode.
+//
+// Tracks OpenCode session activity per branch, showing status markers in `wt list`:
+// πŸ€– β€” agent is working
+// πŸ’¬ β€” agent is waiting for input
+//
+// Installed globally via: wt config plugins opencode install
+// Or manually: copy to ~/.config/opencode/plugins/worktrunk.ts
+
+import type { Plugin } from "@opencode-ai/plugin";
+
+export default (async ({ $ }) => {
+ return {
+ event: async ({ event }) => {
+ switch (event.type) {
+ case "session.status":
+ await $`wt config state marker set πŸ€– || true`.quiet();
+ break;
+ case "session.idle":
+ await $`wt config state marker set πŸ’¬ || true`.quiet();
+ break;
+ case "session.deleted":
+ await $`wt config state marker clear || true`.quiet();
+ break;
+ }
+ },
+ };
+}) satisfies Plugin;
diff --git a/docs/content/config.md b/docs/content/config.md
index 5f90b08ac..52ae2748e 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -127,7 +127,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence
command = "codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"
```
-### opencode
+### OpenCode
```toml
[commit.generation]
@@ -756,7 +756,7 @@ bugfix πŸ€–!↑⇑ ~/code/myproject.bugfix
### Use cases
- **Work status** β€” `🚧` WIP, `βœ…` ready for review, `πŸ”₯` urgent
-- **Agent tracking** β€” The [Claude Code plugin](@/claude-code.md) sets markers automatically
+- **Agent tracking** β€” The [Claude Code](@/claude-code.md) plugin sets markers automatically
- **Notes** β€” Any short text: `"blocked"`, `"needs tests"`
### Storage
diff --git a/docs/content/tips-patterns.md b/docs/content/tips-patterns.md
index 4ce022d35..d153a2c1c 100644
--- a/docs/content/tips-patterns.md
+++ b/docs/content/tips-patterns.md
@@ -133,15 +133,15 @@ Then `wt step mc` opens an editor for the commit message while plain `wt merge`
## Track agent status
-Custom emoji markers show agent state in `wt list`. The Claude Code plugin sets these automatically:
+Custom emoji markers show agent state in `wt list`. The [Claude Code](@/claude-code.md) plugin and [OpenCode plugin](https://github.com/max-sixty/worktrunk/tree/main/dev/opencode-plugin.ts) set these automatically:
```
+ feature-api ↑ πŸ€– ↑1 ./repo.feature-api
+ review-ui ? ↑ πŸ’¬ ↑1 ./repo.review-ui
```
-- `πŸ€–` β€” Claude is working
-- `πŸ’¬` β€” Claude is waiting for input
+- `πŸ€–` β€” Agent is working
+- `πŸ’¬` β€” Agent is waiting for input
Set status manually for any workflow:
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index 0f4059308..392525e63 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -126,7 +126,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence
command = "codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"
```
-### opencode
+### OpenCode
```toml
[commit.generation]
@@ -777,7 +777,7 @@ bugfix πŸ€–!↑⇑ ~/code/myproject.bugfix
### Use cases
- **Work status** β€” `🚧` WIP, `βœ…` ready for review, `πŸ”₯` urgent
-- **Agent tracking** β€” The [Claude Code plugin](https://worktrunk.dev/claude-code/) sets markers automatically
+- **Agent tracking** β€” The [Claude Code](https://worktrunk.dev/claude-code/) plugin sets markers automatically
- **Notes** β€” Any short text: `"blocked"`, `"needs tests"`
### Storage
diff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.md
index 647cdec71..2a73ecf20 100644
--- a/skills/worktrunk/reference/tips-patterns.md
+++ b/skills/worktrunk/reference/tips-patterns.md
@@ -128,15 +128,15 @@ Then `wt step mc` opens an editor for the commit message while plain `wt merge`
## Track agent status
-Custom emoji markers show agent state in `wt list`. The Claude Code plugin sets these automatically:
+Custom emoji markers show agent state in `wt list`. The [Claude Code](https://worktrunk.dev/claude-code/) plugin and [OpenCode plugin](https://github.com/max-sixty/worktrunk/tree/main/dev/opencode-plugin.ts) set these automatically:
```
+ feature-api ↑ πŸ€– ↑1 ./repo.feature-api
+ review-ui ? ↑ πŸ’¬ ↑1 ./repo.review-ui
```
-- `πŸ€–` β€” Claude is working
-- `πŸ’¬` β€” Claude is waiting for input
+- `πŸ€–` β€” Agent is working
+- `πŸ’¬` β€” Agent is waiting for input
Set status manually for any workflow:
diff --git a/src/cli/config.rs b/src/cli/config.rs
index 4d1608d51..639844fb5 100644
--- a/src/cli/config.rs
+++ b/src/cli/config.rs
@@ -155,6 +155,47 @@ Detects various forms of the integration pattern regardless of:
},
}
+#[derive(Subcommand)]
+pub enum ConfigPluginsOpencodeCommand {
+ /// Install the activity tracking plugin
+ #[command(
+ after_long_help = r#"Writes the worktrunk plugin to the OpenCode plugins directory.
+
+## Examples
+
+```console
+$ wt config plugins opencode install
+$ wt config plugins opencode install --yes
+```
+
+## Plugin location
+
+The plugin is written to `~/.config/opencode/plugins/worktrunk.ts`.
+Override with the `OPENCODE_CONFIG_DIR` environment variable."#
+ )]
+ Install {
+ /// Skip confirmation prompt
+ #[arg(short, long)]
+ yes: bool,
+ },
+
+ /// Remove the activity tracking plugin
+ #[command(
+ after_long_help = r#"Removes the worktrunk plugin from the OpenCode plugins directory.
+
+## Examples
+
+```console
+$ wt config plugins opencode uninstall
+```"#
+ )]
+ Uninstall {
+ /// Skip confirmation prompt
+ #[arg(short, long)]
+ yes: bool,
+ },
+}
+
#[derive(Subcommand)]
pub enum ApprovalsCommand {
/// Store approvals in approvals.toml
@@ -207,6 +248,28 @@ $ wt config plugins claude install-statusline
#[command(subcommand)]
action: ConfigPluginsClaudeCommand,
},
+
+ /// OpenCode plugin
+ #[command(
+ after_long_help = r#"Activity tracking plugin β€” shows status markers in `wt list`:
+- πŸ€– β€” agent is working
+- πŸ’¬ β€” agent is waiting for input
+
+## Examples
+
+```console
+$ wt config plugins opencode install
+$ wt config plugins opencode uninstall
+```
+
+## Plugin location
+
+Written to `~/.config/opencode/plugins/worktrunk.ts` (or `$OPENCODE_CONFIG_DIR/plugins/worktrunk.ts`)."#
+ )]
+ Opencode {
+ #[command(subcommand)]
+ action: ConfigPluginsOpencodeCommand,
+ },
}
#[derive(Subcommand)]
@@ -344,13 +407,14 @@ $ wt config update --yes
## Supported tools
-- **claude** β€” Claude Code plugin
+- **claude** β€” Claude Code plugin (activity tracking + statusline)
+- **opencode** β€” OpenCode plugin (activity tracking)
## Examples
```console
$ wt config plugins claude install
-$ wt config plugins claude uninstall
+$ wt config plugins opencode install
```"#
)]
Plugins {
@@ -520,7 +584,7 @@ bugfix πŸ€–!↑⇑ ~/code/myproject.bugfix
## Use cases
- **Work status** β€” `🚧` WIP, `βœ…` ready for review, `πŸ”₯` urgent
-- **Agent tracking** β€” The [Claude Code plugin](@/claude-code.md) sets markers automatically
+- **Agent tracking** β€” The [Claude Code](@/claude-code.md) plugin sets markers automatically
- **Notes** β€” Any short text: `"blocked"`, `"needs tests"`
## Storage
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index dc1c64e91..56f5f8165 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -5,8 +5,8 @@ mod step;
pub(crate) use config::{
ApprovalsCommand, CiStatusAction, ConfigCommand, ConfigPluginsClaudeCommand,
- ConfigPluginsCommand, ConfigShellCommand, DefaultBranchAction, HintsAction, LogsAction,
- MarkerAction, PreviousBranchAction, StateCommand, VarsAction,
+ ConfigPluginsCommand, ConfigPluginsOpencodeCommand, ConfigShellCommand, DefaultBranchAction,
+ HintsAction, LogsAction, MarkerAction, PreviousBranchAction, StateCommand, VarsAction,
};
pub(crate) use hook::HookCommand;
pub(crate) use list::ListSubcommand;
@@ -1698,7 +1698,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence
command = "codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"
```
-### opencode
+### OpenCode
```toml
[commit.generation]
diff --git a/src/commands/config/mod.rs b/src/commands/config/mod.rs
index 073df51ec..0d0617f64 100644
--- a/src/commands/config/mod.rs
+++ b/src/commands/config/mod.rs
@@ -4,6 +4,7 @@
mod create;
mod hints;
+pub mod opencode;
mod plugins;
mod show;
mod state;
@@ -12,6 +13,7 @@ mod update;
// Re-export public functions
pub use create::handle_config_create;
pub use hints::{handle_hints_clear, handle_hints_get};
+pub use opencode::{handle_opencode_install, handle_opencode_uninstall};
pub use plugins::{
handle_claude_install, handle_claude_install_statusline, handle_claude_uninstall,
};
diff --git a/src/commands/config/opencode.rs b/src/commands/config/opencode.rs
new file mode 100644
index 000000000..7fa2028ff
--- /dev/null
+++ b/src/commands/config/opencode.rs
@@ -0,0 +1,144 @@
+//! OpenCode plugin installation.
+//!
+//! Installs the worktrunk activity tracking plugin for OpenCode.
+//! The plugin source (`dev/opencode-plugin.ts`) is embedded in the binary via
+//! `include_str!()` and written to `${OPENCODE_CONFIG_DIR:-~/.config/opencode}/plugins/worktrunk.ts`.
+
+use std::path::PathBuf;
+
+use anyhow::{Context, Result};
+use color_print::cformat;
+use worktrunk::path::format_path_for_display;
+use worktrunk::styling::{eprintln, hint_message, info_message, success_message};
+
+use crate::output::prompt::{PromptResponse, prompt_yes_no_preview};
+
+/// The plugin source, embedded at compile time.
+const PLUGIN_SOURCE: &str = include_str!("../../../dev/opencode-plugin.ts");
+
+/// Resolve the OpenCode plugins directory.
+///
+/// Uses `$OPENCODE_CONFIG_DIR/plugins/` if set, otherwise `~/.config/opencode/plugins/`.
+fn opencode_plugins_dir() -> Result<PathBuf> {
+ let config_dir = if let Ok(dir) = std::env::var("OPENCODE_CONFIG_DIR") {
+ PathBuf::from(dir)
+ } else {
+ dirs::config_dir()
+ .context("Could not determine config directory")?
+ .join("opencode")
+ };
+ Ok(config_dir.join("plugins"))
+}
+
+/// Get the target path for the plugin file.
+pub fn plugin_path() -> Result<PathBuf> {
+ Ok(opencode_plugins_dir()?.join("worktrunk.ts"))
+}
+
+/// Check if the plugin is already installed with current content.
+pub fn is_plugin_installed() -> bool {
+ plugin_path()
+ .ok()
+ .and_then(|p| std::fs::read_to_string(p).ok())
+ .is_some_and(|content| content == PLUGIN_SOURCE)
+}
+
+/// Check if a plugin file exists (possibly outdated).
+pub fn plugin_file_exists() -> bool {
+ plugin_path().map(|p| p.exists()).unwrap_or(false)
+}
+
+/// Confirm an action via prompt, or accept automatically with `--yes`.
+fn confirm_or_yes(yes: bool, prompt: &str, preview: impl Fn()) -> Result<bool> {
+ Ok(yes || prompt_yes_no_preview(prompt, preview)? == PromptResponse::Accepted)
+}
+
+/// Handle `wt config plugins opencode install`.
+pub fn handle_opencode_install(yes: bool) -> Result<()> {
+ let target = plugin_path()?;
+ let target_display = format_path_for_display(&target);
+
+ // Check if already installed with current content
+ if target.exists()
+ && let Ok(existing) = std::fs::read_to_string(&target)
+ && existing == PLUGIN_SOURCE
+ {
+ eprintln!(
+ "{}",
+ info_message(cformat!(
+ "Plugin already installed @ <bold>{target_display}</>"
+ ))
+ );
+ return Ok(());
+ }
+
+ let action = if target.exists() { "Update" } else { "Install" };
+ let preview_msg = info_message(cformat!("Would write to <bold>{target_display}</>"));
+ let preview = || eprintln!("{}", preview_msg);
+
+ let confirmed = confirm_or_yes(
+ yes,
+ &cformat!("{action} OpenCode plugin @ <bold>{target_display}</>?"),
+ preview,
+ );
+ if !confirmed? {
+ return Ok(());
+ }
+
+ // Create parent directories if needed
+ let parent = target
+ .parent()
+ .context("Plugin path has no parent directory")?;
+ std::fs::create_dir_all(parent)
+ .with_context(|| format!("Failed to create directory {}", parent.display()))?;
+
+ // Write the plugin file
+ std::fs::write(&target, PLUGIN_SOURCE)
+ .with_context(|| format!("Failed to write plugin to {target_display}"))?;
+
+ eprintln!(
+ "{}",
+ success_message(cformat!("Plugin installed @ <bold>{target_display}</>"))
+ );
+ eprintln!(
+ "{}",
+ hint_message(cformat!(
+ "Activity markers (πŸ€–/πŸ’¬) will appear in <underline>wt list</>"
+ ))
+ );
+
+ Ok(())
+}
+
+/// Handle `wt config plugins opencode uninstall`.
+pub fn handle_opencode_uninstall(yes: bool) -> Result<()> {
+ let target = plugin_path()?;
+ let target_display = format_path_for_display(&target);
+
+ if !target.exists() {
+ eprintln!("{}", info_message("Plugin not installed"));
+ return Ok(());
+ }
+
+ let preview_msg = info_message(cformat!("Would remove <bold>{target_display}</>"));
+ let preview = || eprintln!("{}", preview_msg);
+
+ let confirmed = confirm_or_yes(
+ yes,
+ &cformat!("Remove OpenCode plugin @ <bold>{target_display}</>?"),
+ preview,
+ );
+ if !confirmed? {
+ return Ok(());
+ }
+
+ std::fs::remove_file(&target)
+ .with_context(|| format!("Failed to remove plugin at {target_display}"))?;
+
+ eprintln!(
+ "{}",
+ success_message(cformat!("Plugin removed from <bold>{target_display}</>"))
+ );
+
+ Ok(())
+}
diff --git a/src/commands/config/show.rs b/src/commands/config/show.rs
index f448eff55..cb2340df9 100644
--- a/src/commands/config/show.rs
+++ b/src/commands/config/show.rs
@@ -58,6 +58,12 @@ pub fn handle_config_show(full: bool) -> anyhow::Result<()> {
render_claude_code_status(&mut show_output)?;
}
+ // Render OpenCode status (only when opencode CLI is available)
+ if is_opencode_available() {
+ show_output.push('\n');
+ render_opencode_status(&mut show_output)?;
+ }
+
// Run full diagnostic checks if requested (includes slow network calls)
if full {
show_output.push('\n');
@@ -227,6 +233,46 @@ fn render_claude_code_status(out: &mut String) -> anyhow::Result<()> {
Ok(())
}
+/// Check if OpenCode CLI is available
+fn is_opencode_available() -> bool {
+ // Allow tests to override detection
+ if let Ok(val) = std::env::var("WORKTRUNK_TEST_OPENCODE_INSTALLED") {
+ return val == "1";
+ }
+ which::which("opencode").is_ok()
+}
+
+/// Render OPENCODE section (plugin status).
+/// Caller must check `is_opencode_available()` first.
+fn render_opencode_status(out: &mut String) -> anyhow::Result<()> {
+ writeln!(out, "{}", format_heading("OPENCODE", None))?;
+
+ // Plugin status
+ let plugin_installed = super::opencode::is_plugin_installed();
+ let plugin_exists = super::opencode::plugin_file_exists();
+ if plugin_installed {
+ writeln!(out, "{}", success_message("Plugin installed"))?;
+ } else if plugin_exists {
+ writeln!(
+ out,
+ "{}",
+ hint_message(cformat!(
+ "Plugin outdated. To update, run <underline>wt config plugins opencode install</>"
+ ))
+ )?;
+ } else {
+ writeln!(
+ out,
+ "{}",
+ hint_message(cformat!(
+ "Plugin not installed. To install, run <underline>wt config plugins opencode install</>"
+ ))
+ )?;
+ }
+
+ Ok(())
+}
+
/// Render OTHER section (version, hyperlinks)
fn render_runtime_info(out: &mut String) -> anyhow::Result<()> {
let cmd = crate::binary_name();
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 40dad6019..9d4b886c6 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -31,9 +31,9 @@ pub(crate) use alias::{AliasOptions, step_alias};
pub(crate) use config::{
handle_claude_install, handle_claude_install_statusline, handle_claude_uninstall,
handle_config_create, handle_config_show, handle_config_update, handle_hints_clear,
- handle_hints_get, handle_logs_get, handle_state_clear, handle_state_clear_all,
- handle_state_get, handle_state_set, handle_state_show, handle_vars_clear, handle_vars_get,
- handle_vars_list, handle_vars_set,
+ handle_hints_get, handle_logs_get, handle_opencode_install, handle_opencode_uninstall,
+ handle_state_clear, handle_state_clear_all, handle_state_get, handle_state_set,
+ handle_state_show, handle_vars_clear, handle_vars_get, handle_vars_list, handle_vars_set,
};
pub(crate) use configure_shell::{
handle_configure_shell, handle_show_theme, handle_unconfigure_shell,
diff --git a/src/main.rs b/src/main.rs
index 5e0997e92..05661cd95 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -50,9 +50,10 @@ use commands::{
add_approvals, clear_approvals, handle_claude_install, handle_claude_install_statusline,
handle_claude_uninstall, handle_completions, handle_config_create, handle_config_show,
handle_config_update, handle_configure_shell, handle_hints_clear, handle_hints_get,
- handle_hook_show, handle_init, handle_list, handle_logs_get, handle_merge, handle_promote,
- handle_rebase, handle_show_theme, handle_squash, handle_state_clear, handle_state_clear_all,
- handle_state_get, handle_state_set, handle_state_show, handle_switch, handle_unconfigure_shell,
+ handle_hook_show, handle_init, handle_list, handle_logs_get, handle_merge,
+ handle_opencode_install, handle_opencode_uninstall, handle_promote, handle_rebase,
+ handle_show_theme, handle_squash, handle_state_clear, handle_state_clear_all, handle_state_get,
+ handle_state_set, handle_state_show, handle_switch, handle_unconfigure_shell,
handle_vars_clear, handle_vars_get, handle_vars_list, handle_vars_set, resolve_worktree_arg,
run_hook, step_commit, step_copy_ignored, step_diff, step_eval, step_for_each, step_prune,
step_relocate,
@@ -61,9 +62,9 @@ use output::handle_remove_output;
use cli::{
ApprovalsCommand, CiStatusAction, Cli, Commands, ConfigCommand, ConfigPluginsClaudeCommand,
- ConfigPluginsCommand, ConfigShellCommand, DefaultBranchAction, HintsAction, HookCommand,
- ListSubcommand, LogsAction, MarkerAction, PreviousBranchAction, StateCommand, StepCommand,
- VarsAction,
+ ConfigPluginsCommand, ConfigPluginsOpencodeCommand, ConfigShellCommand, DefaultBranchAction,
+ HintsAction, HookCommand, ListSubcommand, LogsAction, MarkerAction, PreviousBranchAction,
+ StateCommand, StepCommand, VarsAction,
};
use worktrunk::HookType;
@@ -485,6 +486,10 @@ fn handle_plugins_command(action: ConfigPluginsCommand) -> anyhow::Result<()> {
handle_claude_install_statusline(yes)
}
},
+ ConfigPluginsCommand::Opencode { action } => match action {
+ ConfigPluginsOpencodeCommand::Install { yes } => handle_opencode_install(yes),
+ ConfigPluginsOpencodeCommand::Uninstall { yes } => handle_opencode_uninstall(yes),
+ },
}
}
diff --git a/src/output/commit_generation.rs b/src/output/commit_generation.rs
index 7b034ad8e..39ba83939 100644
--- a/src/output/commit_generation.rs
+++ b/src/output/commit_generation.rs
@@ -1,7 +1,7 @@
//! Commit generation prompt for first-time LLM setup.
//!
//! Prompts users to configure LLM commit message generation when they first
-//! attempt a commit without configuration. Detects available tools (claude, codex)
+//! attempt a commit without configuration. Detects available tools (claude, codex, opencode)
//! and offers to auto-configure the recommended settings.
use std::collections::HashMap;
@@ -28,6 +28,7 @@ static RECOMMENDED_COMMANDS: LazyLock<HashMap<String, String>> =
pub enum LlmTool {
Claude,
Codex,
+ OpenCode,
}
impl LlmTool {
@@ -36,6 +37,7 @@ impl LlmTool {
match self {
LlmTool::Claude => "claude",
LlmTool::Codex => "codex",
+ LlmTool::OpenCode => "opencode",
}
}
@@ -44,6 +46,7 @@ impl LlmTool {
match self {
LlmTool::Claude => "Claude Code",
LlmTool::Codex => "Codex",
+ LlmTool::OpenCode => "OpenCode",
}
}
@@ -121,20 +124,27 @@ fn format_command_for_display(command: &str) -> String {
toml::Value::String(command.to_string()).to_string()
}
-/// Detect available LLM tool on the system.
-///
-/// Checks for claude first (preferred), then codex.
-/// Returns None if neither is found.
-pub fn detect_llm_tool() -> Option<LlmTool> {
- if command_exists("claude") {
+/// Inner implementation that accepts a command checker for testability.
+fn detect_llm_tool_with(checker: impl Fn(&str) -> bool) -> Option<LlmTool> {
+ if checker("claude") {
Some(LlmTool::Claude)
- } else if command_exists("codex") {
+ } else if checker("codex") {
Some(LlmTool::Codex)
+ } else if checker("opencode") {
+ Some(LlmTool::OpenCode)
} else {
None
}
}
+/// Detect available LLM tool on the system.
+///
+/// Checks for claude first (preferred), then codex, then opencode.
+/// Returns None if none are found.
+pub fn detect_llm_tool() -> Option<LlmTool> {
+ detect_llm_tool_with(command_exists)
+}
+
/// Prompt for commit generation configuration.
///
/// Shows a one-time prompt when the user attempts to commit without LLM configuration.
@@ -240,12 +250,14 @@ mod tests {
fn test_llm_tool_command_name() {
assert_eq!(LlmTool::Claude.command_name(), "claude");
assert_eq!(LlmTool::Codex.command_name(), "codex");
+ assert_eq!(LlmTool::OpenCode.command_name(), "opencode");
}
#[test]
fn test_llm_tool_recommended_config() {
assert_snapshot!(LlmTool::Claude.recommended_config(), @"CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence --model=haiku --tools='' --disable-slash-commands --setting-sources='' --system-prompt=''");
assert_snapshot!(LlmTool::Codex.recommended_config(), @r#"codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == "agent_message")] | last.item.text'"#);
+ assert_snapshot!(LlmTool::OpenCode.recommended_config(), @"opencode run -m anthropic/claude-haiku-4.5 --variant fast");
}
#[test]
@@ -290,6 +302,7 @@ mod tests {
fn test_llm_tool_display() {
assert_eq!(format!("{}", LlmTool::Claude), "claude");
assert_eq!(format!("{}", LlmTool::Codex), "codex");
+ assert_eq!(format!("{}", LlmTool::OpenCode), "opencode");
}
#[test]
@@ -326,8 +339,23 @@ mod tests {
}
#[test]
- fn test_detect_llm_tool() {
- // Just exercise the function - result depends on what's installed
- let _ = detect_llm_tool();
+ fn test_detect_llm_tool_priority() {
+ // All commands exist β†’ Claude wins (highest priority)
+ assert_eq!(detect_llm_tool_with(|_| true), Some(LlmTool::Claude));
+
+ // Claude missing β†’ Codex wins
+ assert_eq!(
+ detect_llm_tool_with(|cmd| cmd != "claude"),
+ Some(LlmTool::Codex),
+ );
+
+ // Only OpenCode available
+ assert_eq!(
+ detect_llm_tool_with(|cmd| cmd == "opencode"),
+ Some(LlmTool::OpenCode),
+ );
+
+ // Nothing available
+ assert_eq!(detect_llm_tool_with(|_| false), None);
}
}
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 7a49095a1..d0a5243ae 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -715,6 +715,8 @@ pub fn configure_cli_command(cmd: &mut Command) {
cmd.env("RUST_LOG", "warn");
// Treat Claude as not installed by default (tests can override with "1")
cmd.env("WORKTRUNK_TEST_CLAUDE_INSTALLED", "0");
+ // Treat OpenCode as not installed by default (tests can override with "1")
+ cmd.env("WORKTRUNK_TEST_OPENCODE_INSTALLED", "0");
// Apply shared static env vars (see STATIC_TEST_ENV_VARS)
for &(key, value) in STATIC_TEST_ENV_VARS {
@@ -1012,6 +1014,9 @@ pub fn set_temp_home_env(cmd: &mut Command, home: &Path) {
// Windows: etcetera uses APPDATA for config_dir() (AppData\Roaming)
// Map it to .config to match Unix XDG_CONFIG_HOME behavior
cmd.env("APPDATA", home.join(".config"));
+ // OpenCode: override config dir to avoid platform-specific dirs::config_dir() differences
+ // (Linux: ~/.config, macOS: ~/Library/Application Support, Windows: AppData\Roaming)
+ cmd.env("OPENCODE_CONFIG_DIR", home.join("opencode-config"));
}
/// Override `WORKTRUNK_CONFIG_PATH` to point to the XDG-derived user config path
@@ -1060,6 +1065,8 @@ pub struct TestRepo {
mock_bin_path: Option<PathBuf>,
/// Whether Claude CLI should be treated as installed
claude_installed: bool,
+ /// Whether OpenCode CLI should be treated as installed
+ opencode_installed: bool,
/// Snapshot settings guard - keeps insta filters active for this repo's lifetime
_snapshot_guard: insta::internals::SettingsBindDropGuard,
}
@@ -1108,6 +1115,7 @@ impl TestRepo {
git_config_path,
mock_bin_path: None,
claude_installed: false,
+ opencode_installed: false,
_snapshot_guard: snapshot_guard,
};
@@ -1154,6 +1162,7 @@ impl TestRepo {
git_config_path,
mock_bin_path: None,
claude_installed: false,
+ opencode_installed: false,
_snapshot_guard: snapshot_guard,
};
@@ -1946,6 +1955,28 @@ impl TestRepo {
.unwrap();
}
+ /// Setup mock `opencode` CLI as installed
+ ///
+ /// Call this to simulate OpenCode being available on the system.
+ pub fn setup_mock_opencode_installed(&mut self) {
+ self.opencode_installed = true;
+ }
+
+ /// Setup the worktrunk plugin as installed in OpenCode
+ ///
+ /// Creates the worktrunk.ts plugin file in the OpenCode config directory.
+ /// Uses `opencode-config/plugins/` under temp_home, which aligns with the
+ /// `OPENCODE_CONFIG_DIR` env var set in `configure_wt_cmd()` and install/uninstall tests.
+ pub fn setup_opencode_plugin_installed(temp_home: &std::path::Path) {
+ let plugins_dir = temp_home.join("opencode-config/plugins");
+ std::fs::create_dir_all(&plugins_dir).unwrap();
+ std::fs::write(
+ plugins_dir.join("worktrunk.ts"),
+ include_str!("../../dev/opencode-plugin.ts"),
+ )
+ .unwrap();
+ }
+
/// Setup mock `claude` CLI with plugin subcommand support
///
/// Creates a mock claude binary that handles `plugin marketplace`,
@@ -2219,6 +2250,11 @@ impl TestRepo {
if self.claude_installed {
cmd.env("WORKTRUNK_TEST_CLAUDE_INSTALLED", "1");
}
+
+ // Override OpenCode installed status if setup_mock_opencode_installed() was called
+ if self.opencode_installed {
+ cmd.env("WORKTRUNK_TEST_OPENCODE_INSTALLED", "1");
+ }
}
/// Set a marker for a branch.
@@ -2398,6 +2434,8 @@ pub fn add_standard_env_redactions(settings: &mut insta::Settings) {
settings.add_redaction(".env.PATH", "[PATH]");
// Mock commands directory (temp path for mock gh/glab binaries)
settings.add_redaction(".env.MOCK_CONFIG_DIR", "[MOCK_CONFIG_DIR]");
+ // OpenCode config directory (platform-independent override for tests)
+ settings.add_redaction(".env.OPENCODE_CONFIG_DIR", "[TEST_OPENCODE_CONFIG]");
}
fn canonical_home_dir() -> Option<PathBuf> {
@@ -2864,7 +2902,8 @@ pub fn setup_home_snapshot_settings(temp_home: &TempDir) -> insta::Settings {
r"fatal: not a git repository \(or any[^\n]*(?:\n[^\n]*filesystem boundary[^\n]*)?",
"fatal: not a git repository [GIT_DISCOVERY_MSG]",
);
-
+ // Normalize thread IDs in panic messages (vary across runs)
+ settings.add_filter(r"thread '([^']+)' \(\d+\)", "thread '$1'");
add_standard_env_redactions(&mut settings);
settings
diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rs
index 8b6b1b2ff..2442f1699 100644
--- a/tests/integration_tests/config_show.rs
+++ b/tests/integration_tests/config_show.rs
@@ -1,6 +1,6 @@
use crate::common::{
- TestRepo, repo, set_temp_home_env, set_xdg_config_path, setup_snapshot_settings,
- setup_snapshot_settings_with_home, temp_home, wt_command,
+ TestRepo, repo, set_temp_home_env, set_xdg_config_path, setup_home_snapshot_settings,
+ setup_snapshot_settings, setup_snapshot_settings_with_home, temp_home, wt_command,
};
use insta_cmd::assert_cmd_snapshot;
use rstest::rstest;
@@ -2146,6 +2146,306 @@ fn test_config_show_statusline_configured(mut repo: TestRepo, temp_home: TempDir
});
}
+#[rstest]
+fn test_config_show_opencode_available_plugin_not_installed(
+ mut repo: TestRepo,
+ temp_home: TempDir,
+) {
+ // Setup mock gh/glab for deterministic output
+ repo.setup_mock_ci_tools_unauthenticated();
+ // Setup mock opencode as available (but plugin not installed)
+ repo.setup_mock_opencode_installed();
+
+ // Create global config
+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");
+ fs::create_dir_all(&global_config_dir).unwrap();
+ fs::write(
+ global_config_dir.join("config.toml"),
+ r#"worktree-path = "../{{ repo }}.{{ branch }}"
+"#,
+ )
+ .unwrap();
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ repo.configure_mock_commands(&mut cmd);
+ cmd.arg("config").arg("show").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+ set_xdg_config_path(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+#[rstest]
+fn test_config_show_opencode_plugin_installed(mut repo: TestRepo, temp_home: TempDir) {
+ // Setup mock gh/glab for deterministic output
+ repo.setup_mock_ci_tools_unauthenticated();
+ // Setup mock opencode CLI and plugin as installed
+ repo.setup_mock_opencode_installed();
+ TestRepo::setup_opencode_plugin_installed(temp_home.path());
+
+ // Create global config
+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");
+ fs::create_dir_all(&global_config_dir).unwrap();
+ fs::write(
+ global_config_dir.join("config.toml"),
+ r#"worktree-path = "../{{ repo }}.{{ branch }}"
+"#,
+ )
+ .unwrap();
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ repo.configure_mock_commands(&mut cmd);
+ cmd.arg("config").arg("show").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+ set_xdg_config_path(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+#[rstest]
+fn test_config_show_opencode_plugin_outdated(mut repo: TestRepo, temp_home: TempDir) {
+ // Setup mock gh/glab for deterministic output
+ repo.setup_mock_ci_tools_unauthenticated();
+ // Setup mock opencode CLI as installed
+ repo.setup_mock_opencode_installed();
+
+ // Write an outdated plugin file (different content from embedded source)
+ let plugins_dir = temp_home.path().join("opencode-config/plugins");
+ fs::create_dir_all(&plugins_dir).unwrap();
+ fs::write(
+ plugins_dir.join("worktrunk.ts"),
+ "// outdated plugin content\n",
+ )
+ .unwrap();
+
+ // Create global config
+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");
+ fs::create_dir_all(&global_config_dir).unwrap();
+ fs::write(
+ global_config_dir.join("config.toml"),
+ r#"worktree-path = "../{{ repo }}.{{ branch }}"
+"#,
+ )
+ .unwrap();
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ repo.configure_mock_commands(&mut cmd);
+ cmd.arg("config").arg("show").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+ set_xdg_config_path(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+// =============================================================================
+// OpenCode plugin install/uninstall
+// =============================================================================
+
+/// Fresh install writes the plugin to the expected path.
+#[rstest]
+fn test_opencode_install_creates_plugin(temp_home: TempDir) {
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ cmd.args(["config", "plugins", "opencode", "install", "--yes"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+
+ let canonical_home =
+ crate::common::canonicalize(temp_home.path()).unwrap_or_else(|_| temp_home.path().into());
+ let plugin_path = canonical_home.join("opencode-config/plugins/worktrunk.ts");
+ assert!(
+ plugin_path.exists(),
+ "Plugin file should exist after install"
+ );
+ let content = fs::read_to_string(&plugin_path).unwrap();
+ assert!(
+ content.contains("session.status"),
+ "Plugin should contain event handler"
+ );
+}
+
+/// When the plugin is already installed with current content, show info message.
+#[rstest]
+fn test_opencode_install_already_installed(temp_home: TempDir) {
+ // Pre-install the plugin
+ TestRepo::setup_opencode_plugin_installed(temp_home.path());
+
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ cmd.args(["config", "plugins", "opencode", "install", "--yes"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// When an outdated plugin exists, install replaces it with current content.
+#[rstest]
+fn test_opencode_install_updates_outdated(temp_home: TempDir) {
+ // Write an outdated plugin file
+ let canonical_home =
+ crate::common::canonicalize(temp_home.path()).unwrap_or_else(|_| temp_home.path().into());
+ let plugins_dir = canonical_home.join("opencode-config/plugins");
+ fs::create_dir_all(&plugins_dir).unwrap();
+ fs::write(plugins_dir.join("worktrunk.ts"), "// outdated\n").unwrap();
+
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ cmd.args(["config", "plugins", "opencode", "install", "--yes"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+
+ // Verify content was updated
+ let content = fs::read_to_string(plugins_dir.join("worktrunk.ts")).unwrap();
+ assert!(
+ content.contains("session.status"),
+ "Plugin should be updated to current content"
+ );
+}
+
+/// Uninstall removes the plugin file.
+#[rstest]
+fn test_opencode_uninstall_removes_plugin(temp_home: TempDir) {
+ // Pre-install the plugin
+ TestRepo::setup_opencode_plugin_installed(temp_home.path());
+ let canonical_home =
+ crate::common::canonicalize(temp_home.path()).unwrap_or_else(|_| temp_home.path().into());
+ let plugin_path = canonical_home.join("opencode-config/plugins/worktrunk.ts");
+ assert!(plugin_path.exists(), "Plugin should exist before uninstall");
+
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ cmd.args(["config", "plugins", "opencode", "uninstall", "--yes"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+
+ assert!(
+ !plugin_path.exists(),
+ "Plugin file should be removed after uninstall"
+ );
+}
+
+/// Uninstall when not installed shows info message.
+#[rstest]
+fn test_opencode_uninstall_not_installed(temp_home: TempDir) {
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ cmd.args(["config", "plugins", "opencode", "uninstall", "--yes"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// Install uses dirs::config_dir() fallback when OPENCODE_CONFIG_DIR is unset.
+///
+/// This exercises the `dirs::config_dir()` branch in `opencode_plugins_dir()`
+/// (lines 26-28 of opencode.rs). On Linux with XDG_CONFIG_HOME set, dirs
+/// resolves to `$XDG_CONFIG_HOME`, so the plugin lands at
+/// `{temp_home}/.config/opencode/plugins/worktrunk.ts`.
+///
+/// Linux-only: `dirs::config_dir()` resolves differently per platform
+/// (macOS: `~/Library/Application Support`, Windows: native API), making
+/// the path assertion platform-specific. The core install logic is tested
+/// cross-platform via `OPENCODE_CONFIG_DIR` in other tests.
+#[cfg(target_os = "linux")]
+#[rstest]
+fn test_opencode_install_uses_dirs_fallback(temp_home: TempDir) {
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ // Remove OPENCODE_CONFIG_DIR so the code falls through to dirs::config_dir()
+ cmd.env_remove("OPENCODE_CONFIG_DIR");
+ cmd.args(["config", "plugins", "opencode", "install", "--yes"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+
+ let canonical_home =
+ crate::common::canonicalize(temp_home.path()).unwrap_or_else(|_| temp_home.path().into());
+ // dirs::config_dir() uses XDG_CONFIG_HOME on Linux β†’ {temp_home}/.config
+ let plugin_path = canonical_home.join(".config/opencode/plugins/worktrunk.ts");
+ assert!(
+ plugin_path.exists(),
+ "Plugin file should exist at dirs::config_dir() fallback path: {}",
+ plugin_path.display()
+ );
+}
+
+/// Install prompt declined (no `--yes`, piped stdin β†’ empty β†’ declined).
+/// Exercises the `return Ok(())` branch at lines 83-84 of opencode.rs.
+#[rstest]
+fn test_opencode_install_prompt_declined(temp_home: TempDir) {
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ // No --yes, piped stdin sends empty β†’ prompt declines
+ cmd.args(["config", "plugins", "opencode", "install"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+
+ let canonical_home =
+ crate::common::canonicalize(temp_home.path()).unwrap_or_else(|_| temp_home.path().into());
+ let plugin_path = canonical_home.join("opencode-config/plugins/worktrunk.ts");
+ assert!(
+ !plugin_path.exists(),
+ "Plugin should NOT be installed when prompt is declined"
+ );
+}
+
+/// Uninstall prompt declined (no `--yes`, piped stdin β†’ empty β†’ declined).
+/// Exercises the `return Ok(())` branch at lines 129-130 of opencode.rs.
+#[rstest]
+fn test_opencode_uninstall_prompt_declined(temp_home: TempDir) {
+ // Pre-install the plugin so we reach the prompt
+ TestRepo::setup_opencode_plugin_installed(temp_home.path());
+ let canonical_home =
+ crate::common::canonicalize(temp_home.path()).unwrap_or_else(|_| temp_home.path().into());
+ let plugin_path = canonical_home.join("opencode-config/plugins/worktrunk.ts");
+ assert!(plugin_path.exists(), "Plugin should exist before test");
+
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ set_temp_home_env(&mut cmd, temp_home.path());
+ // No --yes, piped stdin sends empty β†’ prompt declines
+ cmd.args(["config", "plugins", "opencode", "uninstall"]);
+
+ assert_cmd_snapshot!(cmd);
+ });
+
+ assert!(
+ plugin_path.exists(),
+ "Plugin should still exist when uninstall prompt is declined"
+ );
+}
+
/// When $SHELL is not set but PSModulePath is, config show should display
/// "Detected shell: powershell" in the diagnostics and show the verification hint.
#[rstest]
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
index 78a8585ed..57a784cc4 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_claude_available_plugin_not_installed.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_claude_available_plugin_not_installed.snap
index cd37b6d95..cd0c047b9 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_claude_available_plugin_not_installed.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_claude_available_plugin_not_installed.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
index 425bca063..5ae57e85d 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
index 518c0c9db..82767602a 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap
index bfa462b63..831a3a2aa 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_empty_system_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_empty_system_config.snap
index a7d0663b4..724dd69b5 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_empty_system_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_empty_system_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_fish_outdated_wrapper.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_fish_outdated_wrapper.snap
index 531ee03ef..6e48a4350 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_fish_outdated_wrapper.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_fish_outdated_wrapper.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_fish_with_completions.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_fish_with_completions.snap
index 699d3c1ed..683fa88ce 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_fish_with_completions.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_fish_with_completions.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_fish_without_completions.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_fish_without_completions.snap
index ab393aca9..bc38c4fae 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_fish_without_completions.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_fish_without_completions.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap
index aa225d37f..0e467ce95 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap
index 3840d1a74..25ec43598 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap
@@ -21,6 +21,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_LATEST_VERSION: 0.33.0
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap
index 90b965436..258bc22e4 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap
@@ -21,6 +21,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_LATEST_VERSION: 0.33.0
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap
index 98965ea03..cfab2e581 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap
@@ -21,6 +21,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_LATEST_VERSION: 99.0.0
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap
index fc1a3741b..252041463 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap
@@ -21,6 +21,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_LATEST_VERSION: error
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_github_remote.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_github_remote.snap
index 15286d9ae..ecef0eeb8 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_github_remote.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_github_remote.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_gitlab_remote.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_gitlab_remote.snap
index 15286d9ae..ecef0eeb8 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_gitlab_remote.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_gitlab_remote.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_project_toml.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_project_toml.snap
index fa22ef2f3..a534ef295 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_project_toml.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_project_toml.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap
index 772740671..56000697e 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap
index 5f9c8d8c6..77a31c778 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_no_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_no_project_config.snap
index 15286d9ae..ecef0eeb8 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_no_project_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_no_project_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_no_user_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_no_user_config.snap
index f550992d0..34210f397 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_no_user_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_no_user_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_nushell_outdated_wrapper.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_nushell_outdated_wrapper.snap
index 3c9781b70..e90b54ee7 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_nushell_outdated_wrapper.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_nushell_outdated_wrapper.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_available_plugin_not_installed.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_available_plugin_not_installed.snap
new file mode 100644
index 000000000..7847f3338
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_available_plugin_not_installed.snap
@@ -0,0 +1,69 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - show
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "1"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+USER CONFIG @ ~/.config/worktrunk/config.toml
+  worktree-path = "../{{ repo }}.{{ branch }}"
+↳ Optional system config not found @ /etc/xdg/worktrunk/config.toml
+
+PROJECT CONFIG @ _REPO_/.config/wt.toml
+↳ Not found
+
+SHELL INTEGRATION
+β–² Shell integration not active
+  Invoked as: [PROJECT_ROOT]/target/debug/wt
+
+β—‹ bash: Skipped; ~/.bashrc not found
+β—‹ zsh: Skipped; ~/.zshrc not found
+β—‹ fish: Skipped; ~/.config/fish/functions not found
+β—‹ nu: Skipped; ~/.config/nushell/vendor/autoload not found
+
+OPENCODE
+↳ Plugin not installed. To install, run wt config plugins opencode install
+
+OTHER
+β—‹ wt: [VERSION]
+β—‹ git: [VERSION]
+β—‹ Hyperlinks: inactive
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_installed.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_installed.snap
new file mode 100644
index 000000000..52d4e08f3
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_installed.snap
@@ -0,0 +1,69 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - show
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "1"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+USER CONFIG @ ~/.config/worktrunk/config.toml
+  worktree-path = "../{{ repo }}.{{ branch }}"
+↳ Optional system config not found @ /etc/xdg/worktrunk/config.toml
+
+PROJECT CONFIG @ _REPO_/.config/wt.toml
+↳ Not found
+
+SHELL INTEGRATION
+β–² Shell integration not active
+  Invoked as: [PROJECT_ROOT]/target/debug/wt
+
+β—‹ bash: Skipped; ~/.bashrc not found
+β—‹ zsh: Skipped; ~/.zshrc not found
+β—‹ fish: Skipped; ~/.config/fish/functions not found
+β—‹ nu: Skipped; ~/.config/nushell/vendor/autoload not found
+
+OPENCODE
+βœ“ Plugin installed
+
+OTHER
+β—‹ wt: [VERSION]
+β—‹ git: [VERSION]
+β—‹ Hyperlinks: inactive
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_outdated.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_outdated.snap
new file mode 100644
index 000000000..8dbeee701
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_outdated.snap
@@ -0,0 +1,69 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - show
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "1"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+USER CONFIG @ ~/.config/worktrunk/config.toml
+  worktree-path = "../{{ repo }}.{{ branch }}"
+↳ Optional system config not found @ /etc/xdg/worktrunk/config.toml
+
+PROJECT CONFIG @ _REPO_/.config/wt.toml
+↳ Not found
+
+SHELL INTEGRATION
+β–² Shell integration not active
+  Invoked as: [PROJECT_ROOT]/target/debug/wt
+
+β—‹ bash: Skipped; ~/.bashrc not found
+β—‹ zsh: Skipped; ~/.zshrc not found
+β—‹ fish: Skipped; ~/.config/fish/functions not found
+β—‹ nu: Skipped; ~/.config/nushell/vendor/autoload not found
+
+OPENCODE
+↳ Plugin outdated. To update, run wt config plugins opencode install
+
+OTHER
+β—‹ wt: [VERSION]
+β—‹ git: [VERSION]
+β—‹ Hyperlinks: inactive
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_outside_git_repo.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_outside_git_repo.snap
index d373dc5f3..6956f2e6b 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_outside_git_repo.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_outside_git_repo.snap
@@ -15,6 +15,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -28,6 +29,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap
index 91e7e908c..12876d4c4 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -34,6 +35,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_plugin_installed.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_plugin_installed.snap
index 11fb084ea..189366947 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_plugin_installed.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_plugin_installed.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_powershell_detected_via_psmodulepath.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_powershell_detected_via_psmodulepath.snap
index 425525499..f7d2a5197 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_powershell_detected_via_psmodulepath.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_powershell_detected_via_psmodulepath.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: "C:\\Users\\user\\Documents\\PowerShell\\Modules"
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "1"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_shell_integration_active.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_shell_integration_active.snap
index 4d5c679ab..23f0e9d79 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_shell_integration_active.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_shell_integration_active.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -34,6 +35,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_statusline_configured.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_statusline_configured.snap
index ef2ac92e8..46f5b02a3 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_statusline_configured.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_statusline_configured.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap
index b2d218707..604492ff4 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
index fb15c37ac..90ee1714b 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_not_suppressed_by_wrapper.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_not_suppressed_by_wrapper.snap
index b70e10792..d7abc4226 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_not_suppressed_by_wrapper.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_not_suppressed_by_wrapper.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -34,6 +35,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_warning.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_warning.snap
index d81c8a937..50d2cb695 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_unmatched_candidate_warning.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -34,6 +35,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_project_keys.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_project_keys.snap
index 5411dd6f8..5d508010a 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_project_keys.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_project_keys.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_user_keys.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_user_keys.snap
index 7e729c2ee..8538d95f5 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_user_keys.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_user_keys.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap
index bfa462b63..831a3a2aa 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap
index 366c8e78c..849b2e3bf 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_with_system_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_with_system_config.snap
index 7de60a75e..bd0cdd637 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_with_system_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_with_system_config.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap
index 676a0e005..c9267991a 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -34,6 +35,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap
index e5488d82d..10a3c07c3 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -34,6 +35,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_install_already_installed.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_install_already_installed.snap
new file mode 100644
index 000000000..0d6607bc4
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_install_already_installed.snap
@@ -0,0 +1,43 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - install
+ - "--yes"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+β—‹ Plugin already installed @ ~/opencode-config/plugins/worktrunk.ts
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_install_creates_plugin.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_install_creates_plugin.snap
new file mode 100644
index 000000000..10e5aba5c
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_install_creates_plugin.snap
@@ -0,0 +1,44 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - install
+ - "--yes"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+βœ“ Plugin installed @ ~/opencode-config/plugins/worktrunk.ts
+↳ Activity markers (πŸ€–/πŸ’¬) will appear in wt list
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_install_prompt_declined.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_install_prompt_declined.snap
new file mode 100644
index 000000000..372a189ca
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_install_prompt_declined.snap
@@ -0,0 +1,43 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - install
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+
+❯ Install OpenCode plugin @ ~/opencode-config/plugins/worktrunk.ts? [y/N/?]
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_install_updates_outdated.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_install_updates_outdated.snap
new file mode 100644
index 000000000..10e5aba5c
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_install_updates_outdated.snap
@@ -0,0 +1,44 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - install
+ - "--yes"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+βœ“ Plugin installed @ ~/opencode-config/plugins/worktrunk.ts
+↳ Activity markers (πŸ€–/πŸ’¬) will appear in wt list
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_install_uses_dirs_fallback.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_install_uses_dirs_fallback.snap
new file mode 100644
index 000000000..4783853f2
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_install_uses_dirs_fallback.snap
@@ -0,0 +1,46 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - opencode
+ - install
+ - "--yes"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_BRANCH_ICON: ""
+ GIT_DIR_ICON: ""
+ GIT_REMOTE_BRANCH_ICON: ""
+ GIT_WORKTREE_ICON: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+βœ“ Plugin installed @ ~/.config/opencode/plugins/worktrunk.ts
+↳ Activity markers (πŸ€–/πŸ’¬) will appear in wt list
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_not_installed.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_not_installed.snap
new file mode 100644
index 000000000..f2cea6feb
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_not_installed.snap
@@ -0,0 +1,43 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - uninstall
+ - "--yes"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+β—‹ Plugin not installed
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_prompt_declined.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_prompt_declined.snap
new file mode 100644
index 000000000..3b6eabf12
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_prompt_declined.snap
@@ -0,0 +1,43 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - uninstall
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+
+❯ Remove OpenCode plugin @ ~/opencode-config/plugins/worktrunk.ts? [y/N/?]
diff --git a/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_removes_plugin.snap b/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_removes_plugin.snap
new file mode 100644
index 000000000..765f7aacc
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__opencode_uninstall_removes_plugin.snap
@@ -0,0 +1,43 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - plugins
+ - opencode
+ - uninstall
+ - "--yes"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_EDITOR: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+βœ“ Plugin removed from ~/opencode-config/plugins/worktrunk.ts
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__config_show_detects_fish_legacy_conf_d.snap b/tests/snapshots/integration__integration_tests__configure_shell__config_show_detects_fish_legacy_conf_d.snap
index 535ad204c..0722a146e 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__config_show_detects_fish_legacy_conf_d.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__config_show_detects_fish_legacy_conf_d.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__config_show_fish_legacy_with_functions_dir.snap b/tests/snapshots/integration__integration_tests__configure_shell__config_show_fish_legacy_with_functions_dir.snap
index 80b5d24f1..c9c83fac0 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__config_show_fish_legacy_with_functions_dir.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__config_show_fish_legacy_with_functions_dir.snap
@@ -20,6 +20,7 @@ info:
LC_ALL: C
MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PATH: "[PATH]"
PSModulePath: ""
RUST_LOG: warn
@@ -33,6 +34,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index fa50c6115..0ee040d50 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -9,7 +9,10 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "500"
- GIT_EDITOR: ""
+ GIT_BRANCH_ICON: ""
+ GIT_DIR_ICON: ""
+ GIT_REMOTE_BRANCH_ICON: ""
+ GIT_WORKTREE_ICON: ""
LANG: C
LC_ALL: C
NO_COLOR: ""
@@ -24,6 +27,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
---
@@ -112,7 +116,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
  # [commit.generation]
  # command = "codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"
  #
-  # ### opencode
+  # ### OpenCode
  #
  # [commit.generation]
  # command = "opencode run -m anthropic/claude-haiku-4.5 --variant fast"
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index 6a001b105..7db4f8e81 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -23,6 +23,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
---
@@ -158,7 +159,7 @@ Generate commit messages automatically during merge. Requires an external CLI to
  [commit.generation]
  command = "codex exec -m gpt-5.1-codex-mini -c model_reasoning_effort='low' -c system_prompt='' --sandbox=read-only --json - | jq -sr '[.[] | select(.item.type? == \"agent_message\")] | last.item.text'"
-opencode
+OpenCode
  [commit.generation]
  command = "opencode run -m anthropic/claude-haiku-4.5 --variant fast"
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_short.snap b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
index 80723e8d2..bdbd4aeb4 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
@@ -23,6 +23,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
---
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
index de0317c85..8b727be1e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
@@ -25,6 +25,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
---
diff --git a/tests/snapshots/integration__integration_tests__hook_show__error_with_context_formatting.snap b/tests/snapshots/integration__integration_tests__hook_show__error_with_context_formatting.snap
index b09f74d43..127fcf30f 100644
--- a/tests/snapshots/integration__integration_tests__hook_show__error_with_context_formatting.snap
+++ b/tests/snapshots/integration__integration_tests__hook_show__error_with_context_formatting.snap
@@ -16,6 +16,7 @@ info:
LANG: C
LC_ALL: C
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PSModulePath: ""
RUST_LOG: warn
SHELL: ""
@@ -28,6 +29,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_outside_git_repo.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_outside_git_repo.snap
index d48717734..d53c92212 100644
--- a/tests/snapshots/integration__integration_tests__hook_show__hook_show_outside_git_repo.snap
+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_outside_git_repo.snap
@@ -17,6 +17,7 @@ info:
LANG: C
LC_ALL: C
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PSModulePath: ""
RUST_LOG: warn
SHELL: ""
@@ -29,6 +30,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_outside_git_repo.snap b/tests/snapshots/integration__integration_tests__switch__switch_outside_git_repo.snap
index 7edfbe6c7..ca3540d38 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_outside_git_repo.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_outside_git_repo.snap
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
PSModulePath: ""
RUST_LOG: warn
SHELL: ""
@@ -30,6 +31,7 @@ info:
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"