nima.hejazi
← Back to projects

ask: Terminal LLM Assistant

Python CLI LLM Terminal
Visit GitHub repo

ask is a Python CLI for natural language interaction with LLMs. It supports interactive chat mode, quick queries, command extraction, tool integration, and personal notes the assistant consults automatically.

Overview

  • Interactive chat mode via --it
  • Quick queries from the command line
  • Command extraction with -c (outputs bare commands)
  • Tool support via -t ./tools.sh
  • Personal notes in ~/.ask-notes/*.md: consulted by default, cited inline
  • Notes-only mode via -n (answer strictly from notes) and -N (skip notes)
  • Provider configuration on first run: Mock, Ollama, LM Studio, Anthropic, ChatGPT
  • Fully local with Ollama or LM Studio: chat, embeddings, and the search index run on your machine

Installation

Homebrew (macOS)

brew tap nimahejazi/tap
brew install nh-ask-cli

You may need brew trust nimahejazi/tap.

pip

pip install nh-ask-cli

From Source

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

# Manage notes
ask notes add "Deploy Checklist\nrun kubectl first #ops"
ask notes search "kubectl rollout"

Notes

Notes are plain markdown files in ~/.ask-notes/ (title is the first line, inline #tags allowed). The assistant gets search_notes / read_note / save_note tools and cites them as [note: Title](file://path). Notes are embedded for semantic search when the provider supports it, with keyword fallback otherwise. The markdown files are the source of truth; the index is a derived sqlite cache rebuilt lazily. Read-only note tools run without confirmation; save_note still asks. AI cannot delete notes.