1.0.7 • Published 1 year ago

quick-question-cli v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Quick Question CLI

quick-question-cli is a simple command-line tool for asking questions to ChatGPT using the OpenAI node.js library. It allows users to quickly interact with ChatGPT by providing a question directly as a command-line argument. This package was built with the guidance of GPT-4.

Note: This README was also written by ChatGPT.

Installation

You can install this package globally by running:

npm install -g quick-question-cli

Ensure that you have a valid OpenAI API key and access to the ChatGPT API.

Usage

To use the CLI tool, simply run the following command:

qq "Your question here"

For example:

qq "What is the capital of France?"

This command will send your question to the ChatGPT API and display the response in the terminal.

Configuration

You need to configure the API key for the OpenAI API. Set the OPENAI_API_KEY environment variable in your shell configuration file (e.g., .bashrc, .zshrc, or .bash_profile), depending on your operating system and shell:

export OPENAI_API_KEY=<your_api_key>

Replace <your_api_key> with your actual API key. After setting the environment variable, restart your terminal or run source <your_shell_config_file> for the changes to take effect.

Help

For more information and help, run the following command:

qq --help

Summarize Web Page Content with --url Flag

The --url flag allows you to ask ChatGPT to summarize the content of a web page using the quick-question-cli tool. Simply provide the URL of the web page, and the CLI tool will download the page, extract the title, and ask ChatGPT to provide a summary.

Usage

To use the --url flag, run the following command:

qq --url "https://www.example.com"

Replace https://www.example.com with the URL of the web page you want to summarize.

Example

For example, you can use the --url flag to summarize the OpenAI Wikipedia page as follows:

qq --url "https://en.wikipedia.org/wiki/OpenAI"

This command will ask ChatGPT to summarize the content of the OpenAI Wikipedia page. The output will be a summarized version of the page content provided by ChatGPT.

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago