ask
AI CLI tool for natural language interaction with LLMs.
Installation
Using Homebrew (macOS)
First, add and trust the tap:
brew tap nimahejazi/tap
brew install nh-ask-cli
brew upgrade nh-ask-cli
Note: You may need to run brew trust nimahejazi/tap if Homebrew requires verification.
From Source
Requires Python 3.9 or later.
git clone https://github.com/nimahejazi/ask.git
cd ask
pip install -e .
Usage
# Interactive chat mode
ask --it
# Quick query
ask "What is the capital of France?"
# Command mode (extract only executable commands)
ask -c "List files in current directory"
# With tools
ask -t ./tools.sh "Do something with tools"
Configuration
Run ask once to configure your preferred LLM provider (Mock, Ollama, LM Studio, Anthropic, or ChatGPT).
API Keys and Environment Variables
For Anthropic and ChatGPT providers, you can set your API key either in the config file (via ask interactive setup) or via environment variables. Environment variables are read without writing to the config file:
ANTHROPIC_API_KEY— for AnthropicOPENAI_API_KEY— for ChatGPT (OpenAI-compatible)
Precedence: a key stored in ~/.askrc takes precedence over the environment variable. If no key is stored in config, the environment variable is used. ask --show-config indicates whether a key is set without ever printing its value, and key entry is masked (no echo) in the terminal.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nh_ask_cli-0.3.0.tar.gz.
File metadata
- Download URL: nh_ask_cli-0.3.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fbe9e562258cdd6e0cb06b1119ec9823c0ca15eef967a2e30f471369e6dbdab
|
|
| MD5 |
d9240c7a304acedc4d9d3e8df6181b76
|
|
| BLAKE2b-256 |
7d830cc95ed0b2d1244394d4fdcafbde37802d754c056966c83dc3eef9ab9871
|
File details
Details for the file nh_ask_cli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: nh_ask_cli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90bbe8e4f84c302c9c2cdeade49eabde97b78058cd8852c2b376464df3a50774
|
|
| MD5 |
7b9f0f0bcc0552548e4267454cd19ce3
|
|
| BLAKE2b-256 |
816ee9fa3b4d9f7335f428142058ddcb7f5f2bc90224dc14f3987bc8e168b51f
|