Skip to main content

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 Anthropic
  • OPENAI_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

nh_ask_cli-0.3.2.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nh_ask_cli-0.3.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file nh_ask_cli-0.3.2.tar.gz.

File metadata

  • Download URL: nh_ask_cli-0.3.2.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

Hashes for nh_ask_cli-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9b4398371ddda2c675691d7bd15a2eb2ed9ba6e03d55e54327510ec82ac1aca9
MD5 93694ba4bc45cb9c075968d057d12ac3
BLAKE2b-256 011038acc74c3167c3bb96933243dbfc366d7f9a8f7f9036f6216702e309ccf5

See more details on using hashes here.

File details

Details for the file nh_ask_cli-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: nh_ask_cli-0.3.2-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

Hashes for nh_ask_cli-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad1810e4a29fe60895c975388a41c2dcbc298fb508f8269e5c4f2117755dbd61
MD5 40ec6df7b3a0009faf12a83ca1afdc6e
BLAKE2b-256 f3d12cb953fd018143db83923756fbbf590f202d59848538374547477e1199cb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 files

0.3.0

2 files

0.2.15

2 files

0.2.12

2 files

0.2.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page