Releases: tcdw/opencode-profile
Releases · tcdw/opencode-profile
v0.6.0
v0.5.0
Changed
ocp runon unix now launches opencode as a child process instead of replacing the current process viasyscall.Exec. Signals (SIGINT, SIGTERM, SIGQUIT, SIGHUP) are forwarded to the child, and stdio is inherited as before. This enables post-exit housekeeping that was impossible when ocp ceased to exist after launch.
Added
- Post-exit credential sync: after opencode exits, any providers written to the XDG default data directory (
~/.local/share/opencode/auth.json,mcp-auth.json) are merged back into the profile's auth files. This fixes the long-standing issue whereopencode auth loginand/connectwould write credentials to the system-wide location instead of the profile, since opencode resolves its auth path fromXDG_DATA_HOMErather thanOPENCODE_CONFIG_DIR. Symlinked (linked-mode) profiles sync through to the shared base automatically.
v0.4.0
Changed
ocp runno longer overridesXDG_CONFIG_HOME,XDG_DATA_HOME,XDG_STATE_HOME, orXDG_CACHE_HOMEin the child environment. OnlyOPENCODE_CONFIG_DIR,OPENCODE_CONFIG, andOPENCODE_DBare set. This restores access to third-party tools (glab, gh, etc.) that rely on XDG directories for their own authentication tokens.
v0.3.0
Added
- Support
opencode.jsoncalongsideopencode.jsonacross profile creation, launch environment, TUI editors, and import/export bundles. Existing.jsoncfiles are preferred so a blank fallbackopencode.jsoncannot mask the real config. - Export/import validation for profile system prompts: bundles must include each profile's
AGENTS.md, while empty prompts remain valid for profiles that intentionally do not use a custom system prompt. - Creation-time hints when a profile inherits a non-empty live
AGENTS.md, plus clearer TUI wording for the seed/blank choice so copied system prompts are visible instead of surprising. - Windows-specific launch environment now exports explicit
OPENCODE_CONFIG_DIR,OPENCODE_CONFIG, andOPENCODE_DBpaths in addition to the XDG directories, matching opencode's config discovery more reliably on Windows. - Tests covering JSONC round-trips, missing profile config, missing
AGENTS.md, Windows symlink fallback behavior, and generated opencode environment variables.
Changed
- Profile creation preserves the live config filename extension when seeding from the current opencode config.
- Import/export preserves
opencode.jsoncentries instead of normalizing everything toopencode.json. - The TUI and CLI now resolve the active profile config through the same config lookup helper used by launch.
- Windows symlink failures during mode changes fall back to owned copies, matching the existing import/materialization behavior.
Fixed
- Custom providers and API-key settings were not initialized on Windows when the selected profile's config lived in
opencode.jsonc. - Export no longer silently skips profiles whose opencode config is missing.
- Import no longer creates profiles with an empty placeholder config or prompt when the bundle is missing required profile files.
- Release workflow compatibility was updated for newer GitHub Actions runtime behavior.
v0.2.0
Added
ocp exportandocp import: move profiles between machines through a single
portable, encrypted.zipbundle — the groundwork for cross-platform (Windows)
use. Config (opencode.json,AGENTS.md, skills) travels in plaintext, while
secrets (auth.json,mcp-auth.json,*.key) are packed into one AES-256-GCM
secrets.encblob whose key is derived from a passphrase via PBKDF2. Supply the
passphrase interactively or withOCP_PASSPHRASE.- Windows launch support: opencode is started as a child process (stdio and
environment forwarded, exit code mirrored), since unix-styleexec()process
replacement is not available on Windows.
Changed
- The launch handoff is now platform-split:
syscall.Execon unix and
child-process execution on Windows (internal/launch/exec_{unix,windows}.go). - A
linkeddomain automatically degrades to an owned copy when the filesystem
refuses symlinks (e.g. Windows without the symlink privilege), so import never
leaves a profile half-built.
Security
- Bundles never store secrets in their plaintext region. Export warns when
opencode.jsonholds a literal API key instead of a{file:}/{env:}
reference, and import guards against path traversal (zip-slip) while rewriting
absolute{file:}paths to the target machine's store root.