AI-based CLI tool for code generation and mass refactoring

Overview

fixgpt

Tool that helps you do mass changes across your codebase

  • Create new files
  • Mass refactoring
  • Remove files upon certain conditions
  • Code execution

Watch a demo

  • Code generation - link
  • Mass Update - link
  • Parameters - link

Installation

Install from NPM:

npm i fixgpt -g

Or just use NPX:

npx fixgpt <command> <arg1> <arg2>

Before use

fixgpt will go over your files and will edit them according your request.

It is recommeneded to use GIT (or other VCS) and check the diff of changes yourself, once fixgpt is done.

It is necessary as LLM models are not 100% safe at producing reliable code.

How to use?

1. Initialize using your OpenAI access token

fixgpt init <openai_token>

init command creates a local .fixgpt folder with config.

CAUTION: Make sure to add it to .gitignore file of your project in order to not leak your API keys

2. Create a template

fixgpt create-template ./template.md

This will create a Markdown file with a template which then can be used in run-template command

3. Run it

fixgpt run-template ./template.md

Then grab some coffee and see it working :)

NOTE: OpenAI doesn't allow running multiple requests in parallel, so if you have like 100 files, it will be slow. It can be cheated by using multiple accounts but currently it's not supported

PRO Stuff

Tokens

You can put specific tokens into a template in order to ask for some data or use previous responses.

  • [[args.input.ArgumentName]] - asks for ArgumentName before execution
  • [[ask.input.ArgumentName]] - asks for ArgumentName during execution (unlike the previous one, this one will be asked separately for each file in "Mass Update")
  • [[responses.0.code]] - code from task response (where 0 is an index of the task)
  • [[responses.0.file]] - filename from task (where 0 is an index of the task)

TODO

  • Create/remove files API
  • Take variables from CLI
  • Run without template
  • Run another template
  • Support other models (only GPT 3.5 for now)
  • Parallel threads support

Support

Buy Me a Coffee

You might also like...

Node-cli-starter - Basic starter kit for building Node CLI applications with TypeScript.

node-cli-starter Minimal starter kit for building Node CLI applications with TypeScript. Getting Started To get started clone repo locally and run npm

May 17, 2022

📸 A command-line tool to generate code images of your local code right away from the terminal

📸 A command-line tool to generate code images of your local code right away from the terminal

📸 rayli 📸 A command-line tool to generate code images of your local code right away from the terminal Usage Commands Usage $ npm install -g rayli $

Nov 4, 2022

Serverless boilerplate CLI tool: GitLab and GitHub CI/CD, DataDog, Multi-Region, and many more setups.

Serverless Full Boilerplate This is a CLI tool to create Serverless boilerplate applications. Ready to deploy in a few seconds. Usage npm i -g create-

Nov 7, 2022

API and CLI tool to fetch and query Chome DevTools heap snapshots.

Puppeteer Heap Snapshot Capture heap snapshots and query the snapshot for objects matching a set of properties. Read more about it in this blog post.

Jan 3, 2023

A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

Warm Up 🔥 👨‍💻 A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snipp

Dec 12, 2022

GitSol - an onchain version control protocol, service and cli tool

GitSol - an onchain version control protocol, service and cli tool

GitSol an onchain version control protocol, service and cli tool. Content what and why 📓 Features ✨ Install 🐙 Usage 💡 Examples 🖍 Documentation 📄

Sep 10, 2022

CLI tool that converts rgb(), rgba(), hex, hsl() and hsla() colors to oklch() in specified CSS files.

convert-to-oklch CLI tool that converts rgb(), rgba(), hex, hsl() and hsla() colors to oklch() in specified CSS files. npx convert-to-oklch ./src/**/*

Dec 20, 2022

A CLI tool to generate barrels with ease, efficiency, and intelligence

A CLI tool to generate barrels with ease, efficiency, and intelligence

JS-Barrels A CLI tool to generate barrels with ease, efficiency, and intelligence Usage npx js-barrels -d ./folder/to/generate/barrels/for Options -d,

Aug 17, 2022
Owner
Anton Kosykh
YOLO Frontend Consultant | Currently keen on Effector
Anton Kosykh
refactoring 2판 스터디

refactoring 2판 스터디 지난 스터디 영상: https://www.youtube.com/playlist?list=PLjQV3hketAJmyZmqXZ1OVEFNctalbf9SX before vs. after 21. 06. 29. Ch01 21. 07. 06. C

Jaenam Jung 40 Dec 20, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
An easy way to mass download osu! beatmaps

Batch Beatmap Downloader (Beta) Download Latest Release Table of Contents About Screenshots Getting Started Prerequisites Usage Build instructions Con

James 65 Jan 3, 2023
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Mass unfollow connections on LinkedIn with a script.

???? English ???? Português About ?? Mass unfollow connections on LinkedIn with a script. Information ℹ There are two ways to mass unfollow your Linke

Yuri 9 Dec 27, 2022
A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Jean Rodríguez 7 Sep 13, 2022
Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

About routes-gen is a framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. Think of it as Prisma,

Stratulat Alexandru 192 Jan 2, 2023
Jester is a test-generation tool to create integration test code.

Code Generator for Integration Tests Introduction Welcome to Jester: An easy-to-use web application that helps you create and implement integration te

OSLabs Beta 54 Dec 12, 2022
Grassp is the first ever CLI based Micro Learning Tool!

grassp-cli Grassp is the first ever CLI based Micro Learning Tool! grassp-cli Usage Commands Usage $ npm install -g grassp $ grassp COMMAND running co

Sahil Pabale 9 Aug 9, 2022