Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ A modern Python project template with best practices for development and collabo
- 🔍 Type checking with [mypy](https://github.com/python/mypy)
- 🧪 Testing with [pytest](https://github.com/pytest-dev/pytest)
- 🐳 Docker support for development and deployment
- 🤖 Claude Code integration for AI-assisted development
- 👷 CI/CD with GitHub Actions

## Python Version
Expand Down Expand Up @@ -109,6 +110,34 @@ This creates a container with:
- Source code mounted (changes reflect immediately)
- Development tools ready to use
- Automatic UID/GID mapping for file permissions
- Claude Code CLI for AI-assisted development

#### Using Claude Code in the Container

1. Set up your API key:
```bash
# Copy the environment template
cp docker/template.env docker/.env

# Add your Anthropic API key to docker/.env
echo "ANTHROPIC_API_KEY=your_api_key_here" >> docker/.env
```

2. Start the development environment:
```bash
make dev-env
```

3. Inside the container, use Claude Code:
```bash
# Interactive mode (asks for permission before each action)
claude

# Autonomous mode (runs without permission prompts)
claude --dangerously-skip-permissions
```

**Note**: The `--dangerously-skip-permissions` flag allows Claude to work autonomously. Use with caution and always review changes before committing.

### Production Image
```bash
Expand Down
7 changes: 6 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.12-slim

# Install Auxiliary Software
# Install Auxiliary Software + Node.js for Claude Code
RUN apt-get update && apt-get install -y \
make \
apt-utils \
Expand All @@ -12,8 +12,13 @@ RUN apt-get update && apt-get install -y \
graphviz \
software-properties-common \
vim \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*

# Install Claude Code CLI
RUN npm install -g @anthropic-ai/claude-code

WORKDIR /workspace

# Copy essential files for dependency resolution to temp location
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
environment:
EXAMPLE: ${EXAMPLE}
EXAMPLE_SECRET: ${EXAMPLE_SECRET}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
command: /bin/bash
# Note: user mapping handled by Podman rootless automatically
# Bind whole project directory for simplicity
Expand Down
1 change: 1 addition & 0 deletions docker/template.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DEBUG=true
# Secrets (do not commit actual values)
API_KEY=
DATABASE_URL=
ANTHROPIC_API_KEY=

# Container runtime settings (optional)
# UID=${UID} # Uncomment to use your system UID
Expand Down