Coder Social home page Coder Social logo

ai-debug's Introduction

AIDebug Console

Downloads Downloads Downloads

Alt Text

AIDebug Console is a Python-based command line application that leverages the power of OpenAI's GPT models to assist with debugging and developing software projects. It provides a user-friendly interface for interacting with your codebase, running your project, and even debugging your code with the help of AI.

Features

!! Now Supports GOOGLE Geminai!! Will soon support Open Source Models

  • Project Management: Select and deselect project files and directories.
  • Project Configuration: Configure specific project details such as language, type, framework, and run command.
  • Code Execution: Run your project directly from the console. (Automatically catches errors and asks user if they want to debug)
  • AI Debugging: Debug your project with the help of OpenAI's GPT Models.
  • AI Feature Request: Request a feature for your project from OpenAI's GPT Models.
  • AI Code Documentation: Get a README.md file for your project's GitHub repository.

Installation

Install With Pip

pip install aidebug

Manual Build and Install

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Install the required Python packages using pip:
pip install setuptools wheel
  1. Build the project with setup.py:
python setup.py sdist bdist_wheel
  1. Change directory to the built project:
cd dist
  1. Install the built .whl file with pip:
pip install aidebug-0.0.8-py3-none-any.whl

Usage

  1. Set the necessary environment variables. You need to provide your OpenAI API or Google AI API key:
export OPENAI_API_KEY=your_openai_api_key
export GOOGLE_API_KEY=your_GOOGLE_API_KEY
  1. Run the project:
aidebug
  1. Use the available commands to manage and debug your project:
  • help: List all available commands.
  • update_codebase: Update the contents of the selected project files.
  • project: Perform project related operations (select, deselect, run, files).
  • config: Configure project and client specifics.
  • exit: Exit the AI-Debug console.
  • debug: Debug project with GPT by providing the relevant error message.
  • feature: Request a feature for your project from GPT.
  • readme: Generate a README.md file for your project.

Commands

  • update_codebase: Reads the contents of each selected file and updates the stored contents.

  • project select: Launches a directory browser to select project files and directories.

  • project deselect: Launches a directory browser to deselect files.

  • project run: Runs the project using the configured run command.

  • project files paths: Prints selected file paths.

  • project files contents: Prints selected file paths and contents.

  • config project language: Prompts user to input project language.

  • config project type: Prompts user to describe the type of project.

  • config project framework: Prompts user to input the framework used in the project.

  • config project run: Prompts user to input the command to run the project.

  • config openai model: Sets the OpenAI model.

  • config openai temperature: Sets model temperature.

  • config client type: Sets the client type (openai, google, open_source).

  • config client api_key: Sets the API key for the selected client type (if applicable).

  • debug: Debug project with GPT. Input the error message as the argument.

  • feature: Request a feature for your project from GPT. Describe the required feature as an argument.

  • readme: Generate a README.md file for your project's Github repository.

Example

Start the AI-Debug shell:

python -m aidebug

Select project files:

AIDebug > project select

Update codebase:

AIDebug > update_codebase

Run the project:

AIDebug > project run

Configure project language:

AIDebug > config project language
Enter project language: Python

Debug project:

AIDebug > debug <error message>

Request a new feature:

AIDebug > feature <feature description>

Generate a README file:

AIDebug > readme

Running System Commands

AIDebug Console allows you to run native system commands directly from the shell. Simply input the desired command, and it will be executed in the console.

For example, to list the files in the current directory, you can use the command ls:

> ls

This feature provides flexibility and convenience for running various system tasks alongside your project debugging and development.

Credits

This project has borrowed code from TheR1D's shell_gpt project. I would like to express my gratitude for the contribution to the open-source community which has greatly aided the development of this project.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the GNU v3 GPL-3.0 License. See the LICENSE file for details.

ai-debug's People

Contributors

00-python avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

patrickkenya

ai-debug's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.