Skip to content
Merged
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
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,32 @@ A community toolbox for Claude Code - automated installers, scripts, agent templ
Set up a complete Python development environment with one command:

#### Windows

##### Option 1: Simple approach (recommended)
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm 'https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-python-environment.ps1')"
# First set the environment variable, then run the installer
$env:CLAUDE_ENV_CONFIG='python'
iex (irm 'https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-environment.ps1')
```

Or using CMD:
##### Option 2: One-liner (requires escaping)
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -Command "`$env:CLAUDE_ENV_CONFIG='python'; iex (irm 'https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-environment.ps1')"
```

##### Option 3: Using CMD
```cmd
curl -L -o %TEMP%\setup-python.ps1 https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-python-environment.ps1 && powershell -NoProfile -ExecutionPolicy Bypass -File %TEMP%\setup-python.ps1
curl -L -o %TEMP%\setup-env.ps1 https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-environment.ps1 && powershell -NoProfile -ExecutionPolicy Bypass -File %TEMP%\setup-env.ps1 python
```

#### macOS
```bash
curl -fsSL https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/macos/setup-python-environment.sh | bash
CLAUDE_ENV_CONFIG=python curl -fsSL https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/macos/setup-environment.sh | bash
```

#### Linux
```bash
curl -fsSL https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/linux/setup-python-environment.sh | bash
CLAUDE_ENV_CONFIG=python curl -fsSL https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/linux/setup-environment.sh | bash
```

This automated setup includes:
Expand Down Expand Up @@ -139,16 +148,16 @@ If you download the script manually, Windows SmartScreen may warn you. The scrip
claude-code-toolbox/
├── scripts/ # Installation and utility scripts
│ ├── install-claude.py # Cross-platform Claude installer
│ ├── setup-python-environment.py # Cross-platform Python setup
│ ├── setup-environment.py # Cross-platform environment setup
│ ├── windows/ # Windows bootstrap scripts
│ │ ├── install-claude-windows.ps1
│ │ └── setup-python-environment.ps1
│ │ └── setup-environment.ps1
│ ├── linux/ # Linux bootstrap scripts
│ │ ├── install-claude-linux.sh
│ │ └── setup-python-environment.sh
│ │ └── setup-environment.sh
│ └── macos/ # macOS bootstrap scripts
│ ├── install-claude-macos.sh
│ └── setup-python-environment.sh
│ └── setup-environment.sh
├── agents/ # Agent templates and examples
│ ├── examples/ # Ready-to-use subagents (7 specialized agents)
│ └── templates/ # Templates for creating new agents
Expand All @@ -161,6 +170,11 @@ claude-code-toolbox/
├── slash-commands/ # Custom slash command templates
│ ├── examples/ # Ready-to-use commands (6 commands)
│ └── templates/ # Command templates
├── hooks/ # Git hooks and event handlers
│ └── examples/ # Ready-to-use hooks
├── environments/ # Environment configurations
│ ├── examples/ # Ready-to-use environments
│ └── templates/ # Environment templates
├── mcp/ # Model Context Protocol configuration
│ └── README.md # MCP setup and usage guide
└── docs/ # Documentation
Expand Down Expand Up @@ -206,14 +220,13 @@ After running the Python setup script:
claude doctor

# 2. Start Claude with Python configuration - just run:
claude-python # Windows: Git Bash ONLY!
claude-python

# That's it! The command is registered globally during setup
```

**⚠️ Common Mistakes:**
- Running `claude` directly won't load the Python system prompt!
- On Windows: `claude-python` ONLY works in Git Bash, NOT in PowerShell or CMD!

For IDE integration:
- **VS Code**: Configure terminal to use the launcher script
Expand Down
131 changes: 131 additions & 0 deletions environments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Claude Code Environment Configurations

This directory contains YAML configuration files that define complete development environments for Claude Code. Each configuration can install dependencies, configure agents, set up MCP servers, add slash commands, and more.

## Quick Start

### Windows (PowerShell)

#### Simplest approach (in PowerShell)
```powershell
$env:CLAUDE_ENV_CONFIG='python'
iex (irm 'https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-environment.ps1')
```

#### One-liner (from any shell, requires escaping)
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -Command "`$env:CLAUDE_ENV_CONFIG='python'; iex (irm 'https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/windows/setup-environment.ps1')"
```

#### Local file (after downloading)
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/windows/setup-environment.ps1 python
```

### macOS/Linux
```bash
# Using environment variable
CLAUDE_ENV_CONFIG=python curl -fsSL https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/linux/setup-environment.sh | bash

# Or pass as argument (after downloading)
./scripts/linux/setup-environment.sh python
```

## Available Configurations

### python.yaml
**Command:** `claude-python`

A Python development environment with:
- 7 Python-optimized subagents (code review, testing, docs, etc.)
- 6 slash commands (/commit, /debug, /test, etc.)
- Context7 MCP server for library documentation
- Python developer system prompt

### Additional Configurations

More environment configurations are coming soon. You can create your own by following the structure below.

## Configuration Structure

Each YAML file can contain:

```yaml
name: Display name for the environment
command-name: The global command to register (e.g., claude-python)

dependencies:
- Command to install dependency 1
- Command to install dependency 2

agents:
- Path to agent file relative to repo root

mcp-servers:
- name: Server name
scope: user/project
transport: http/sse/stdio
url: Server URL (for http/sse)
command: Command to run (for stdio)
header: Optional header (for http/sse)
env: Optional environment variable (for stdio)

slash-commands:
- Path to slash command file

output-styles:
- Path to output style file

hooks:
- event: Event name (PostToolUse, Notification, etc.)
matcher: Regex pattern to match
type: Hook type (command)
command: Command to execute
files:
- Files to download for the hook

system-prompt: Path to system prompt file
```

## Creating Custom Configurations

1. Create a new YAML file in `environments/examples/`
2. Define your environment using the structure above
3. Run the setup script with your configuration name
4. Your custom command will be registered globally

## Features

### Dependencies
Install any command-line tools or packages needed for your environment.

### Agents
Include specialized subagents for different tasks (code review, testing, documentation, etc.).

### MCP Servers
Configure Model Context Protocol servers with different transport types:
- **HTTP/SSE**: Web-based servers with optional authentication
- **Stdio**: Local command-based servers (like npx packages)

### Slash Commands
Add custom slash commands for common tasks like `/commit`, `/test`, `/refactor`.

### Output Styles
Configure how Claude formats its responses.

### Hooks
Set up automatic actions triggered by events:
- Linting on file changes
- Notifications for long-running tasks
- Custom scripts for specific file types

### System Prompts
Define the core behavior and expertise for Claude in your environment.

## Notes

- Configurations are downloaded from the repo at setup time
- All files are placed in `~/.claude/` directory
- Settings are merged with existing Claude Code configuration
- Use `--force` flag to overwrite existing files
- Use `--skip-install` if Claude Code is already installed
36 changes: 36 additions & 0 deletions environments/examples/python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python Development
command-name: claude-python
dependencies:
- uv tool install ruff@latest
agents:
- agents/examples/code-reviewer.md
- agents/examples/doc-writer.md
- agents/examples/implementation-guide.md
- agents/examples/performance-optimizer.md
- agents/examples/refactoring-assistant.md
- agents/examples/security-auditor.md
- agents/examples/test-generator.md
mcp-servers:
- name: context7
scope: user
transport: http
url: https://mcp.context7.com/mcp
# Note: Add your API key here if you have one
# header: X-API-Key: your-key-here
slash-commands:
- slash-commands/examples/commit.md
- slash-commands/examples/debug.md
- slash-commands/examples/document.md
- slash-commands/examples/refactor.md
- slash-commands/examples/review.md
- slash-commands/examples/test.md
output-styles:
# Add output styles if needed
hooks:
- event: PostToolUse
matcher: Edit|MultiEdit|Write
type: command
command: .claude/hooks/python_ruff_lint.py
files:
- hooks/examples/python_ruff_lint.py
system-prompt: system-prompts/examples/python-developer.md
76 changes: 76 additions & 0 deletions environments/templates/basic-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Environment Configuration Template
# Copy this file to environments/examples/<your-env>.yaml and customize

# Display name for your environment
name: [Your Environment Name]

# Global command name (e.g., claude-python, claude-fullstack)
# This will be registered as a global command for easy access
command-name: claude-[your-env]

# Dependencies to install (optional)
# These are run sequentially before environment setup
dependencies:
# Example for Windows: winget install <package>
# Example for npm: npm install -g <package>
# Example for Python: uv tool install <package>
# - uv tool install ruff@latest
# - npm install -g typescript

# Agents to include (optional)
# Paths are relative to the repository root
agents:
# - agents/examples/code-reviewer.md
# - agents/examples/doc-writer.md
# - agents/examples/test-generator.md

# MCP servers configuration (optional)
mcp-servers:
# HTTP transport example
# - name: server-name
# scope: user
# transport: http
# url: https://example.com/mcp
# header: X-API-Key: your-key-here # Optional

# SSE transport example
# - name: server-sse
# scope: user
# transport: sse
# url: https://example.com/sse

# Stdio transport example (local command)
# - name: local-server
# scope: user
# command: npx some-mcp-server
# env: ENV_VAR=value # Optional

# Slash commands to include (optional)
# Paths are relative to the repository root
slash-commands:
# - slash-commands/examples/commit.md
# - slash-commands/examples/test.md

# Output styles (optional)
# Paths are relative to the repository root
output-styles:
# - output-styles/examples/concise.md

# Hooks for automatic actions (optional)
hooks:
# Example: Run linter on file changes
# - event: PostToolUse
# matcher: Edit|MultiEdit|Write # Regex pattern
# type: command
# command: .claude/hooks/your-script.py
# files: # Files to download for this hook
# - hooks/examples/your-script.py

# Example: Notification hook
# - event: Notification
# type: command
# command: notify-send 'Claude Code' 'Task Complete'

# System prompt file (required)
# Path is relative to the repository root
system-prompt: system-prompts/examples/your-prompt.md
Loading
Loading