0.0
No release in over a year
Using ChatGPT from the command line.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 11.1
~> 1.48

Runtime

 Project Readme

Gem Version Container build

Ruby-OpenAI-CLI

A tool to query OpenAI's GPT APIs from the command line.

Usage

To run the tool, you need an API key from OpenAI, you can get one here: https://platform.openai.com/account/api-keys You will be asked to provide on first use of ruby-openai-cli, or you can provide it as OPENAI_API_KEY in your environment.

Rubygem

To install the gem, run: gem install ruby-openai-cli. Then you can use the tool by calling ruby-openai-cli on your command line.

Container

You can also run the tool from a container without installing it:

docker run -ti --rm -v ~/.config/ruby-openai-cli:/root/.config/ruby-openai-cli ghcr.io/digitaltom/ruby-openai-cli:main ruby-openai-cli -c

image

Development

  • Install dev dependencies: gem install awesome_print byebug rubocop
  • Build Rubygem: gem build ruby-openai-cli.gemspec
  • Build container image: docker build -t ghcr.io/digitaltom/ruby-openai-cli .