# CodeCrew

> Build your AI team with your existing subscriptions

Transform Claude, Gemini, and Copilot into a collaborative development team. No extra costs—just your existing AI subscriptions working together.

## Why CodeCrew?

### 💬 **Slack Team Collaboration** - Your AI Team in Slack
Bring AI agents directly into your team's workspace:
- **Team-wide AI access** - Everyone benefits from AI expertise in Slack channels
- **Thread-based context** - Maintains conversation history automatically
- **Multi-agent collaboration** - `@claude`, `@gemini`, `@copilot` work together in real-time
- **Natural integration** - Works like chatting with team members
- **Shared knowledge** - Team learns from AI interactions, not isolated sessions

### ✨ Other Benefits
- **No additional costs** - Use existing Claude Pro, Gemini, or GitHub Copilot subscriptions
- **Multi-agent collaboration** - Different AI models working on specialized tasks
- **Parallel execution** - Multiple agents working simultaneously
- **Flexible integration** - CLI, MCP server, or Slack bot

## Quick Start

```bash
# Install
npm install -g codecrew

# Initialize
codecrew init

# Check system
codecrew doctor

# Try it out
codecrew query "@claude analyze my code"
codecrew execute "@claude create a login component"
```

## Three Ways to Use

### 💬 Slack Mode - Team Collaboration (Recommended)
```bash
# Start CodeCrew in your Slack workspace
codecrew slack

# Your team can now:
# - @mention AI agents in channels
# - Maintain context in threads
# - Share AI insights with the whole team
```
👉 **[Complete Slack Setup Guide →](./SLACK_INSTALL.md)**

### 🖥️ CLI Mode - Direct terminal usage
```bash
codecrew query "@claude review this code"
codecrew execute "@gemini optimize performance"
codecrew query "@claude @gemini @copilot compare approaches"
```

### 🔌 MCP Server Mode - IDE integration
```bash
codecrew mcp  # VS Code, Claude Desktop, Cursor
```

## Supported AI Tools

- **Claude Code** - Advanced reasoning and analysis
- **Gemini CLI** - Real-time web access
- **GitHub Copilot CLI** - Specialized coding assistant

## Basic Usage

```bash
# Read-only analysis
codecrew query "@claude explain this function"

# File creation/modification
codecrew execute "@claude implement user authentication"

# Parallel tasks
codecrew execute "@claude create tests" "@gemini write docs"

# Pipeline workflows
codecrew query "@architect design API" | \
codecrew execute "@backend implement it"

# Thread-based conversations
codecrew query "@claude design login" --thread "auth-feature"
codecrew execute "@claude implement it" --thread "auth-feature"
```

## Create Custom Agents

```bash
# Let @codecrew create agents for you
codecrew execute "@codecrew Create a Python expert agent"
codecrew execute "@codecrew Create a React specialist with TypeScript"
codecrew execute "@codecrew Create a DevOps agent for Docker"

# Test your new agent
codecrew query "@python_expert Review my code"
```

## Agent Configuration

Create `codecrew.yaml` (or `agents.yaml` for backward compatibility):

```yaml
agents:
  - id: "frontend_dev"
    name: "React Expert"
    provider: "claude"
    working_directory: "./src"
    inline:
      type: "agent"
      system_prompt: |
        You are a senior React developer.
        Provide detailed examples and best practices.
```

> **Note:** `codecrew.yaml` is the preferred configuration file name. The legacy `agents.yaml` is still supported for backward compatibility. If both files exist, `codecrew.yaml` takes priority.

## Documentation

- [📖 CLI Guide](docs/cli-guide.md) - Complete CLI reference
- [🔌 MCP Integration](docs/mcp-integration.md) - IDE setup and MCP servers
- [⚙️ Agent Configuration](docs/agent-configuration.md) - Custom agents and advanced config
- [📚 Document System](docs/document-system.md) - Knowledge management for agents
- [🔧 Troubleshooting](docs/troubleshooting.md) - Common issues and solutions
- [💬 Slack Integration](SLACK_INSTALL.md) - Slack bot setup

## License

Apache-2.0 License - Copyright (c) 2025 SowonLabs

---

Built by [SowonLabs](https://github.com/sowonlabs)
