filegpt
v0.0.6
Published
fileGPT is a powerful and easy-to-use CLI tool that allows you to interact with the OpenAI GPT-4 & GPT-3.5 model to get code completion suggestions and apply the instructions to your code directly.
Downloads
6
Readme
fileGPT
fileGPT is a powerful and easy-to-use CLI tool that allows you to interact with the OpenAI GPT-4 & GPT-3.5 model to get code completion suggestions and apply the instructions to your code directly.
Installation
To install this package globally, you can use the following command:
npm install -g filegpt
Usage
npx filegpt <API_KEY> <File_Path> <Instruction>
<API_KEY>
: Your OpenAI API key.<Instruction>
: The instruction you want to provide to the GPT-3.5-turbo model.<File_Path>
: The path to the file you want to apply the changes to.
Example
Suppose you have the following code in a file called example.js
:
function helloWorld() {
console.log("Hello, world!");
}
And you want to add a new function to say goodbye. You can run the following command:
npx filegpt "sk-123..." example.js "add a function to say goodbye"
The CLI tool will interact with the GPT- 3.5/4 model and update the file with the new function:
function helloWorld() {
console.log("Hello, world!");
}
function sayGoodbye() {
console.log("Goodbye!");
}
Dependencies
Support
If you encounter any issues or have any feature requests, please feel free to create an issue on the GitHub repository.
Contributing
Contributions are always welcome! Please fork the repository, make your changes, and submit a pull request.
Note: This package uses the OpenAI API, which may have its usage costs. Please review the OpenAI Pricing for more information.