A minimal Bash CLI tool for sending prompts to an OpenAI-compatible LLM API.
curljq
Set these environment variables:
export ASK_API_URL="https://api.groq.com/openai/v1/chat/completions"
export ASK_MODEL="llama-3.3-70b-versatile"
export ASK_API_KEY="your-api-key-here"The script expects these exact variable names:
ASK_API_URLASK_MODELASK_API_KEY
ask "What is the capital of France?"Arguments are combined into one prompt:
ask "Establishment dates of" "Turkey" "Azerbaijan" "Japan"Piped input is also supported:
cat script.sh | ask "Explain this Bash script:"Arguments and piped input can be used together:
echo "uname -a output here" | ask "Explain this output briefly:"git clone https://github.com/yourusername/ask.git
cd ask
chmod +x ask
cp ask /usr/local/bin/ask- Stateless; no conversation history
- Long prompts may exceed model limits
- No streaming output
- Requires
jq - Requires valid environment variables
- Requires network access to the API provider
MIT — see LICENSE