Skip to main content

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.

⚠️ Status: This project is in its infancy with very limited features. Sometimes it does dumb things.

Even with limited functionality, it will still save you time, and you can look at the Features list below to get an idea of where it is going. Give the project a star and follow along while we build out more of the foundation.

Setup and Usage

PyPI version

Follow the steps below to set up AICodeBot on your machine:

pip install aicodebot

> aicodebot --help
Usage: aicodebot [OPTIONS] COMMAND [ARGS]...

Options:
  -V, --version  Show the version and exit.
  -h, --help     Show this message and exit.

Commands:
  alignment  Get a message about Heart-Centered AI Alignment  + 🤖.
  commit     Generate a git commit message and commit changes after you...
  debug      Run a command and get debugging advice if it fails.
  fun-fact   Tell me something interesting about programming or AI.
  version    Print the version number.

Note: The first time you run it, you'll be prompted to enter your OpenAI API Key, which is required, as we use OpenAI language models for the AI. You can get one for free by visiting your API key settings page.

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 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.
  • Code Formatting: Automatically formats code according to a specified style guide.
  • Error Detection: Detects errors in code and suggests potential fixes.
  • Test Generation: Generates unit tests for code.
  • Code Generation: Generates boilerplate code for common tasks.
  • 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
  • Linting: Checks code for linting errors and automatically fixes them where possible.
  • Handle GitHub Issues: Handles issues that you assign to @aicodebot. It could also suggest labels for new issues based on their content.

User Interfaces

  • Command-line installable via pip: aicodebot can be installed as a Python package using pip install aicodebot
  • 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.
  • Callable as a GitHub action: Can be called as a GitHub action to perform tasks on GitHub repositories.
  • 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

GitHub Build CodeCov Pytest

Code Quality

Ruff pre-commit Code style: black Imports: isort Super Linter

Infrastructure

Python 3.11

Open AI

Dev Environment

  1. Clone the repository
git clone git@github.com:novara-ai/aicodebot.git
  1. Set up a virtual environment (I recommend using virtualenvwrapper)
mkvirtualenv --python=`which python3` aicodebot
  1. Install the dependencies:
pip install -r requirements/requirements-dev.txt
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aicodebot-0.4.1.tar.gz (26.0 kB view hashes)

Uploaded Source

Built Distribution

aicodebot-0.4.1-py3-none-any.whl (23.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page