Skip to content

alwitt/cli-gpt

Repository files navigation

CLI GPT - Basic CLI Interface to OpenAI Model Services

MIT Go Report Card CICD

CLI GPT is a simple command line application build around go-openai offering a ChatGPT like experience.

Installation

Install the application

go install github.com/alwitt/cli-gpt@latest

Create a user friendly alias

alias gpt="cli-gpt"

Getting Started

First, create a new user entry.

gpt create user

create-user-entry

Start a new chat session. Select turbo to use the model ChatGPT is based on. For more information regarding the request parameters, see OpenAI API documentation.

gpt create chat

start-new-chat

To append to the currently active chat session (the active chat session has in-focus set to true)

gpt chat

append-to-active-chat

To change the currently active chat session

gpt context select-chat

change-active-chat

To view the complete history of a chat session

gpt describe chat

view-chat-history

Multi-user Support

The application associates chats with a user, and supports multiple users. However, only one user can be active at any point in time.

To change the currently active user

gpt context select-user

change-active-user

Local Development

First verify all unit-tests are passing.

go test ./...

Then build the application.

go build -o gpt .