Metadata-Version: 2.4
Name: cokodo-agent
Version: 1.0.0
Summary: AI Agent Collaboration Protocol Generator - Create standardized .agent protocol for your projects
Project-URL: Homepage, https://github.com/dinwind/agent_protocol
Project-URL: Repository, https://github.com/dinwind/agent_protocol
Project-URL: Issues, https://github.com/dinwind/agent_protocol/issues
Author: dinwind
License-Expression: MIT
Keywords: agent,ai,claude,cokodo,copilot,cursor,generator,protocol
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: questionary>=2.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.9.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Cokodo Agent

A CLI tool to generate standardized AI collaboration protocol (`.agent`) for your projects.

Similar to `create-react-app`, this tool helps you quickly set up an `.agent` directory with best practices for AI-assisted development.

---

## Installation

```bash
# Install globally
pip install cokodo-agent

# Or use pipx (recommended)
pipx install cokodo-agent
```

---

## Quick Start

```bash
# Navigate to your project
cd my-project

# Run the generator
cokodo init

# Or specify a path
cokodo init ./new-project
```

---

## Usage

### Interactive Mode (Default)

```bash
$ cokodo init

  Cokodo Agent v1.0.0
  ====================

  Fetching protocol...
    [1/2] GitHub Release... OK (v2.1.0)

? Project name: my-awesome-app
? Brief description: A task management web application

? Primary tech stack:
  > Python
    Rust
    Qt/C++
    Mixed
    Other

? AI tools to configure: (space to select)
  [x] Cursor
  [x] GitHub Copilot
  [ ] Claude Projects

  Generating .agent/
  [========================================] 100%

  Success! Created .agent in /path/to/my-awesome-app

  Next steps:
    1. Review .agent/project/context.md
    2. Start coding with AI assistance!
```

### Quick Mode

```bash
# Use defaults, skip prompts
cokodo init --yes

# Specify options directly
cokodo init --name "my-app" --stack python
```

### Commands

| Command | Description |
|---------|-------------|
| `cokodo init [path]` | Create .agent in target directory |
| `cokodo version` | Show version information |

### Options

| Option | Description |
|--------|-------------|
| `--yes, -y` | Skip prompts, use defaults |
| `--name` | Project name |
| `--stack` | Tech stack (python/rust/qt/mixed/other) |
| `--force` | Overwrite existing .agent directory |
| `--offline` | Use built-in protocol (no network) |

---

## Protocol Sources

The tool fetches the latest protocol from multiple sources with fallback:

| Priority | Source | Description |
|----------|--------|-------------|
| 1 | GitHub Release | Latest version from repository |
| 2 | Remote Server | Backup server [reserved] |
| 3 | Built-in | Bundled version in package |

```
Priority 1: GitHub Release
    |
    | [unavailable]
    v
Priority 2: Remote Server [reserved, not implemented]
    |
    | [unavailable]
    v
Priority 3: Built-in (offline fallback)
```

---

## Generated Structure

```
your-project/
+-- .agent/                     # Protocol directory
|   +-- start-here.md           # * Entry point
|   +-- quick-reference.md      # Cheat sheet
|   +-- index.md                # Navigation
|   +-- manifest.json           # Config
|   +-- core/                   # Governance rules
|   +-- project/                # Project-specific
|   |   +-- context.md          # <- Customized
|   |   +-- tech-stack.md       # <- Customized
|   +-- skills/                 # Skill modules
|   +-- adapters/               # Tool adapters
|   +-- meta/                   # Protocol evolution
|   +-- scripts/                # Helper scripts
|
+-- .cursorrules                # [Optional] Cursor config
+-- .github/
    +-- copilot-instructions.md # [Optional] Copilot config
```

---

## Configuration

### Environment Variables

| Variable | Description |
|----------|-------------|
| `COKODO_OFFLINE` | Force offline mode (`1` or `true`) |
| `COKODO_CACHE_DIR` | Custom cache directory |

### Cache Location

Downloaded protocols are cached at:
- Linux/macOS: `~/.cache/cokodo/`
- Windows: `%LOCALAPPDATA%\cokodo\cache\`

---

## Development

```bash
# Clone repository
git clone https://github.com/dinwind/agent_protocol.git
cd agent_protocol/cokodo-agent

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest
```

---

## License

MIT License - see [LICENSE](LICENSE) for details.

---

## Documentation

- [Complete Usage Guide](../docs/usage-guide.md) - Detailed usage instructions
- [使用指南 (中文)](../docs/usage-guide_cn.md) - Chinese documentation
- [Agent Protocol Documentation](https://github.com/dinwind/agent_protocol)
- [Report Issues](https://github.com/dinwind/agent_protocol/issues)
