diff --git a/README.md b/README.md index f4ffacd..cf00d06 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,24 @@ languages. - **AI-Powered Insights**: Employs ChatGPT for in-depth code analysis. - **User-Friendly CLI**: Simple and intuitive command-line interface for easy usage. +- **Markdown Reports**: Outputs code reviews in markdown for flexible viewing +and integration. + +![Screenshot](./assets/cadre-screenshot.png) + +## Review Details + +Each diff file is reviewed in isolation. Code reviews are broken into several sections: + +- Technical Accuracy +- Best Practices +- Performance and Scalability +- Readability and Clarity +- Maintainability +- Testability +- Contextual Fit + +![Screenshot](./assets/cadre-best-practices-screenshot.png) ## Installation ๐Ÿ”ง @@ -31,39 +49,43 @@ Follow these steps: go install github.com/kmesiab/cadre@latest ``` -Set your OpenAI API Key: +Set your OpenAI API Key (You can also pass this value on the command +line w/ `--key`): ```bash export OPENAI_API_KEY=sk-[SECRET] ``` -Set your Ignore Files. These are file types that will be excluded from -code reviews. They should be a comma-separated list of file extensions. -For example: - -```bash -export IGNORE_FILES=.mod,.sum -``` - To run the program: ```bash -cadre +cadre --url [url to github pull request] ``` +--- + ## Usage ๐Ÿ’ก -**Usage instructions for Cadre CLI go here. Provide examples and explain -how users can interact with it.** +To review a pull request, run the following command: -## Development and Testing ๐Ÿงช +```bash +./cadre --url [url to github pull request] +``` -### Building the Project ๐Ÿ—๏ธ +or ```bash -make build +# Run the application with a GitHub pull request URL and API key +./cadre --url=https://github.com/user/repo/pull/123 --key=your_api_key ``` +### Command-Line Switches + +- `--url`: The GitHub pull request URL. Example: `--url=https://github.com/user/repo/pull/123` +- `--key`: Your OpenAI API key. You can also set this using the `OPENAI_API_KEY` +environment variable. Example: `--key=your_api_key` +- `--help`: Show help information. + ### Running Tests โœ”๏ธ ```bash diff --git a/assets/cadre-best-practices-screenshot.png b/assets/cadre-best-practices-screenshot.png new file mode 100644 index 0000000..c3a1ef0 Binary files /dev/null and b/assets/cadre-best-practices-screenshot.png differ diff --git a/assets/cadre-screenshot.png b/assets/cadre-screenshot.png new file mode 100644 index 0000000..efcefe9 Binary files /dev/null and b/assets/cadre-screenshot.png differ diff --git a/assets/cadre-self-review.png b/assets/cadre-self-review.png new file mode 100644 index 0000000..8b4c6d6 Binary files /dev/null and b/assets/cadre-self-review.png differ