Add opencode init lifecycle support#495
Conversation
- add unix-only opencode detection wrapper and injectable helper - add dedicated opencode support prompt with non-interactive default no
- add cfg-paired opencode installation gate with unix prompt flow - run opencode detection after Claude settings patch handling completes
- add unix-only tests for config-directory and binary fallback behavior - verify focused detect_opencode tests and full cargo test suite pass
- Assert embedded plugin asset content for bash rewrite hooks - Define TempDir installer expectations for global and local plugin paths
- Embed the shipped TypeScript plugin for opencode bash rewrites - Add create-if-missing installer helpers with TempDir-backed coverage
- Lock global and local target selection behavior - Cover already-installed status messaging and skip rules
- Route post-init opencode setup through shared target selection helpers - Keep installs idempotent with explicit status messaging and verification guidance
- lock plugin export compatibility for named and default loaders - assert runtime command-shape helpers, diagnostics, and graceful fallbacks
- support named and default plugin exports plus alternate bash payload shapes - add env-gated diagnostics and refresh guidance for real-session rechecks
- search project target binaries and PATH when absolute RTK fallbacks miss - document the refreshed lookup path in install messaging for runtime rechecks
- lock helper-level target resolution for Claude, opencode, and both - cover selected-target-only execution and legacy mode dispatch without side effects
- prompt for Claude, opencode, or both before target-specific setup runs - route default init through explicit Claude and opencode runners with selected-target-only execution
- Lock official opencode global path helpers under config dir - Define red coverage for final combined summary and show output paths
- Route opencode global path reporting through the official ~/.config root - Add per-target outcome summaries and a combined final setup summary with concrete paths
- Cover create, append, idempotent, malformed, and removal behavior - Lock the fixed rtk-opencode marker contract before wiring setup flow
- Add fixed RTK opencode section content with marker-based upsert/remove helpers - Cover create, append, idempotent, malformed, and safe removal behavior in init tests
- Cover global AGENTS creation, already-configured, malformed safety, and show status - Lock marker-aware AGENTS reporting before wiring setup and show_config
- Install and report the global AGENTS section alongside the opencode plugin lifecycle - Make show_config detect AGENTS status from RTK markers instead of file existence alone
- cover uninstall cleanup for global and local plugin artifacts - lock show-config expectations for real plugin paths and AGENTS marker reporting
- remove RTK-managed opencode plugins from both supported scopes during uninstall - preserve AGENTS.md while stripping only the RTK section and report actual plugin locations in --show
- lock a dedicated `rtk uninstall` parse and help contract - keep `rtk init --uninstall` covered as a deprecated compatibility alias
- add a primary `rtk uninstall` surface while keeping the init alias deprecated - route both entrypoints through the existing uninstall cleanup behavior and updated guidance
- explain the shipped install, show, and uninstall flow in README - map plugin scope and global AGENTS handling in architecture docs Signed-off-by: young-macbook <dldixso@gmail.com>
- summarize AGENTS, show, and uninstall lifecycle updates in changelog - rerun the Phase 3 Rust gate to confirm the branch is PR-ready Signed-off-by: young-macbook <dldixso@gmail.com>
- promote rtk uninstall as the canonical doc surface - explain shared main-to-init uninstall routing and legacy alias behavior
- describe rtk uninstall as the shipped removal command - keep rtk init --uninstall documented as a deprecated compatibility alias
- remove the stale init-based uninstall command string from the older release note - keep the note historical so it no longer reads like the current uninstall UX
|
Hi! Thanks for the contribution! Since March 6, all PRs should target the Could you update the base branch? Click Edit at the top right of this PR and change it from Thanks! |
|
Thanks for the contribution! OpenCode support has been merged into |
|
|
|
Thanks for the contribution! This feature has already been integrated in the latest version (v0.33.1). Please verify with the latest release that everything works as expected on your side. Closing as already included — thanks! |
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
Summary
rtk initflows so RTK can set up Claude, opencode, or bothrtk uninstallto the canonical teardown command while keepingrtk init --uninstallas a compatibility alias, and align--showplus reviewer-facing docs with the shipped lifecycle