chore: simplify and update claude code installation in ddev container
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
name: claude-code
|
|
||||||
repository: /Users/fromme/Development/Misc/ddev-claude-code
|
|
||||||
version: ""
|
|
||||||
install_date: "2026-01-07T09:27:36+01:00"
|
|
||||||
project_files:
|
|
||||||
- web-build/Dockerfile.claude-code
|
|
||||||
- commands/web/claude
|
|
||||||
- config.claude-code.yaml
|
|
||||||
- claude-code/.claude.json
|
|
||||||
- claude-code/.gitignore
|
|
||||||
global_files: []
|
|
||||||
removal_actions: []
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
name: claude
|
||||||
|
repository: /Users/fromme/Development/Misc/ddev-claude-code
|
||||||
|
version: ""
|
||||||
|
install_date: "2026-01-09T16:22:30+01:00"
|
||||||
|
project_files:
|
||||||
|
- commands/web/claude
|
||||||
|
- config.claude.yaml
|
||||||
|
global_files: []
|
||||||
|
removal_actions: []
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#ddev-generated
|
|
||||||
# Claude Code internal config
|
|
||||||
.claude.json
|
|
||||||
.claude/
|
|
||||||
@@ -1,10 +1,19 @@
|
|||||||
#ddev-generated
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## Description: Claude Code!
|
## Description: Run Claude Code
|
||||||
## Usage: claude
|
## Usage: claude [args]
|
||||||
## Example: ddev claude [...]
|
## Example: ddev claude
|
||||||
|
## Example: ddev claude --help
|
||||||
|
## Example: ddev claude doctor
|
||||||
|
|
||||||
set -e
|
# Ensure ~/.local/bin is in PATH
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
claude $@
|
# Check if claude is installed
|
||||||
|
if [ ! -f "$HOME/.local/bin/claude" ]; then
|
||||||
|
echo "Claude Code is not installed. Installing now..."
|
||||||
|
curl -fsSL https://claude.ai/install.sh | bash
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run claude with all arguments
|
||||||
|
exec "$HOME/.local/bin/claude" "$@"
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#ddev-generated
|
|
||||||
hooks:
|
|
||||||
post-start:
|
|
||||||
- exec: ">> /var/www/html/.ddev/claude-code/.claude.json && ln -s /var/www/html/.ddev/claude-code/.claude.json ~/.claude.json"
|
|
||||||
- exec: "mkdir -p /var/www/html/.ddev/claude-code/.claude && ln -s /var/www/html/.ddev/claude-code/.claude ~/.claude"
|
|
||||||
|
|
||||||
webimage_extra_packages:
|
|
||||||
- xdg-utils
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Claude Code add-on configuration
|
||||||
|
# This file is merged with your project's .ddev/config.yaml
|
||||||
|
|
||||||
|
hooks:
|
||||||
|
post-start:
|
||||||
|
- exec: "mkdir -p ~/.bashrc.d && test -f ~/.bashrc.d/claude.sh || echo 'export PATH=\"$HOME/.local/bin:$PATH\"' > ~/.bashrc.d/claude.sh && test -f ~/.local/bin/claude || curl -fsSL https://claude.ai/install.sh | bash"
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#ddev-generated
|
|
||||||
|
|
||||||
RUN npm install -g @anthropic-ai/claude-code
|
|
||||||
Reference in New Issue
Block a user