Move from docker compose run to a Python-managed container lifecycle. Each project now gets a dedicated container that is started on demand and stopped when opencode exits, instead of being recreated each time. Use a shared home directory across projects so configurations presist. The container are not destroyed, so tools and caches can be installed specifically for a project by opencode itself once and reused, while still avoiding long-running containers.
5 lines
156 B
Text
5 lines
156 B
Text
OPENCODE_CONTAINER_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
|
|
opencode() {
|
|
python3 "$OPENCODE_CONTAINER_DIR/opencode-container.py" "$@"
|
|
}
|