GithubHelp home page GithubHelp logo

rocklandceo / autopilot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fjrdomingues/autopilot

0.0 0.0 0.0 1.74 MB

Code Autopilot, a tool that uses GPT to read a codebase, create context and solve tasks.

JavaScript 100.00%

autopilot's Introduction

To simplify the installation process, you can utilize this project by installing the GitHub app available at https://github.com/marketplace/code-autopilot-ai-coder. This app uses autopilot to automatically resolve issues that you open on GitHub. It provides an easy interface to use it and it’s how I have been using it personally.

Autopilot - An AI developer

Autopilot is an AI tool that utilizes GPT to read a codebase, create context, and solve tasks that you request.

Autopilot Demo

How it works

  1. You point AutoPilot at a codebase with a task.
  2. AutoPilot generates and upkeeps a DB with metadata on the codebase files. (within the codebase directory)
  3. AutoPilot decides which existing files it needs for the task by using the metadata DB.
  4. AutoPilot tries to implement the requested task on each relevant file.

Features

  • 📚 - Pre-processes codebase files.
  • 🤖 - Implements code changes for you.
  • 🚀 - Parallel calls to agents where possible.
  • 📝 - Shows you what was updated. (Full process log with each AI interaction also produced)
  • 🕹️ - Interactive mode - see the process with retry, continue, abort options.

Tasks expectations

  • Referencing current code:
    • ✅ Referencing a specific file by project relative path.
    • ✅ Referencing a specific file by file name only, ignoring the subdirectories path.
    • ✅ Referencing a specific function within a file without the filename.
    • ✅ Referencing a major business concept that is exclusively used in one file.
    • ✅ Referencing all project files.
    • 🤔 General logical requests. Your milage would differ by model, codebase and task. Some work. (Should introduce task scoring)
  • Changes executed:
    • ✅Create a new file based on an existing file.
    • ❌Start a new file from scratch.
    • ✅Update an existing file.
    • ✅Update multiple existing files.
    • ❌Delete existing files. (It might empty them out, but not delete them currently)
    • ❌Start using new 3rd party libraries. (Needs arbitrary code execution to install the library)
    • ❌Cascade updating related files like tests. (Coming soon)
    • ❌Test the code it wrote and self fix.

Prerequisites

nodejs v18 or above.

🛠️ Installation

  1. Clone the repository: git clone https://github.com/fjrdomingues/autopilot.git
  2. Do cd autopilot to install dependencies: npm ci
  3. Create the .env file and set up the environment variables:
    1. Copy the .env.template file to .env: cp .env.template .env
    2. Set up an OpenAI API key and file with the key: OPENAI_API_KEY=<your-api-key>. Create openAI API key
    3. Set the path to your code CODE_DIR=<path-to-your-code> (or use -d path-to-your-code later)
    4. Update IGNORE_LIST=node_modules,coverage,public,__tests__
    5. Update FILE_EXTENSIONS_TO_PROCESS=.js,.tsx,.ts,.jsx

Running

  • node ui -t "YOUR_TASK" - is the easiest way to start.
    • Solutions will be auto applied on your code and a git diff shown if possible.
    • Alternatively you may specify --auto-apply=false.
  • node ui -h - will show you all the options.

Interactive mode

Use node ui -i for an interactive mode, here you can review the output of each step before proceeding.

🤝 Contributing

We are running autopilot on a server connected to the https://github.com/fjrdomingues/autopilot repository. New issues created will trigger autopilot and create a new Pull Request with a proposal. Running with gpt-4

We welcome contributions! Please submit pull requests to the repository, and ensure your changes align with the project's goals and guidelines. Together, we can make Autopilot an even more powerful and efficient tool for developers!

Running tests - all

npm run test - runs all the tests

Running tests - Unit test

npm run unit-test - runs the unit tests

Running tests - Benchmarks

npm run e2e-test - runs the end to end tests

Code structure

  • agents - interactions with language models.
  • modules - most other internal libs.
  • ui.js - The main().
  • logs - document a task run.

autopilot's People

Contributors

fjrdomingues avatar hatkyinc2 avatar klaudioz avatar ofir-petrushka avatar ryanmac avatar

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.