Installs OpenCode with persistent configuration and session history.
- Installs the
opencodeCLI. - Automatically persists:
- Authentication (
~/.local/share/opencode/auth.json) - Session history and storage (
~/.local/share/opencode/storage) - Global configuration (
~/.config/opencode) - Prompt history and state (
~/.local/state/opencode) - Cache (
~/.cache/opencode)
- Authentication (
Add this feature to your devcontainer.json:
{
"features": {
"ghcr.io/zendril/features/opencode:1": {}
}
}version: Specify the version of OpenCode to install (default:latest).
Currently, the persistence mounts are hardcoded to /home/vscode. If you are using a custom user (e.g., ubuntu or a custom username) and need persistence for that user, please open a GitHub issue. We have a planned implementation for dynamic symlinking to support non-standard home directories but have not enabled it yet.