Coder Social home page Coder Social logo

mahdeensky / chatgpt-terminal-completion Goto Github PK

View Code? Open in Web Editor NEW
59.0 3.0 8.0 12 KB

Attempt at using ChatGPT to issue commands based on comments in the terminal.

License: MIT License

Python 91.16% Shell 8.84%
autocomplete chatgpt chatgpt-api command-line command-line-tool terminal terminal-based

chatgpt-terminal-completion's Introduction

ChatGPT-Terminal-Completion

Attempt at using ChatGPT to issue commands based on comments in the terminal. (Python 3.9+)

Supports MacOS, uses pbcopy to copy to clipboard

Implements how command for querying ChatGPT.

ezgif-2-e5baff6ad3

Setup

  1. Install python packages using pip3 install -r requirements.txt
  2. Put the function in script.sh to your bashrc/zshrc configuration file.
  3. Replace the path in the function with the path to your python file.
  4. Make a new .env file in the python file directory with your email and password formatted like
  5. That should be everything
export EMAIL=email_chatgpt
export PWD=your_password
git clone [email protected]:MahdeenSky/ChatGPT-Terminal-Completion.git ~/.chatgpt_completion
cd ~/.chatgpt_completion
pip3 install -r requirements.txt
cat script.sh|sed -r "s|\"Directory of the script\"|`pwd`|g" >>~/.${SHELL##*/}rc
echo "email=${EMAIL}" >> .env
echo "password=${PWD}" >> .env
source ~/.${SHELL##*/}rc

Support

For linux, an alternate copy to clipboard command is to use xsel or xclip and replacing the current copy command with said commands.

Reference

https://github.com/acheong08/ChatGPT

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.