From 7d392ecbb22f9c286afa7d1f9380f901eca5b4b5 Mon Sep 17 00:00:00 2001 From: Serhii Dziupin Date: Sun, 9 Aug 2026 09:57:17 +0000 Subject: [PATCH 1/2] chore: clarify Cloud Agent install as multi-line idempotent script Use frozen bun lockfile installs and line-oriented install/start so environment setup is easier to read and rebuild. Co-authored-by: Serhii Dziupin --- .cursor/environment.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cursor/environment.json b/.cursor/environment.json index bed3de6..47230db 100644 --- a/.cursor/environment.json +++ b/.cursor/environment.json @@ -1,5 +1,5 @@ { "name": "opencode-commandcode", - "install": "export PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\" && (command -v bun >/dev/null || curl -fsSL https://bun.sh/install | bash) && (command -v opencode >/dev/null || curl -fsSL https://opencode.ai/install | bash) && npm config set prefix \"$HOME/.local\" && npm i -g command-code@latest && bun install && bun run build", - "start": "export PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\" && echo \"command-code=$(command-code --version 2>/dev/null || cmd --version)\" && echo \"opencode=$(opencode --version)\" && echo \"bun=$(bun --version)\"" + "install": "export PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\"\ncommand -v bun >/dev/null || curl -fsSL https://bun.sh/install | bash\ncommand -v opencode >/dev/null || curl -fsSL https://opencode.ai/install | bash\nnpm config set prefix \"$HOME/.local\"\nnpm i -g command-code@latest\nbun install --frozen-lockfile\nbun run build", + "start": "export PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\"\necho \"command-code=$(command-code --version 2>/dev/null || cmd --version)\"\necho \"opencode=$(opencode --version)\"\necho \"bun=$(bun --version)\"" } From 164fe5e74fc195d156cf818ba7874d97daf315ef Mon Sep 17 00:00:00 2001 From: Serhii Dziupin Date: Sun, 9 Aug 2026 10:01:25 +0000 Subject: [PATCH 2/2] fix: install command-code via bun in Cloud Agent setup Avoid relying on nvm npm (often missing from PATH during builds). Use `bun add -g command-code@latest` with set -e so install fails closed. Co-authored-by: Serhii Dziupin --- .cursor/environment.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cursor/environment.json b/.cursor/environment.json index 47230db..7d9d1c9 100644 --- a/.cursor/environment.json +++ b/.cursor/environment.json @@ -1,5 +1,5 @@ { "name": "opencode-commandcode", - "install": "export PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\"\ncommand -v bun >/dev/null || curl -fsSL https://bun.sh/install | bash\ncommand -v opencode >/dev/null || curl -fsSL https://opencode.ai/install | bash\nnpm config set prefix \"$HOME/.local\"\nnpm i -g command-code@latest\nbun install --frozen-lockfile\nbun run build", + "install": "set -euo pipefail\nexport PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\"\ncommand -v bun >/dev/null || curl -fsSL https://bun.sh/install | bash\nexport PATH=\"$HOME/.bun/bin:$PATH\"\ncommand -v opencode >/dev/null || curl -fsSL https://opencode.ai/install | bash\nbun add -g command-code@latest\nbun install --frozen-lockfile\nbun run build", "start": "export PATH=\"$HOME/.local/bin:$HOME/.bun/bin:$HOME/.opencode/bin:$PATH\"\necho \"command-code=$(command-code --version 2>/dev/null || cmd --version)\"\necho \"opencode=$(opencode --version)\"\necho \"bun=$(bun --version)\"" }