Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit a1de539

Browse files
committed
Improved README. Create CONTRIBUTING.md and move the development instructions there.
1 parent b1f5736 commit a1de539

2 files changed

Lines changed: 140 additions & 68 deletions

File tree

CONTRIBUTING.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributions Welcome
2+
3+
We need your help to make AICodeBot better.
4+
5+
We welcome contributions of all kinds, including code, documentation, bug reports, feature requests, and more. We use [GitHub issues](https://github.com/novara-ai/AICodeBot/issues) to track all of these.
6+
7+
In particular, we need help with:
8+
9+
* Improving the intelligence of the responses from the language model
10+
* Better [prompts](prompts)
11+
* Explore different language models
12+
* Self verifying/validating responses. Reflection.
13+
* Building additional commands in the [CLI](aicodebot/cli.py)
14+
* `aicodebot code` - translate natural language to local changes in code
15+
* `aicodebot learn` - Read the local codebase or online documentation and use that to improve the quality of the answers.
16+
* Adding additional interfaces
17+
* GitHub Action
18+
* The @aicodebot mention
19+
* Documentation. We don't even have a docs folder yet. Setting up an automated process for this.
20+
* YouTube walk-throughs of using AICodeBot
21+
22+
## Code Contributions
23+
24+
We use the normal fork/pull request workflow. If you're not familiar with this, check out [this guide](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
25+
26+
## Local Development Environment
27+
28+
1. Clone the repository
29+
30+
```bash
31+
git clone git@github.com:novara-ai/aicodebot.git
32+
```
33+
34+
2. Set up a virtual environment (recommend using [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/))
35+
36+
```bash
37+
# We use Python 3.11
38+
mkvirtualenv --python=`which python3` AICodeBot
39+
```
40+
41+
3. Install the dependencies:
42+
Note that [requirements.txt](requirements/requirements.txt) is for production dependencies, and [requirements-dev.txt](requirements/requirements-dev.txt) is for development dependencies.
43+
44+
```bash
45+
pip install -r requirements/requirements-dev.txt
46+
```
47+
48+
Note: We use [pip-tools](https://pypi.org/project/pip-tools/) to manage our the production dependencies, so if you want to add a new dependency, add it to [requirements.in](requirements/requirements.in) and then run `pip-compile requirements/requirements.in` to update [requirements.txt](requirements/requirements.txt).
49+
50+
4. **Use aicodebot to build aicodebot** 😎 Doing so can be a little tricky, when you are developing from the local repo you can run `python -m aicodebot.cli $command` to run/test your changes. This will use the local version of aicodebot instead of the version installed via pip
51+
52+
```
53+
python -m aicodebot.cli --help
54+
```
55+
56+
Pro-tips:
57+
58+
* You can use the -v flag for all commands to get more verbose output, including information about what prompts are being sent to the language model.
59+
* Have aicodebot review your changes before you commit, with `python -m aicodebot.cli review`
60+
61+
### Code quality
62+
63+
We're obsessive about automated tooling, as you can imagine. 😎
64+
65+
We use pre-commit to run a bunch of checks on the code before it gets committed. After you've installed the dev requirements file with `pip install -r requirements/requirements-dev.txt`, you can run `pre-commit install` to install the git hook. This will run the checks on every commit. If you want to run the checks manually, you can run `pre-commit run --all-files`. If you want to skip the checks, you can run `git commit --no-verify`, but it's also as part of the [GitHub Actions build workflow](.github/workflows/build.yml), so you'll get caught there.
66+
67+
We use [Ruff](https://github.com/astral-sh/ruff) as our main linter. Ruff runs all the other underlying favorite tools like pylint and flake8 with a centralized config. We [black](https://black.readthedocs.io/en/stable/) for formatting, and isort for imports. See [pyproject.toml](pyproject.toml) for the config.
68+
69+
Highly recommend you set up your editor to run all of these on each file save, it saves a lot of time.
70+
71+
### Testing
72+
73+
Install the test dependencies with
74+
`pip install -r requirements/requirements-test.txt` - this is what is used in the [Github Actions workflow](https://github.com/novara-ai/AICodeBot/actions), you can look at the [build workflow](.github/workflows/build.yml) to see how to run the tests.
75+
76+
We use `pytest` for testing. It will skip some tests if OPENAI_API_KEY is not set, so to test everything, run pytest with your OPENAI_API_KEY set.
77+
78+
```bash
79+
OPENAI_API_KEY=your_key pytest
80+
```
81+
82+
## Coding Principles
83+
84+
Borrowed from the [zen of python](http://c2.com/cgi/wiki?PythonPhilosophy), with a couple of changes.
85+
86+
```text
87+
1. **Readability is the number 1 code quality metric**.
88+
2. Beautiful is better than ugly.
89+
3. Explicit is better than implicit.
90+
4. Simple is better than complex.
91+
5. Complex is better than complicated.
92+
6. Flat is better than nested.
93+
7. Sparse is better than dense.
94+
8. Special cases aren't special enough to break the rules.
95+
* Although practicality beats purity.
96+
9. Errors should never pass silently.
97+
* Unless explicitly silenced.
98+
10. In the face of ambiguity, refuse the temptation to guess.
99+
11. There should be one -- and preferably only one -- obvious way to do it.
100+
12. Now is better than never.
101+
```

README.md

Lines changed: 39 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44

55
AICodeBot is a coding assistant designed to make your coding life easier. With capabilities to perform code reviews, manage dependencies, and even suggest improvements, think of it as your AI version of a pair programmer - a team member that accelerates the pace of development and helps you write better code.
66

7-
⚠️ Status: This project is in its infancy with very limited features, but it already improves the software development workflow.
7+
There are lot of ways to use AICodeBot that we have planned. To start, it's a [command-line tool](https://pypi.org/project/aicodebot/) that you can use to generate commit messages, debug code, and review code. In the future, we plan to integrate it with GitHub Actions, Slack, and other tools to make it even more useful.
88

9-
⚠️ It uses OpenAI's ChatGPT large language model, which can hallucinate and be confidently wrong. Sometimes it does dumb things, which is why we have you confirm before it does anything permanent.
9+
⚠️ Status: This project is in its infancy with very limited features, but it already improves the software development workflow, and has a healthy Roadmap of features. ⬇
1010

11-
We're working on it and it's getting better all the time.
11+
⚠️ It uses OpenAI's ChatGPT large language models, which can hallucinate and be confidently wrong. Sometimes it does dumb things, which is why we have you confirm before it does anything permanent.
12+
13+
We're using AICodeBot to build AICodeBot, and it's getting better all the time.️ We're looking for contributors to help us build it out. See [CONTRIBUTING](CONTRIBUTING.md) for more.
1214

1315
### What it's not
1416

1517
`aicodebot` is a tool for developers, not a replacement for them. It's not going to replace your job, but it will make your job easier and more fun. It's not going to take over the world, but it will help us build a better one. See the *Alignment* section below for more.
1618

17-
It's also not a "build a website for me in 5 minutes" tool that takes a well constructed prompt and builds a scaffold for you. There are [other tools](https://github.com/AntonOsika/gpt-engineer) for that, Instead, it's built to work with existing code bases and help you improve them at the git-commit level. It's designed to multiply the effectiveness of capable engineers.
19+
It's also not a "build a website for me in 5 minutes" tool that takes a well constructed prompt and builds a scaffold for you. There are [other tools](https://github.com/AntonOsika/gpt-engineer) for that, Instead, AICodeBot is built to work with existing code bases and help you improve them at the git-commit level. It's designed to multiply the effectiveness of capable engineers.
1820

1921
## Current features - how you can use it
2022

@@ -34,36 +36,53 @@ It's also not a "build a website for me in 5 minutes" tool that takes a well con
3436

3537
[![PyPI version](https://badge.fury.io/py/aicodebot.svg)](https://badge.fury.io/py/aicodebot)
3638

37-
To install the command line interface, run `pip install aicodebot`. You'll also need to set up an OpenAI API key, which you can get for free by visiting your [API key settings page](https://platform.openai.com/account/api-keys").
38-
39-
Follow the steps below to set up AICodeBot on your machine:
39+
To install AICodeBot, run:
4040

4141
`pip install aicodebot`
4242

43-
Note:
43+
And then run `aicodebot --help` to get started.
44+
45+
```bash
46+
Usage: aicodebot [OPTIONS] COMMAND [ARGS]...
47+
48+
Options:
49+
-V, --version Show the version and exit.
50+
-h, --help Show this message and exit.
51+
52+
Commands:
53+
alignment Get a message about Heart-Centered AI Alignment ❤ + 🤖.
54+
commit Generate a commit message based on your changes.
55+
debug Run a command and debug the output.
56+
fun-fact Get a fun fact about programming and artificial intelligence.
57+
review Do a code review, with [un]staged changes, or a specified...
58+
```
59+
60+
### Open AI key setup
61+
4462
The first time you run it, you'll be prompted to enter your OpenAI API Key, which is required, as we use OpenAI's large language models for the AI. You can get one for free by visiting your [API key settings page](https://platform.openai.com/account/api-keys").
4563

64+
Pro tip: You can also set the `OPENAI_API_KEY` environment variable to your API key, and it will use that instead of prompting you.
65+
4666
## Roadmap of Upcoming Features
4767

4868
### Code Workflow Improvements
4969

50-
- [X] **Assisted Git Commit**: Automatically generate a commit message.
70+
- [X] **Assisted Git Commit**: Automatically generate a commit message based on the changes you've made
5171
- [X] **Assisted Debugging**: Run a command with aicodebot and it captures the log message and tries to figure out what's going on from the error message. Eventually, it could also suggest fixes for the error and make the changes for you. Try it out with `aicodebot debug $command`
52-
- [X] **Code Review**: Provides feedback on potential issues in cod, such as style violations, potential bugs, and performance issues. It could also suggest best practices for code improvement. Eventually: FIX the code automatically and notify the team.
53-
- [ ] **Fix the Build**: Check the CI/CD pipeline, figure out what is broken, and fix the build.
72+
- [X] **Code Review**: Provides feedback on potential issues in code, and suggests improvements to make it better.
5473
- [ ] **Dependency Management**: Updating dependencies to their latest versions with pull requests that run tests.
5574
- [ ] **Documentation Generation**: Generates comprehensive documentation for code, including docstrings, README files, and wiki pages.
5675
- [ ] **Performance Optimization Suggestions**: Suggests potential performance optimizations for code.
57-
- [ ] **Error Detection**: Detects errors in code and suggests potential fixes.
5876
- [ ] **Test Generation**: Generates unit tests for code, improve test coverage.
59-
- [ ] **Integration with CI/CD pipelines**: Integrates with CI/CD pipelines to automate tasks like code review, testing, and deployment (via GitHub Actions)
77+
- [ ] **Integration with CI/CD pipelines**: Integrates with CI/CD pipelines to automate tasks like code review, testing, and deployment (via GitHub Actions). Eventually: Fix the build automatically when there are small errors.
6078
- [ ] **Rubber Ducky Chat Bot**: Helps developers think through design issues by providing a conversational interface to discuss and solve problems, using data from the current repo.
61-
- [ ] **Linting/Formatting**: Checks code for linting errors and automatically fixes them where possible (via pre-commit)
62-
- [ ] **Handle GitHub Issues**: Handles basic tasks that you assign to @aicodebot
79+
- [X] **Linting/Formatting**: Checks code for linting errors and automatically fixes them where possible (via pre-commit)
80+
- [ ] **Handle GitHub Issues**: Handles basic tasks that you assign to [@aicodebot](https://pypi.org/project/aicodebot/)
6381

6482
### User Interfaces
6583

6684
- [X] **Command-line, installable via pip**: aicodebot can be installed as a Python package using `pip install aicodebot`
85+
- [ ] **Mention the @aicodebot GitHub user**: Mentioning the [@aicodebot](https://pypi.org/project/aicodebot/) GitHub user in a comment will trigger it to perform a task, review code, or pull in an appropriate gif.
6786
- [ ] **Callable as a GitHub action**: Can be called as a GitHub action to perform tasks on GitHub repositories.
6887
- [ ] **Chat**: CLI chat interface that knows the context of your codebase and can answer questions about it. No more going back and forth between ChatGPT and command-line.
6988
- [ ] **Slack Bot**: Interacts with aicodebot via slack, sends notifications, performs tasks, and provides real-time assistance to developers.
@@ -78,11 +97,11 @@ The first time you run it, you'll be prompted to enter your OpenAI API Key, whic
7897

7998
### Fun
8099

81-
- [X] **Fun Facts**: Provides fun facts about programming or AI. It could also share interesting news or articles related to AI and programming.
82-
- [X] **Alignment**: Gives a heart-centered inspirational message about how we can build AI in a way that aligns with humanity.
83-
- [ ] **Telling Jokes**: Tells programming jokes. :smiley:
100+
- [X] **Fun Facts**: Provides fun facts about programming or AI. It could also share interesting news or articles related to AI and programming. Try it out with `aicodebot fun-fact`.
101+
- [X] **Alignment**: Gives a heart-centered inspirational message about how we can build AI in a way that aligns with humanity. Try it out with `aicodebot alignment`.
102+
- [ ] **Telling Jokes**: We've gotta figure out how to teach LLMs about humor. :)
84103
- [ ] **Supportive Encouragement**: High fives and kudos for a job well done
85-
- [ ] **GIF Reactions**: Reacts to messages with relevant and fun gifs. We've gotta figure out how to teach LLMs about humor.
104+
- [ ] **GIF Reactions**: Reacts to messages with relevant and fun gifs.
86105

87106
<img src="https://camo.githubusercontent.com/6fc1e79b4aa226b24a756c4c8e20e5b049301a930449a7321d3e45f516e61601/68747470733a2f2f74656e6f722e636f6d2f766965772f6b746f2d6b6f756e6f746f72692d6b6f756e6f746f7269746f6b656e2d6c626f772d73746f726b686f6c646572732d6769662d32353637363438332e676966" width="25%">
88107

@@ -115,52 +134,4 @@ Technology itself is amoral, it just imbues the values of the engineers who crea
115134

116135
## Contributing
117136

118-
We'd love your help! If you're interested in contributing, here's how to get started.
119-
120-
1. Clone the repository
121-
122-
```bash
123-
git clone git@github.com:novara-ai/aicodebot.git
124-
```
125-
126-
2. Set up a virtual environment (I recommend using [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/))
127-
128-
```bash
129-
mkvirtualenv --python=`which python3` aicodebot
130-
```
131-
132-
3. Install the dependencies:
133-
134-
```bash
135-
pip install -r requirements/requirements-dev.txt
136-
```
137-
138-
4. Use aicodebot to build aicodebot 😎
139-
140-
### Testing
141-
142-
Install the test dependencies with
143-
`pip install -r requirements/requirements-test.txt`
144-
145-
We use `pytest` for testing. It will skip some tests if OPENAI_API_KEY is not set.
146-
147-
### Coding Principles
148-
149-
Borrowed from the [zen of python](http://c2.com/cgi/wiki?PythonPhilosophy), with a couple of changes.
150-
151-
```text
152-
1. **Readability is the number 1 code quality metric**.
153-
2. Beautiful is better than ugly.
154-
3. Explicit is better than implicit.
155-
4. Simple is better than complex.
156-
5. Complex is better than complicated.
157-
6. Flat is better than nested.
158-
7. Sparse is better than dense.
159-
8. Special cases aren't special enough to break the rules.
160-
* Although practicality beats purity.
161-
9. Errors should never pass silently.
162-
* Unless explicitly silenced.
163-
10. In the face of ambiguity, refuse the temptation to guess.
164-
11. There should be one -- and preferably only one -- obvious way to do it.
165-
12. Now is better than never.
166-
```
137+
We'd love your help! If you're interested in contributing, here's how to get started. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.

0 commit comments

Comments
 (0)