Skip to content

Latest commit

 

History

History

opencode

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

OpenCode (with writable storage) (opencode)

Installs the OpenCode CLI and prepares a writable storage directory for its database

Example Usage

"features": {
    "ghcr.io/ksachdeva/devcontainer-features/opencode:1": {}
}

Options

Options Id Description Type Default Value
version @opencode/cli npm version to install. string latest
install Install the CLI. Set to false to only prepare the storage directory. boolean true

Database storage

This feature sets OPENCODE_DB to /opencode-storage/opencode.db and prepares /opencode-storage with write permissions for the remote user. It does not mount a volume. Without a mount, the database is stored in the container filesystem and will not persist when the container is recreated.

To persist the database, add a volume mount to your devcontainer.json:

"mounts": [
  "source=${localWorkspaceFolderBasename}-opencode,target=/opencode-storage,type=volume"
]

The mount target must be /opencode-storage to match OPENCODE_DB.

The CLI installation requires npm, for example from the ghcr.io/devcontainers/features/node feature.


Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.