Code Monkey home page Code Monkey logo

termgpt's Introduction

TermGPT

Giving LLMs like GPT-4 the ability to plan and execute terminal commands

Video explanation and usage examples: https://youtu.be/O4EmRi0_CI4

The notebook also breaks down how the script works.

Usage

Run with $ python3 TermGPT.py You will need to create a .env file similar to https://github.com/Sentdex/TermGPT/blob/main/.env.example, or set OPENAI_API_KEY manually.

From here, you make your programming/development request. The script will run and query GPT-4 for a series of terminal commands to run to achieve this objective. This is including, but not limited to: reading files, writing code, reading websites, running code, running terminal commands...etc.

The proposed commands are stored to a list and then presented back to the user again in bold red text, prior to running. After reviewing these commands, you can opt to run them, or not.

Future work

  • I would like to primarily find an open source model that can yield similar performance to GPT-4 in this realm.
  • Simplify and add more natural language. Most likely, starting "prompts" will need higher and lower level understanding. Rather than doing something like --r [FILENAME], I would like to have a higher level pass via the LLM to determine if any files should be read, allowing for a pure "natural language" approach, along with likely far more generalization.

termgpt's People

Contributors

sentdex avatar victor-hugo-dc 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.