Monopigi

CLI Reference

The Monopigi CLI is installed with the Python SDK and provides a full-featured command-line interface for exploring and exporting Greek government data.

Installation

pip install monopigi-sdk

Authentication

# Save your API key
monopigi auth login mp_live_YOUR_KEY

# Check auth status
monopigi auth status

# Remove saved credentials
monopigi auth logout

Credentials are stored in ~/.monopigi/config.toml. You can also set the MONOPIGI_API_KEY environment variable.

Commands

monopigi sources

List all available data sources and their status.

monopigi sources
┌──────────────┬───────────────────────────────────────┬────────┐
│ Source        │ Description                           │ Status │
├──────────────┼───────────────────────────────────────┼────────┤
│ ted          │ EU public procurement notices          │ active │
│ diavgeia     │ Government transparency decisions      │ active │
│ elstat       │ Hellenic Statistical Authority         │ active │
│ rae          │ Energy regulator permits               │ active │
│ data_gov_gr  │ Greek open data portal                │ active │
│ mitos        │ Public service registries              │ active │
└──────────────┴───────────────────────────────────────┴────────┘

Full-text search across all sources (Pro tier required). Returns up to 10 results by default.

# Basic search (returns 10 results by default)
monopigi search "hospital procurement"

# Filter by source
monopigi search "IT services" --source ted

# Output as JSON
monopigi search "hospital" --format json

# Select specific fields
monopigi search "hospital" --fields source,title,published_at --format csv

# Count results only
monopigi search "procurement" --count

# Enable caching (5 min TTL)
monopigi search "hospital" --cache

Output is auto-detected: rich tables in a terminal, JSONL when piped.

# Pipe to jq for processing
monopigi search "energy" | jq '.title'

monopigi documents

Browse documents from a specific source.

# Query a source
monopigi documents ted --limit 20

# Filter by date
monopigi documents diavgeia --since 2026-01-01

# Output as JSONL
monopigi documents ted --format jsonl

# Count only
monopigi documents ted --count

monopigi stats

Show platform-wide statistics.

monopigi stats
Total documents: 17,865

┌──────────────┬───────────┬─────────────────────┬─────────┐
│ Source        │ Documents │ Last Updated        │ Quality │
├──────────────┼───────────┼─────────────────────┼─────────┤
│ data_gov_gr  │ 12,811    │ 2026-03-21 06:00    │ 0.87    │
│ mitos        │ 2,000     │ 2026-03-21 06:00    │ 0.91    │
│ elstat       │ 1,054     │ 2026-03-21 06:00    │ 0.89    │
│ rae          │ 2,000     │ 2026-03-21 06:00    │ 0.88    │
└──────────────┴───────────┴─────────────────────┴─────────┘

monopigi usage

Show your API usage for today.

monopigi usage
Tier: pro
Daily quota: 5,000
Used today: 42
Remaining: 4,958
Resets at: 2026-03-23 00:00 UTC

monopigi export

Export documents to a file with a progress bar.

# Export to JSON
monopigi export ted tenders.json

# Export to CSV
monopigi export diavgeia decisions.csv --format csv --since 2026-01-01

# Export to Parquet (requires polars)
monopigi export ted tenders.parquet --format parquet

# Limit exported records
monopigi export ted sample.json --limit 100

Supported formats: json, csv, parquet

monopigi watch

Poll for new documents matching a query. Useful for monitoring.

# Watch for new results every 60 seconds (default)
monopigi watch "hospital procurement"

# Custom interval (30 seconds)
monopigi watch "tender" --interval 30

# Stream to file
monopigi watch "procurement" --format jsonl | tee results.jsonl

Press Ctrl+C to stop watching.

monopigi diff

Show new documents since your last check.

# New TED documents since last check
monopigi diff ted

# New Diavgeia decisions since a specific date
monopigi diff diavgeia --since 2026-03-15

monopigi browse

Interactive browser for exploring source data.

# Browse a source interactively
monopigi browse ted

# Pre-filter results
monopigi browse --query "hospital" --limit 200

monopigi pipe

Read search queries from stdin for batch processing.

# Search each line from a file
cat queries.txt | monopigi pipe

# Limit results per query
echo "hospital" | monopigi pipe --limit 5

monopigi report

Create and manage due diligence reports (Pro tier required).

# Create a report by AFM (VAT number)
monopigi report create --identifier 123456789 --type afm

# Create a report by company name
monopigi report create --identifier "ACME SA" --type name

# List reports
monopigi report list

# Get report status
monopigi report status a1b2c3d4-e5f6-7890-abcd-ef1234567890

# Download PDF
monopigi report pdf a1b2c3d4-e5f6-7890-abcd-ef1234567890 -o report.pdf

# Wait for completion and then download
monopigi report create --identifier 123456789 --type afm --wait --pdf report.pdf

monopigi alert

Create and manage procurement alert profiles (Pro tier required).

# Create an alert profile
monopigi alert create "Hospital procurement" \
  --keywords hospital,"medical equipment" \
  --sources ted,kimdis \
  --min-value 50000 \
  --channel email \
  --email alerts@example.com

# Create with webhook delivery
monopigi alert create "IT tenders" \
  --keywords "IT services",software \
  --channel webhook \
  --webhook https://example.com/hooks/monopigi

# List alert profiles
monopigi alert list

# Update a profile
monopigi alert update b2c3d4e5-f6a7-8901-bcde-f12345678901 --name "New name"

# Deactivate a profile
monopigi alert deactivate b2c3d4e5-f6a7-8901-bcde-f12345678901

# List recent alert deliveries
monopigi alert deliveries

monopigi monitor

Continuous compliance monitoring (Enterprise tier required).

# Add an entity to monitor
monopigi monitor add --identifier 123456789 --type afm --label "ACME SA"

# List monitored entities
monopigi monitor list

# Stop monitoring an entity
monopigi monitor remove d4e5f6a7-b8c9-0123-defa-234567890123

# List events
monopigi monitor events

# Filter events by type
monopigi monitor events --type contract_award --since 2026-03-01

# Acknowledge an event
monopigi monitor ack e5f6a7b8-c9d0-1234-efab-345678901234

# Trigger a health report for a monitored entity
monopigi monitor report d4e5f6a7-b8c9-0123-defa-234567890123

monopigi models

List available LLM models for the /v1/ask endpoint.

monopigi models
┌─────────────────────────────────────────────┬─────────┐
│ Model                                        │ Default │
├─────────────────────────────────────────────┼─────────┤
│ deepseek/deepseek-chat                       │         │
│ mistralai/codestral-2508                     │         │
│ mistralai/mistral-large-2512                 │ *       │
│ mistralai/mistral-small-2603                 │         │
│ mistralai/mistral-small-3.1-24b-instruct     │         │
└─────────────────────────────────────────────┴─────────┘

monopigi config

Manage CLI configuration.

# Set a config value
monopigi config set cache_ttl 600

# Get a config value
monopigi config get cache_ttl

# List all settings
monopigi config list

# Open config in your editor
monopigi config edit

Available config keys:

KeyDefaultDescription
base_urlhttps://api.monopigi.comAPI base URL
default_formattableOutput format
default_sourceDefault source for queries
cache_ttlCache TTL in seconds

Output Formats

FormatDescriptionWhen used
tableRich formatted tableDefault in terminal
jsonSyntax-highlighted JSON--format json
jsonlOne JSON object per lineAuto-detected when piped, or --format jsonl
csvComma-separated values--format csv

Configuration Files

FileLocationPurpose
config.toml~/.monopigi/config.tomlAPI token and base URL
settings.json~/.monopigi/settings.jsonCLI preferences
cache/~/.monopigi/cache/Disk cache (SHA-256 keyed)