Skip to content

MarkusJohansen/oneshot

Repository files navigation

Oneshot Logo

Oneshot

The fastest way to get AI answers from your terminal

Oneshot is a CLI tool that brings ChatGPT directly to your terminal. Ask questions and get instant AI-powered answers without switching between browser tabs.

Installation

git clone https://github.com/MarkusJohansen/oneshot.git
cd oneshot
./setup.sh
export OPENAI_API_KEY='your_api_key_here'

Usage

osh "What's the capital of Bhutan?"
# Output: The capital of Bhutan is Thimphu.

Examples

# Quick facts
osh "What's the population of Iceland?"

# Code help
osh "How do I reverse a string in Python?"

# Detailed responses
osh "Explain quantum entanglement" --max-tokens 1000

# Different models
osh "Solve this calculus problem" --model gpt-4 --max-tokens 2000

Options

Option Description Default
--model OpenAI model to use gpt-4o-mini
--max-tokens Maximum tokens in response 100
--temperature Response creativity (0.0-1.0) 0.7
--stream Stream response as it's generated false

Available Models

  • gpt-4o-mini - Default: Fast and efficient
  • gpt-4 - More capable
  • gpt-3.5-turbo - Legacy option

Requirements

  • Python 3.6+
  • OpenAI API Key
  • Internet connection

License

MIT License - see LICENSE file for details.

About

CLI tool for one-shot prompting GPT models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published