Documentation

POP CLI

pop-pp-cli

Install

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

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

POP API for European electronic invoicing workflows.

This Printing Press blueprint intentionally exposes only the documented 8-operation surface used by the POP MCP README at getpopapi/pop-mcp@07a4a19ad5e657fa94d16fe617b8288e5046c489:

  • create-xml
  • create-ubl
  • create-pdf
  • sdi-via-pop/document-notifications
  • peppol/document-get
  • sdi-via-pop/document-get
  • sdi-via-pop/document-verify
  • sdi-via-pop/document-preserve

The data payloads are intentionally modeled as free-form JSON objects so the CLI can pass through the full POP invoice structure without freezing a brittle nested schema in this catalog spec.

Upstream POP MCP changes should be reviewed periodically and intentionally synced into this print when the documented public surface evolves.

Learn more at Pop.

Created by @mircobabini (Mirco Babini).

Quick Start

1. Install

See Install above.

2. Set Up Credentials

Get your API key from your API provider's developer portal. The key typically looks like a long alphanumeric string.

export POP_API_KEY="<paste-your-key>"

You can also persist this in your config file at ~/.config/pop-pp-cli/config.toml.

3. Verify Setup

pop-pp-cli doctor

This checks your configuration and credentials.

4. Try Your First Command

pop-pp-cli create-pdf

Usage

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

Commands

create-pdf

Create branded PDF invoices and optionally email them.

  • pop-pp-cli create-pdf - Generate a branded PDF invoice. Depending on account setup and payload, POP may return a direct file, a URL, or a JSON response.

create-ubl

Create PEPPOL UBL invoices and optionally submit them to the network.

  • pop-pp-cli create-ubl - Generate a PEPPOL BIS / UBL invoice and optionally submit it through POP's PEPPOL integration.

create-xml

Create Italian FatturaPA XML invoices and optionally submit them to SdI.

  • pop-pp-cli create-xml - Generate an Italian FatturaPA XML document and optionally submit it to SdI. The data object must follow POP's invoice structure.

peppol

Manage PEPPOL document workflows

  • pop-pp-cli peppol get-document - Retrieve a PEPPOL document from POP by UUID and optional zone.

sdi

Manage SdI document workflows

  • pop-pp-cli sdi get-invoice-status - Read POP's recorded SdI notifications for a submitted invoice UUID.
  • pop-pp-cli sdi get-sdi-document - Retrieve a stored SdI document by UUID.
  • pop-pp-cli sdi preserve-sdi-document - Archive an accepted SdI document in POP's long-term storage.
  • pop-pp-cli sdi verify-sdi-document - Validate a Base64-encoded SdI XML document before submission.

Output Formats

# Human-readable table (default in terminal, JSON when piped)
pop-pp-cli create-pdf

# JSON for scripting and agents
pop-pp-cli create-pdf --json

# Filter to specific fields
pop-pp-cli create-pdf --json --select id,name,status

# Dry run — show the request without sending
pop-pp-cli create-pdf --dry-run

# Agent mode — JSON + compact + no prompts in one flag
pop-pp-cli create-pdf --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
  • Explicit retries - add --idempotent to create retries when a no-op success is acceptable
  • Confirmable - --yes for explicit confirmation of destructive actions
  • Piped input - write commands can accept structured input when their help lists --stdin
  • Agent-safe by default - no colors or formatting unless --human-friendly is set

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

Health Check

pop-pp-cli doctor

Verifies configuration, credentials, and connectivity to the API.

Configuration

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

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

Environment variables:

NameKindRequiredDescription
POP_API_KEYper_callNoSet to your API credential.

Troubleshooting

Authentication errors (exit code 4)

  • Run pop-pp-cli doctor to check credentials
  • Verify the environment variable is set: echo $POP_API_KEY 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/pop/agents.md to install this CLI from a prompt.