Skip to content

Commit a6b2953

Browse files
Prefer roachdev wrapper for Claude CLI when available
If roachdev is on PATH (e.g. from cockroachlabs/roachdev action), create a claude wrapper that delegates to roachdev claude. Otherwise fall back to installing Claude CLI directly via the native installer. This lets enterprise callers use roachdev (with its caching and managed setup) while external callers still work without it. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
1 parent 04236db commit a6b2953

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

autosolve/assess/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,17 @@ outputs:
4949
runs:
5050
using: "composite"
5151
steps:
52-
- name: Install Claude CLI
52+
- name: Set up Claude CLI
5353
shell: bash
5454
run: |
55-
curl -fsSL https://claude.ai/install.sh | bash -s -- "$CLAUDE_CLI_VERSION"
56-
echo "Claude CLI installed: $(claude --version)"
55+
if command -v roachdev >/dev/null; then
56+
printf '#!/bin/sh\nexec roachdev claude -- "$@"\n' > /usr/local/bin/claude
57+
chmod +x /usr/local/bin/claude
58+
echo "Claude CLI: using roachdev wrapper"
59+
else
60+
curl --fail --silent --show-error --location https://claude.ai/install.sh | bash -s -- "$CLAUDE_CLI_VERSION"
61+
echo "Claude CLI installed: $(claude --version)"
62+
fi
5763
env:
5864
CLAUDE_CLI_VERSION: ${{ inputs.claude_cli_version }}
5965

autosolve/implement/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,17 @@ outputs:
111111
runs:
112112
using: "composite"
113113
steps:
114-
- name: Install Claude CLI
114+
- name: Set up Claude CLI
115115
shell: bash
116116
run: |
117-
curl -fsSL https://claude.ai/install.sh | bash -s -- "$CLAUDE_CLI_VERSION"
118-
echo "Claude CLI installed: $(claude --version)"
117+
if command -v roachdev >/dev/null; then
118+
printf '#!/bin/sh\nexec roachdev claude -- "$@"\n' > /usr/local/bin/claude
119+
chmod +x /usr/local/bin/claude
120+
echo "Claude CLI: using roachdev wrapper"
121+
else
122+
curl --fail --silent --show-error --location https://claude.ai/install.sh | bash -s -- "$CLAUDE_CLI_VERSION"
123+
echo "Claude CLI installed: $(claude --version)"
124+
fi
119125
env:
120126
CLAUDE_CLI_VERSION: ${{ inputs.claude_cli_version }}
121127

0 commit comments

Comments
 (0)