Your AI-powered coding companion: AI Code Bot 🤖
Project description
AI Code Bot 🤖
Your AI-powered coding companion
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.
⚠️ Status: This project is in its infancy with very limited features, but it already improves the software development workflow.
⚠️ 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.
We're working on it and it's getting better all the time.
What it's not
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 on that.
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 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.
Current features - how you can use it
AI-Assisted Git Commit
aicodebot commit
will run pre-commit for you to check syntax, and then generate a commit message for you based on the changes you've made. It will also commit the changes for you once everything checks out.
AI-Assisted Debugging
aicodebot debug $command
will run the command and capture the log message. It will then try to figure out what's going on from the error message and suggest a fix.
AI-Assisted Code Review
aicodebot review
will run a code review on your code and suggest improvements. By default it will look at [un]staged changes, and you can also supply a specific commit hash to review. It also suggests best practices for code improvement.
Getting Started
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.
Follow the steps below to set up AICodeBot on your machine:
pip install aicodebot
Note: 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.
Roadmap of Upcoming Features
Code Workflow Improvements
- Assisted Git Commit: Automatically generate a commit message.
- 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
- 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.
- Fix the Build: Check the CI/CD pipeline, figure out what is broken, and fix the build.
- Dependency Management: Updating dependencies to their latest versions with pull requests that run tests.
- Documentation Generation: Generates comprehensive documentation for code, including docstrings, README files, and wiki pages.
- Performance Optimization Suggestions: Suggests potential performance optimizations for code.
- Error Detection: Detects errors in code and suggests potential fixes.
- Test Generation: Generates unit tests for code, improve test coverage.
- Integration with CI/CD pipelines: Integrates with CI/CD pipelines to automate tasks like code review, testing, and deployment (via GitHub Actions)
- 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.
- Linting/Formatting: Checks code for linting errors and automatically fixes them where possible (via pre-commit)
- Handle GitHub Issues: Handles basic tasks that you assign to @aicodebot
User Interfaces
- Command-line, installable via pip: aicodebot can be installed as a Python package using
pip install aicodebot
- Callable as a GitHub action: Can be called as a GitHub action to perform tasks on GitHub repositories.
- 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.
- Slack Bot: Interacts with aicodebot via slack, sends notifications, performs tasks, and provides real-time assistance to developers.
- Bug Report service integrations: Listen for bug reports from Sentry, Honeybadger, and other bug reporting tools and automatically create issues, assign them to developers, and notify them via Slack. Eventually: FIX the bug automatically and notify the team.
Repository Management
- Project best practices: Suggest things like pre-commit, linting, license, CI/CD, etc. Eventually: Implement them for you.
- Handle Stale Issues: Automatically detects and handles stale issues on GitHub by nudging the responsible parties.
- Triage Incoming Issues: Provides Level 1 triage of incoming issues on GitHub, including tagging, assigning, and responding with FAQs. It could also escalate issues to human developers when necessary.
- Rate the complexity of PRs: Rates the complexity of pull requests and assigns them to developers based on their skill level and context
Fun
- Fun Facts: Provides fun facts about programming or AI. It could also share interesting news or articles related to AI and programming.
- Alignment: Gives a heart-centered inspirational message about how we can build AI in a way that aligns with humanity.
- Telling Jokes: Tells programming jokes. :smiley:
- Supportive Encouragement: High fives and kudos for a job well done
- GIF Reactions: Reacts to messages with relevant and fun gifs. We've gotta figure out how to teach LLMs about humor.
Development / Contributing
The Stack
Test and Build
Code Quality
Infrastructure
Alignment ❤️ + 🤖
Technology itself is amoral, it just imbues the values of the engineers who create it. We believe that AI should be built in a way that aligns with humanity, and we're building aicodebot to help us do just that. We're building from a heart-centered space, and contributing to the healthy intersection of AI and humanity.
Contributing
We'd love your help! If you're interested in contributing, here's how to get started.
- Clone the repository
git clone git@github.com:novara-ai/aicodebot.git
- Set up a virtual environment (I recommend using virtualenvwrapper)
mkvirtualenv --python=`which python3` aicodebot
- Install the dependencies:
pip install -r requirements/requirements-dev.txt
- Use aicodebot to build aicodebot 😎
Testing
Install the test dependencies with
pip install -r requirements/requirements-test.txt
We use pytest
for testing. It will skip some tests if OPENAI_API_KEY is not set.
Coding Principles
Borrowed from the zen of python, with a couple of changes.
1. **Readability is the number 1 code quality metric**.
2. Beautiful is better than ugly.
3. Explicit is better than implicit.
4. Simple is better than complex.
5. Complex is better than complicated.
6. Flat is better than nested.
7. Sparse is better than dense.
8. Special cases aren't special enough to break the rules.
* Although practicality beats purity.
9. Errors should never pass silently.
* Unless explicitly silenced.
10. In the face of ambiguity, refuse the temptation to guess.
11. There should be one -- and preferably only one -- obvious way to do it.
12. Now is better than never.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aicodebot-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a13ff670293c625738b20a7862b40dfccb343b2bc6a673b71901079c003ab4a9 |
|
MD5 | 5440f721aa1259e56b4a831c1d5abef7 |
|
BLAKE2b-256 | 9199300213812802dd2d8a0db9d5341de5e0afabe20e568b9a3f1ef714c54f6b |