create-claude-workspace 1.1.49 → 1.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -340,7 +340,7 @@ function main() {
340
340
  info('Autonomous mode — isolated in Docker, --skip-permissions is safe.');
341
341
  info('Press Ctrl+C to stop after current iteration.');
342
342
  console.log('');
343
- compose(['run', '--rm', '-T', 'claude', '-c', `npx create-claude-workspace run ${escaped.join(' ')}`]);
343
+ compose(['run', '--rm', '-T', 'claude', '-c', `exec npx create-claude-workspace run ${escaped.join(' ')}`]);
344
344
  }
345
345
  }
346
346
  export { main as runDockerLoop, parseArgs, printHelp };
@@ -6,14 +6,29 @@ RUN apt-get update && \
6
6
 
7
7
 
8
8
  # Non-root user — Claude Code refuses --dangerously-skip-permissions as root
9
- # Passwordless sudo for on-demand CLI installs (gh, glab) by agents
10
- RUN apt-get update && apt-get install -y --no-install-recommends sudo && \
9
+ RUN apt-get update && apt-get install -y --no-install-recommends sudo gpg && \
11
10
  apt-get clean && rm -rf /var/lib/apt/lists/* && \
12
11
  useradd -m -s /bin/bash claude && \
13
12
  echo 'claude ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/claude && \
14
13
  mkdir -p /home/claude/.claude && \
15
14
  chown -R claude:claude /home/claude
16
15
 
16
+ # Install gh (GitHub CLI) from official apt repo
17
+ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
18
+ | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg && \
19
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
20
+ > /etc/apt/sources.list.d/github-cli.list && \
21
+ apt-get update && apt-get install -y --no-install-recommends gh && \
22
+ apt-get clean && rm -rf /var/lib/apt/lists/*
23
+
24
+ # Install glab (GitLab CLI) — latest .deb from GitLab releases
25
+ RUN GLAB_VER=$(curl -fsSL "https://gitlab.com/api/v4/projects/34675721/releases/permalink/latest" \
26
+ | node -pe 'JSON.parse(require("fs").readFileSync("/dev/stdin","utf8")).tag_name.slice(1)') && \
27
+ DEB_ARCH=$(dpkg --print-architecture) && \
28
+ curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VER}/downloads/glab_${GLAB_VER}_linux_${DEB_ARCH}.deb" \
29
+ -o /tmp/glab.deb && \
30
+ dpkg -i /tmp/glab.deb && rm /tmp/glab.deb
31
+
17
32
  # Install Claude Code natively as the claude user
18
33
  RUN gosu claude bash -c 'curl -fsSL https://claude.ai/install.sh | bash'
19
34
  ENV PATH="/home/claude/.local/bin:$PATH"
@@ -1,6 +1,8 @@
1
1
  services:
2
2
  claude:
3
3
  build: .
4
+ init: true
5
+ stop_grace_period: 30s
4
6
  stdin_open: true
5
7
  tty: true
6
8
  volumes:
@@ -36,6 +36,9 @@ if [[ -n "${GITLAB_TOKEN:-}" ]]; then
36
36
  git config --global credential.helper store
37
37
  echo "https://oauth2:${GITLAB_TOKEN}@gitlab.com" >> /home/claude/.git-credentials
38
38
  chown claude:claude /home/claude/.git-credentials
39
+ # Configure glab auth (glab reads GITLAB_TOKEN env var automatically,
40
+ # but explicit login ensures 'glab auth status' reports correctly)
41
+ gosu claude glab auth login --hostname gitlab.com --token "$GITLAB_TOKEN" 2>/dev/null || true
39
42
  fi
40
43
 
41
44
  # Auth pre-check — fail fast if no credentials available
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "1.1.49",
3
+ "version": "1.1.50",
4
4
  "description": "Scaffold a project with Claude Code agents for autonomous AI-driven development",
5
5
  "type": "module",
6
6
  "bin": {