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.
git clone https://github.com/MarkusJohansen/oneshot.git
cd oneshot
./setup.sh
export OPENAI_API_KEY='your_api_key_here'osh "What's the capital of Bhutan?"
# Output: The capital of Bhutan is Thimphu.# 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| 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 |
gpt-4o-mini- Default: Fast and efficientgpt-4- More capablegpt-3.5-turbo- Legacy option
- Python 3.6+
- OpenAI API Key
- Internet connection
MIT License - see LICENSE file for details.