Deduplicate colon-separated command name logic across all 4 targets
(opencode, droid, gemini, qwen) into a single resolveCommandPath()
helper in utils/files.ts.
Addresses review feedback on PR #251.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On Windows/NTFS, colons are reserved for alternate data streams, so
filenames like "ce:plan.md" are invalid. Split colon-separated command
names into nested directories (e.g. "ce:plan" -> "ce/plan.md"),
matching the approach already used by the Qwen target.
Applied to opencode, droid, and gemini targets.
Fixes#226
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The sync path's mergeJsonConfigAtKey had incoming entries overwriting
existing user entries on conflict. Reverse the spread order so user
config wins, matching the install path's existing behavior.
Also add merge feedback logging and a test for the sync merge path.
Fixes#125
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Before writing config.toml (Codex) or opencode.json (OpenCode), the CLI
attempts to create a timestamped backup of any existing config file.
This prevents accidental data loss when users have customized configs.
Backup is best-effort - if it fails (e.g., unusual permissions), the
install continues without blocking.
Backup files are named: config.toml.bak.2026-01-23T21-16-40-065Z
The OpenCode installer was writing to ~/.opencode but OpenCode expects
global configuration at ~/.config/opencode per XDG Base Directory spec.
Fixes:
- src/commands/install.ts: Change default output from ~/.opencode to
~/.config/opencode
- src/targets/opencode.ts: Recognize "opencode" basename (not just
".opencode") for direct writes without nesting
Closes#114🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>