Documentation

arXiv CLI

arxiv-pp-cli

Install

npx -y @mvanhorn/printing-press-library install arxiv

Installs the CLI binary and the agent skill for Claude Code, Codex, Cursor, Gemini CLI, Copilot, and more. Add --cli-only or --skill-only for one half. Requires Node.

Documentation

Public Atom API for searching and fetching arXiv e-print metadata.

Created by @hnshah (Hiten Shah). Contributors: @sdhilip200 (Dhilip Subramanian).

Quick Start

1. Install

See Install above.

2. Verify Setup

arxiv-pp-cli doctor

This checks your configuration.

3. Try Your First Command

arxiv-pp-cli query --search-query 'cat:cs.AI' --max-results 5 --sort-by submittedDate --sort-order descending

Unique Features

These capabilities aren't available in any other tool for this API.

Research discovery

  • query — Search arXiv with documented query expressions and agent-friendly output controls.
  • query — Fetch latest AI/research papers by category using submitted-date sorting and bounded result counts.
  • query — Fetch exact papers by arXiv ID or versioned arXiv ID.

Usage

Run arxiv-pp-cli --help for the full command reference and flag list.

Commands

query

Manage query

  • arxiv-pp-cli query --search-query 'cat:cs.AI' --max-results 5 - Search arXiv papers or fetch recent papers by category.
  • arxiv-pp-cli query --id-list 1706.03762 --max-results 1 - Fetch exact papers by arXiv ID or versioned arXiv ID.

Output Formats

# Human-readable table (default in terminal, JSON when piped)
arxiv-pp-cli query --search-query 'cat:cs.AI' --max-results 5 --sort-by submittedDate --sort-order descending

# JSON for scripting and agents
arxiv-pp-cli query --id-list 1706.03762 --json

# Filter to specific fields
arxiv-pp-cli query --id-list 1706.03762 --json --select entries.id,entries.title

# Dry run — show the request without sending
arxiv-pp-cli query --search-query 'cat:cs.CL' --max-results 1 --dry-run

# Agent mode — JSON + compact + no prompts in one flag
arxiv-pp-cli query --search-query 'all:electron' --max-results 3 --agent

Agent Usage

This CLI is designed for AI agent consumption:

  • Non-interactive - never prompts, every input is a flag
  • Pipeable - --json output to stdout, errors to stderr
  • Filterable - --select entries.id,entries.title returns only fields you need
  • Previewable - --dry-run shows the request without sending
  • Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
  • Live-first - arXiv search is most useful against the live API; sync/local-store commands require an explicit scope, such as arxiv-pp-cli sync --search-query 'cat:cs.AI' --max-pages 1 or arxiv-pp-cli sync --id-list 1706.03762 --max-pages 1
  • Agent-safe by default - no colors or formatting unless --human-friendly is set

Exit codes: 0 success, 2 usage error, 3 not found, 5 API error, 7 rate limited, 10 config error.

Health Check

arxiv-pp-cli doctor

Verifies configuration and connectivity to the API.

Configuration

Config file: ~/.config/arxiv-pp-cli/config.toml

Static request headers can be configured under headers; per-command header overrides take precedence.

Troubleshooting

Not found errors (exit code 3)

  • Check the resource ID is correct
  • Run the list command to see available items

Generated by CLI Printing Press

For agents: pass /documentation/arxiv/agents.md to install this CLI from a prompt.