Giter Site home page Giter Site logo

ebenjs / gpt-shell Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 410 KB

Bring Chat-GPT to the console. Unleash the power of the OpenAI API directly in the terminal.

Home Page: https://gptshell-landing-page.vercel.app/

License: Apache License 2.0

JavaScript 90.03% Shell 9.97%
ai bash chatgpt cmd collaborate

gpt-shell's Introduction

npm version Build Status Known Vulnerabilities License: Apache

The app is a command line client for chat gpt. It allows users to ask gpt questions and receive responses directly in the console. Written in nodejs.

Table of Contents

Prerequisites

gpt-shell is a command line tool that can be installed on any operating system. However, it requires any recent version of Node.js to be installed.

Installation

Choose your preferred installation method below. Unix based systems (Linux, macOS) users can install gpt-shell via the command line with the following scripts:

Automatic install on debian based distros

curl -s https://raw.githubusercontent.com/ebenjs/gpt-shell/main/install-scripts/install-script-deb.sh | sudo bash

Manual install from sources

Common steps

git clone https://github.com/ebenjs/gpt-shell.git
cd gpt-shell
npm install

Linux and MacOS

cp .env.example .env
sudo chmod +x index.js
ln -s "$(pwd)/index.js" /usr/local/bin/gpts

Windows

On windows, first you need to copy the .env.example file to .env.

copy .env.example .env

Then you need to create a gpts.cmd file in C:\Windows\System32 with the following content:

@echo off
node "C:\path\to\gpt-shell\index.js" %*

Usage

gpts ask -p "What is the meaning of life?"

Configuration

gpts config -k YOUR_API_KEY -m MODEL_NAME -u API_URL

-k or --key is your openai api key.
-m or --model is the model name to use. Default is gpt-3.5-turbo.
-u or --url is the url of the gpt server. Default is https://api.openai.com/v1/chat/completions.

The configuration command is needed only once. It will create a .gpt-shell-config.json file in current directory. You can edit this file manually if you want to change the configuration.

Contributing

Contributions are welcome. Please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

For more information, please refer to the contributing guidelines.

gpt-shell's People

Contributors

ebenjs avatar

Stargazers

 avatar  avatar Bula Sete avatar Alessandro Luca Cremasco avatar  avatar

Watchers

 avatar

Forkers

erkanserhan

gpt-shell's Issues

Write to file

allow users to export current session conversations to a file.

Read from file

Allow users to pass a file content to the prompt.

Eg: "Hi gpt please summarize this text for me : " -f "/home/document/sampletext"

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.