Coder Social home page Coder Social logo

heygpt's Introduction

HeyGPT

This is a simple command-line interface tool that allows you to interact with ChatGPT from OpenAI or Azure.

You can use it to:

  • Chat with ChatGPT and get responses
  • Quick chat with ChatGPT and get responses
  • Pipe text from another command into HeyGpt and get responses

Requirements

Currently, to use HeyGpt you need an API key from OpenAI or Azure. You can sign up for that on their website.

Installation

Debian / Ubuntu / macOS

$ curl https://raw.githubusercontent.com/p208p2002/heygpt/main/setup.sh | bash

Usage

Please note that you will be prompted to enter your OpenAI or Azure API key during initialization, so make sure you have that ready.

You can also modify your configuration file located at .heygpt-config in your home directory.

  • To initialize your HeyGpt configuration with OpenAI, use the init command:
$ heygpt init
  • To initialize your HeyGpt configuration with Azure, use the init-azure command:
$ heygpt init-azure
  • To chat with ChatGPT, simply exec heygpt then type your message and press Enter.
$ heygpt
  • To quick chat with HeyGpt, use the quick chat command
$ heygpt "how to find my ip address" # The response will vary based on your system.
  • To pipe text from another command, use the pipe | character followed by heygpt, like so:
$ vim --help | heygpt "translate to traditional chinese" # cli-tool help message translate
$ cat main.py | heygpt "wirte README.md for this script" >> README.md # generate document for some script

Build From Source

Installing Rust is necessary. If you don't have Rust installed, you can install it using the command below:

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Clone this repo

  2. Go into heygpt then run command cargo build --release

    For Ubuntu also install: build-essential, pkg-config, openssl, libssl-dev, curl, git

  3. Copy target/release/heygpt to your PATH

heygpt's People

Contributors

p208p2002 avatar

Stargazers

Leonz avatar  avatar  avatar  avatar  avatar Aleksei Dorkin avatar Eric Lam avatar

Watchers

 avatar  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.