Autopilot is an AI tool that utilizes GPT to read a codebase, create context, and solve tasks that you request.
(Generated by autopilot)
Task: Create a diagram explaining what this project and the process
+----------------------+ +----------------------+ +----------------------+
| User inputs TASK | | Read summaries of | | Identify relevant |
| | --->| all the files in | --->| files for the task |
| | | codebase | | using GPT AI |
+----------------------+ +----------------------+ +----------------------+
|
v
+-----------------------+
| Extract relevant |
| context from files |
| using GPT AI |
+-----------------------+
|
v
+-----------------------+
| Suggest changes based |
| on context & task |
| using GPT AI |
+-----------------------+
|
v
+-----------------------+
| Display suggested |
| changes to the user |
+-----------------------+
- 📚 Pre-processes all the relavent code base files.
- 👀 A watcher continuously updates files that have been modified.
- 🧩 Desides what files to update for the given task.
- 🤖 Does code updates for you.
- 📋 Shows you what was updated. Full process log with each AI interaction also produced.
- 🔧 Optional interacrive mode to see the process and retry, continue, abort options.
- Clone the repository:
git clone https://github.com/fjrdomingues/autopilot.git
- Do
cd autopilot
to install dependencies:npm install
- Create the
.env
file and set up the environment variables:- Copy the .env.template file to .env:
cp .env.template .env
- Set up an OpenAI API key and file with the key:
OPENAI_API_KEY=<your-api-key>
. Create openAI API key - Set the path to your code
CODE_DIR=<path-to-your-code>
- Update
IGNORE_LIST=node_modules,coverage,public,__tests__
- Update
FILE_EXTENSIONS_TO_PROCESS=.js,.tsx,.ts,.jsx
- Copy the .env.template file to .env:
node createSummaryOfFiles --all
- creates a summary of all files (required for first run) and starts the watcher.node createSummaryOfFiles
- starts the watcher for any code changes which would trigger a file re-index.
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.
This project is still in alpha stage. It's recommended that you use node ui -i
for an interactive mode here you can review the output of every step before proceeding.
- createSummaryOfFiles.js: Manages the code summarization process for JavaScript and TypeScript files.
- ui.js: Handles the user interface (UI) interaction and utilizes the GPT-based summaries to complete tasks.
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!