Documentation

Wikipedia CLI

wikipedia-pp-cli

Install

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

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

Wikipedia REST API. Get article summaries, search, browse related topics, and access on-this-day events. No authentication required. Uses a polite User-Agent header.

Created by @hnshah (Hiten Shah).

Quick Start

1. Install

See Install above.

2. Verify Setup

wikipedia-pp-cli doctor

This checks your configuration.

3. Try Your First Command

wikipedia-pp-cli feed mock-value

Usage

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

Commands

feed

Manage feed

  • wikipedia-pp-cli feed get-on-this-day - Returns events, births, deaths, or holidays that occurred on a given date.

page

Article content and metadata

  • wikipedia-pp-cli page get-html - Returns the full article body as styled HTML.
  • wikipedia-pp-cli page get-media - Returns images, videos, and other media files associated with an article.
  • wikipedia-pp-cli page get-random - Returns a random Wikipedia article summary.
  • wikipedia-pp-cli page get-summary - Returns a page summary including title, extract text, thumbnail, and coordinates.

Output Formats

# Human-readable table (default in terminal, JSON when piped)
wikipedia-pp-cli feed mock-value

# JSON for scripting and agents
wikipedia-pp-cli feed mock-value --json

# Filter to specific fields
wikipedia-pp-cli feed mock-value --json --select id,name,status

# Dry run — show the request without sending
wikipedia-pp-cli feed mock-value --dry-run

# Agent mode — JSON + compact + no prompts in one flag
wikipedia-pp-cli feed mock-value --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 id,name 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
  • Offline-friendly - sync/search commands can use the local SQLite store when available
  • 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

wikipedia-pp-cli doctor

Verifies configuration and connectivity to the API.

Configuration

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

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/wikipedia/agents.md to install this CLI from a prompt.