Metadata-Version: 2.4
Name: ai-code-review-tool
Version: 1.0.0rc1
Summary: AI-powered code review assistant using OpenAI
Author: Your Name
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9
Requires-Dist: openai>=1.0.0
Requires-Dist: python-dotenv
Dynamic: license-file

# ai-code-review-tool

<!-- CLI-DOCS-START -->

# 🧠 AI Code Review Tool – CLI Commands

**Version:** `v1.0.0`  
**Last updated:** `2025-04-05 09:12:27`

---
## 🧰 Main CLI

```
Usage: main.py [OPTIONS] COMMAND [ARGS]...                                    
                                                                               
+- Options -------------------------------------------------------------------+
| --install-completion          Install completion for the current shell.     |
| --show-completion             Show completion for the current shell, to     |
|                               copy it or customize the installation.        |
| --help                        Show this message and exit.                   |
+-----------------------------------------------------------------------------+
+- Commands ------------------------------------------------------------------+
| review          Run a full code review and generate a roadmap.              |
| take-snapshot   Take a project snapshot.                                    |
| generate-docs   Generate CLI docs automatically from the typer app.         |
+-----------------------------------------------------------------------------+
```

## `review` command

```
Usage: main.py review [OPTIONS]                                               
                                                                               
 Run a full code review and generate a roadmap.                                
                                                                               
+- Options -------------------------------------------------------------------+
| --path        TEXT  [default: src]                                          |
| --help              Show this message and exit.                             |
+-----------------------------------------------------------------------------+
```

## `take-snapshot` command

```
Usage: main.py take-snapshot [OPTIONS]                                        
                                                                               
 Take a project snapshot.                                                      
                                                                               
+- Options -------------------------------------------------------------------+
| --tools-only    --no-tools-only          [default: no-tools-only]           |
| --output                           TEXT  [default: project_snapshot.json]   |
| --help                                   Show this message and exit.        |
+-----------------------------------------------------------------------------+
```

## `generate-docs` command

```
Usage: main.py generate-docs [OPTIONS]                                        
                                                                               
 Generate CLI docs automatically from the typer app.                           
 Saves to both docs/cli_commands.md and optionally updates README.md.          
                                                                               
+- Options -------------------------------------------------------------------+
| --output                                 TEXT  [default:                    |
|                                                docs/cli_commands.md]        |
| --update-readme    --no-update-readme          [default: update-readme]     |
| --version                                TEXT  [default: v1.0.0]            |
| --help                                         Show this message and exit.  |
+-----------------------------------------------------------------------------+
```

## 🧾 Changes Since Last CLI Docs

**🛠️ Modified:**
- main.py

## 🧠 Learning Progress & Concepts

```markdown
- [ ] Learn how to diagram project architecture and module relationships
- [ ] Learn to read and write patch files for applying suggested changes
- [ ] Understand how CLI tools work with Typer
- [ ] Learn how to structure a Python project with modules and commands
- [ ] Learn how to publish a Python package to PyPI
- [ ] Learn how to track changes with Git and structure nightly updates
```

## 🧪 Upcoming Test Coverage Goals

- [ ] Add test for `troubleshoot_code_errors`
- [ ] Add test for `snapshot_tool`
- [ ] Add test for CLI with `typer.testing`

# 🧠 How This Project Works

This document is automatically generated to help you (or others) understand the structure and purpose of the project.

## `__init__.py`
**Path**: `src\__init__.py`


## `ai_code_review_tool\chunk_file.py`
**Path**: `src\ai_code_review_tool\chunk_file.py`

- `def chunk_file()` — Chunks a file into smaller parts if it's too large to process at once.

## `ai_code_review_tool\generate_roadmap.py`
**Path**: `src\ai_code_review_tool\generate_roadmap.py`

- `def generate_roadmap()` — Generate a development roadmap based on code review feedback.

## `ai_code_review_tool\get_code_review_suggestions.py`
**Path**: `src\ai_code_review_tool\get_code_review_suggestions.py`


## `ai_code_review_tool\learning_tracker.py`
**Path**: `src\ai_code_review_tool\learning_tracker.py`

- `def initialize_learning_baseline()` — Save the baseline snapshot from the first known working state of the codebase.
- `def update_learning_progress()` — Update the learning progress file with details of what was changed or added,
- `def summarize_learning_progress()` — Provide a text summary of progress made so far.

## `ai_code_review_tool\openai_integration.py`
**Path**: `src\ai_code_review_tool\openai_integration.py`

- `def get_openai_response()` — Function to send a prompt to OpenAI and receive a response.

## `ai_code_review_tool\project_explainer.py`
**Path**: `src\ai_code_review_tool\project_explainer.py`

- `def generate_how_it_works()` — Walks the project and generates a high-level overview of how the code works.

## `ai_code_review_tool\snapshot_tool.py`
**Path**: `src\ai_code_review_tool\snapshot_tool.py`

- `def is_valid_file()` — No docstring.
- `def walk_project()` — No docstring.
- `def save_snapshot()` — No docstring.
- `def snapshot()` — Generate a project snapshot of code files for AI review.

## `ai_code_review_tool\troubleshoot_code_errors.py`
**Path**: `src\ai_code_review_tool\troubleshoot_code_errors.py`

- `def troubleshoot_code_errors()` — Analyze error logs or console output and suggest troubleshooting steps.

## `ai_code_review_tool\walk_and_review_project.py`
**Path**: `src\ai_code_review_tool\walk_and_review_project.py`


## `ai_code_review_tool\walk_project.py`
**Path**: `src\ai_code_review_tool\walk_project.py`

- `def walk_project()` — Walks through a project directory and collects all files with the specified extensions.

## `ai_code_review_tool\__init__.py`
**Path**: `src\ai_code_review_tool\__init__.py`



## 🚀 Release & Publish Instructions

```shell
git add .
git commit -m 'Nightly update'
git push origin main

# Optional: Build and publish package
python -m build
twine upload dist/*
```

<!-- CLI-DOCS-END -->
