Skip to content

lyrakeen/ask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ask

A minimal Bash CLI tool for sending prompts to an OpenAI-compatible LLM API.

Dependencies

  • curl
  • jq

Setup

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_URL
  • ASK_MODEL
  • ASK_API_KEY

Usage

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:"

Installation

git clone https://github.com/yourusername/ask.git
cd ask
chmod +x ask
cp ask /usr/local/bin/ask

Known Limitations

  • 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

License

MIT — see LICENSE

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages