Query papers using RAG (PaperQA2 or LEANN). Use when user needs synthesized answers from papers, asks "what does paper X say about Y", or needs cited responses.
Use papi ask for questions requiring synthesis across papers or cited answers.
Before using RAG, consider cheaper alternatives:
papi search --rg "query" (fast, no LLM)papi search --rg --regex "term one|term two" (--regex is required)papi search "query" (BM25)papi show <paper> -l eq|tex|summary (when you know the paper)Use papi ask only when:
# PaperQA2 (default) — full RAG with citations
papi ask "question"
# LEANN — faster semantic search + LLM
papi ask "question" --backend leann
# Structured output for programmatic use
papi ask "question" --format evidence-blocks
For quick retrieval without full RAG:
leann_search(index_name, query, top_k) — fast semantic searchretrieve_chunks(query, index_name, k) — PaperQA2 chunks with citationsCheck available indexes: leann_list() or list_pqa_indexes()
RAG answers include:
For general CLI commands, see /papi.
Edit PDFs with natural-language instructions using the nano-pdf CLI.
Control Sonos speakers (discover/status/play/volume/group).
Terminal Spotify playback/search via spogo (preferred) or spotify_player.
Capture frames or clips from RTSP/ONVIF cameras.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Category:tools