Skip to main content
nisa with no subcommand opens the terminal chat (TUI). Everything below is headless-friendly: stdout is the payload (JSON, BibTeX, CSV, plain text, or bytes); stderr carries the session id, tool activity, the usage footer, and errors.

Global flags

Exit codes

Direct commands

free Index and database lookups. About a second. No model turn.

nisa search [QUERY]

BM25 over the corpus, blended with citation counts. Response: {query|queries, papers:[{arxiv_id,title,year,authors,citation_count,score,snippets,url}], count, offset, limit, truncated, pagination_hint, index_latest_pub_month}.
Ranking blends BM25 with citations, so a recent low-citation paper ranks far below an older well-cited one. An absent recent paper is a ranking artifact, not evidence it doesn’t exist — check index_latest_pub_month before concluding anything from an empty recency window.

nisa semantic-search [QUERY]

Embedding search over abstracts. Same shape as search, except: --query cap is 4 (each query is one embedding call); --year-min / --year-max replace the date flags; papers carry similarity and abstract instead of score and snippets.

nisa paper <ARXIV_ID>

Title, authors, abstract, year, citation count, categories, graph cluster, PageRank, URL. No flags. Hybrid citation-graph proximity + semantic similarity. The best “find related work” tool.

nisa excerpts <ARXIV_ID> --query <Q>

Passages from the paper’s full text matching the query (tokenized OR; quoted phrases match exactly). --max <N> default 10 (1–50). Returns excerpts:[{index, text}] (plus excerpts_raw, count, truncated) with matched_terms, missing_terms, doc_found, full_text_indexed — check those before treating zero excerpts as absence. --format bibtex|csv is rejected.

nisa search-status <SESSION_ID>

Polls an agent-enriched search started through the HTTP API (enrich: true) for newly surfaced papers; --last-count, --last-action-count return only what’s new. nisa search itself is direct and never starts one.

nisa cite <ARXIV_ID>

One BibTeX @misc entry with archivePrefix = {arXiv}. Formatted client-side.

nisa pdf <ARXIV_ID>

Prints {pdf_url}; --out <PATH> downloads the bytes. Uses the cached copy when available, else arxiv.org.

Paper lists

Lists sync with the web app both ways.

Chat-backed commands

usage-tracked Each creates an agent turn on the backend: 30–120 s typical. Rate-limited per machine to 10 per minute, 100 per hour (exit 1 with a wait hint when tripped). The backend can’t yet serve many concurrent research turns — use ask-batch rather than a hand-rolled parallel loop. Direct commands are not limited. All chat-backed commands emit JSON with ok, session_id, answer, arxiv_ids, tokens.cost_usd, duration_ms — on success and failure alike.
All commands are free today. cost_usd fields populate for observability; --estimate and --max-cost exist for when billing comes online.

nisa ask [MESSAGE]

One question, one answer, ephemeral session (deleted on ok: true unless --keep).

nisa exec [MESSAGE]

Multi-turn, streaming. Stdout is the reply (NDJSON with --json). nisa chat is the legacy verbose form of exec (full event stream, --approvals defaults to prompt); prefer exec.

nisa ask-batch

One question per input line, one JSON object per output line. Sequential by design; one invocation uses one rate-limit slot.

nisa wait <SESSION_ID>

Block until an in-flight turn completes (pairs with exec --detach). Counts against the chat rate limit. Flags: --json, --show-tools, --quiet, --no-usage, --timeout <S>.

Sessions

free except send, which starts a model turn like exec (usage-tracked, and not counted by the CLI’s rate limiter). ask sessions auto-delete on success; exec sessions persist until nisa delete or backend retention.

Setup, keys, diagnostics

free
keys requires your browser sign-in to be the credential in use (nisa doctor --jsonauth.source: oauth_credentials). With RAPIDREVIEW_KEY set — or the key the CLI’s browser onboarding stores — all three answer 403 API key management requires browser login. Create keys in the web app (Settings → API Keys), or nisa logout && nisa login first.

Terminal chat

Slash commands, permissions, and ! commands are on Terminal chat.