From d9f990a16ba2c4eeb8e742c8c32532a8b900e20c Mon Sep 17 00:00:00 2001 From: kevin_mesiab Date: Tue, 16 Jan 2024 16:45:58 -0800 Subject: [PATCH] Add a readme --- README.md | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 129 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 462d9fe..365564e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,134 @@ -# Cadre ๐Ÿ’ป +# Cadre CLI ๐Ÿš€ ![Golang](https://img.shields.io/badge/Go-00add8.svg?labelColor=171e21&style=for-the-badge&logo=go) ![Build](https://github.com/kmesiab/cadre/actions/workflows/go-build.yml/badge.svg) -![Build](https://github.com/kmesiab/cadre/actions/workflows/go-lint.yml/badge.svg) -![Build](https://github.com/kmesiab/cadre/actions/workflows/go-test.yml/badge.svg) +![Lint](https://github.com/kmesiab/cadre/actions/workflows/go-lint.yml/badge.svg) +![Test](https://github.com/kmesiab/cadre/actions/workflows/go-test.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/kmesiab/cadre)](https://goreportcard.com/report/github.com/kmesiab/cadre) + +## Overview ๐ŸŒŸ + +Cadre CLI is a command-line application designed to automate code reviews across various programming +languages, utilizing OpenAI's ChatGPT API. It offers intelligent insights and suggestions to +improve code quality and developer efficiency. + +## Features ๐Ÿ› ๏ธ + +- **Language-Agnostic Analysis**: Compatible with multiple programming languages. +- **AI-Powered Insights**: Employs ChatGPT for in-depth code analysis. +- **User-Friendly CLI**: Simple and intuitive command-line interface for easy usage. + +## Installation ๐Ÿ”ง + +To install Cadre CLI, you need to have Go installed on your machine. Follow these steps: + +```bash +go install github.com/kmesiab/cadre@latest +``` + +Set your OpenAI API 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 +``` + +## Usage ๐Ÿ’ก + +**Usage instructions for Cadre CLI go here. Provide examples and explain how users can interact with it.** + +## Development and Testing ๐Ÿงช + +### Building the Project ๐Ÿ—๏ธ + +```bash +make build +``` + +### Running Tests โœ”๏ธ + +```bash +make test +make test-verbose +make test-race +``` + +### Installing Tools ๐Ÿ› ๏ธ + +```bash +make install-tools +``` + +### Linting ๐Ÿงน + +```bash +make lint +make lint-markdown +``` + +--- + +## Contributing ๐Ÿค + +### Forking and Sending a Pull Request + +1. **Fork the Repository**: Click the 'Fork' button at the top right of this page. +2. **Clone Your Fork**: + +```bash +git clone https://github.com/kmesiab/cadre +cd cadre +``` + +3. **Create a New Branch**: + +```bash +git checkout -b your-branch-name +``` + +4. **Make Your Changes**: Implement your changes or fix issues. +5. **Commit and Push**: + +```bash +git commit -m "Add your commit message" +git push origin your-branch-name +``` + +6. **Create a Pull Request**: Go to your fork on GitHub and click the 'Compare & pull request' button. + +## Github Guidelines + +Please ensure your code adheres to the project's +[standards and guidelines](https://github.com/kmesiab/cadre/discussions/). + +### Quick Tips + +Run `make lint` before committing to ensure your code is properly formatted. + +1. **Always rebase, never merge commit** +2. Always use a descriptive commit message +3. Separate your title from your description +4. Keep commit messages under 50 characters +5. Start your branch with `feat|bugfix|docs|style|refactor|perf|test` +6. Squash your commits into logical units of work + +## License ๐Ÿ“ + +Information regarding the licensing of Cadre CLI will be included here. + +--- + +*Note: This project is under active development. Additional features and documentation will be updated in due course.* ๐ŸŒˆ