Metadata-Version: 2.4
Name: cocode
Version: 0.0.5
Summary: Cocode is the friend of your code
Project-URL: Homepage, https://pipelex.com
Project-URL: Repository, https://github.com/pipelex/cocode
Project-URL: Documentation, https://docs.pipelex.com/
Author-email: "Evotis S.A.S." <evotis@pipelex.com>
Maintainer-email: Pipelex staff <oss@pipelex.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.10
Requires-Dist: pipelex[anthropic,bedrock,google]>=0.6.0
Requires-Dist: pygithub==2.4.0
Provides-Extra: dev
Requires-Dist: boto3-stubs>=1.35.24; extra == 'dev'
Requires-Dist: mypy>=1.11.2; extra == 'dev'
Requires-Dist: pyright==1.1.398; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.1.1; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
Requires-Dist: pytest-sugar>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=8.3.3; extra == 'dev'
Requires-Dist: ruff>=0.6.8; extra == 'dev'
Requires-Dist: types-aioboto3[bedrock,bedrock-runtime]>=13.4.0; extra == 'dev'
Requires-Dist: types-aiofiles>=24.1.0.20240626; extra == 'dev'
Requires-Dist: types-beautifulsoup4>=4.12.0.20240907; extra == 'dev'
Requires-Dist: types-markdown>=3.6.0.20240316; extra == 'dev'
Requires-Dist: types-networkx>=3.3.0.20241020; extra == 'dev'
Requires-Dist: types-openpyxl>=3.1.5.20250306; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0.12.20250326; extra == 'dev'
Requires-Dist: types-requests>=2.32.0.2024091; extra == 'dev'
Requires-Dist: types-toml>=0.10.8.20240310; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-glightbox==0.4.0; extra == 'docs'
Requires-Dist: mkdocs-material==9.6.14; extra == 'docs'
Requires-Dist: mkdocs-meta-manager==1.1.0; extra == 'docs'
Requires-Dist: mkdocs==1.6.1; extra == 'docs'
Description-Content-Type: text/markdown

# Cocode ⚡️

*Cocode is the friend of your code*

Cocode is a powerful command-line tool for analyzing and processing code repositories. It converts repository structures and contents into text formats, extracts code interfaces, and performs software engineering analysis using **AI-powered pipelines** using [Pipelex](https://github.com/Pipelex/pipelex).

## 🚀 Features

### 📊 **Repository Analysis**
Transform entire repositories into structured, analyzable formats:
- Convert codebases to text for AI processing and documentation
- Extract directory structures and file contents
- Filter by file types, paths, and patterns
- Multiple output formats for different use cases

### 🐍 **Smart Python Processing**
Intelligent Python code analysis with multiple extraction modes:
- **Interface Mode**: Extract class/function signatures and docstrings only
- **Imports Mode**: Analyze dependencies and import relationships  
- **Integral Mode**: Include complete source code

### 🤖 **AI-Powered Software Engineering Analysis**
Leverage AI pipelines for advanced code understanding:
- Extract project fundamentals and architecture insights
- Generate comprehensive onboarding documentation
- Analyze software features and capabilities
- Create structured development guides

### 📈 **Version Control Integration**
Powerful git integration for change analysis:
- Generate changelogs from git diffs automatically
- Compare versions and analyze evolution
- Track feature additions and modifications

### 🎯 **Flexible Output Formats**
Choose the right format for your needs:
- **Repo Map**: Complete tree structure with file contents
- **Flat**: Clean content-only output
- **Tree**: Directory structure visualization
- **Import List**: Dependency analysis format

## 📦 Installation

### Create virtual environment and install dependencies

```bash
pip install cocode
```

This will install the dependencies using uv.

### Set up environment variables

Enter your API keys into your `.env` file. The `OPENAI_API_KEY` is enough to get you started, but some pipelines require models from other providers.

## 🛠️ Quick Start

### Validation
```bash
# Verify setup and pipelines
cocode validate
```

### Basic Repository Analysis
```bash
# Converts repositories into AI-readable text formats
cocode repox

# Analyze specific project
cocode repox path/to/project --output-filename project-analysis.txt
```

### Smart Code Extraction
```bash
# Extract Python interfaces only
cocode repox --python-rule interface

# Analyze import dependencies
cocode repox --python-rule imports --output-style import_list
```

### AI-Powered Analysis
```bash
# Extract project fundamentals
cocode swe-from-repo extract_fundamentals . --output-filename overview.json

# Generate feature documentation
cocode swe-from-file extract_features_recap ./analysis.txt --output-filename features.md
```

### Git Integration
```bash
# Generate changelog from version diff
cocode swe-from-repo-diff write_changelog v1.0.0 . --output-filename CHANGELOG.md
```

## 🔧 Configuration

Cocode integrates with the [Pipelex](https://github.com/Pipelex/pipelex) framework for AI pipeline processing. Configuration files control default settings, output directories, and pipeline behaviors.

For detailed command options and advanced usage, see [CLI_README.md](CLI_README.md).

---

## Contact & Support

| Channel                                | Use case                                                                  |
| -------------------------------------- | ------------------------------------------------------------------------- |
| **GitHub Discussions → "Show & Tell"** | Share ideas, brainstorm, get early feedback.                              |
| **GitHub Issues**                      | Report bugs or request features.                                          |
| **Email (privacy & security)**         | [security@pipelex.com](mailto:security@pipelex.com)                       |
| **Discord**                            | Real-time chat — [https://go.pipelex.com/discord](https://go.pipelex.com/discord) |

## 📝 License

This project is licensed under the [MIT license](LICENSE). Runtime dependencies are distributed under their own licenses via PyPI.

---

*Happy coding!* 🚀
