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"
# Notes-only mode (answer strictly from your personal notes)
ask -n "what's six sigma DMIAC?"
# Skip notes for this query
ask -N "What is the capital of France?"
# Notes
ask notes # interactive browser (list, view, edit, delete)
ask notes add "Deploy Checklist\nrun kubectl first #ops"
ask notes list [--tag ops]
ask notes show deploy-checklist
ask notes edit deploy-checklist # opens $EDITOR
ask notes delete deploy-checklist
ask notes search "kubectl rollout"
ask notes reindex
Notes
ask keeps personal notes (~/.ask-notes/*.md, plain markdown — title is the first
line, inline #tags allowed anywhere) and consults them when answering questions:
- Default on: every query gets
search_notes/read_note/save_notetools, so the assistant can look up a relevant note, cite it as[note: Title](file://path), and save new notes when you ask it to. Use-N/--no-notesto skip notes for a query, or-n/--notes-onlyto answer strictly from notes (no general knowledge). AI cannot delete notes — useask notes delete. Read-only note tools run without confirmation;save_notestill asks. - Semantic search: notes are embedded with your provider's embedding endpoint
(ollama:
nomic-embed-text— offered at setup; ChatGPT:text-embedding-3-small; LM Studio: its loaded embedding model). Providers without embeddings (Anthropic, Mock) fall back to keyword search automatically. - Files are the source of truth: edit
~/.ask-notes/*.mdby hand anytime; the index rebuilds lazily (or force one withask notes reindex).
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.
Release files for nh-ask-cli 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nh_ask_cli-0.5.0.tar.gz | 41.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nh_ask_cli-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:73.2 kB
Release files / nh_ask_cli-0.5.0.tar.gz
| Download URL | nh_ask_cli-0.5.0.tar.gz |
|---|---|
| Size | 41.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08493eed7dfe85fb17bbf8c82aa443b02fa15ef44a6b848c18ea8ce0b4bfd4b7
|
|
BLAKE2b-256 checksum How to use checksums |
46b9b4c3e7cf99623f205b98c25f96b5361ce4c9c462cb4f229a371b97cf34b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / nh_ask_cli-0.5.0-py3-none-any.whl
| Download URL | nh_ask_cli-0.5.0-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7c7d1dc512e80b4074fb8b71eb8d10f159bc916e620f5a777fa9753b713c66b
|
|
BLAKE2b-256 checksum How to use checksums |
86c485682a469b672e7e85694b63f5fa4ad9c705a507186bb970411845e446f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|