CLI
Query the AI ecosystem from your terminal. Same data as the API and MCP server.
Install
pip install ptedge-cli
Quick Start
# What's available? ptedge status # Browse the schema ptedge tables ptedge describe ai_repos # Run a query ptedge query "SELECT full_name, stars FROM ai_repos ORDER BY stars DESC LIMIT 10" # Search by description ptedge search "autonomous coding agent" ptedge search "postgres MCP server" --domain mcp # Get recipe templates ptedge workflows
Commands
ptedge status
Table count, repo count, domains, last sync time.
ptedge tables
List all database tables with row counts.
ptedge describe <table>
Column names, types, and nullability.
ptedge search-tables <keyword>
Find tables by keyword.
ptedge query "<SQL>"
Run any SELECT query. Read-only, 5s timeout.
ptedge workflows
Pre-built SQL recipe templates.
ptedge search "<query>" [--domain mcp] [--limit 10]
Semantic search across 220K+ AI repos.
ptedge feedback "<topic>" "<text>"
Submit feedback about the data.
ptedge login
Store your API key in ~/.ptedge/config.json.
Authentication
Works without a key (100 requests/day). For more:
# Option 1: login command ptedge login # Option 2: environment variable export PTEDGE_API_KEY=pte_your_key_here # Option 3: per-command ptedge --key pte_xxx query "SELECT ..."
Get a free API key for 1,000 requests/day.
Output Formats
# Default: aligned table ptedge tables # JSON output (pipe to jq, etc.) ptedge --format json tables
For AI Agents
If you're an AI agent running in Claude Code, Cursor, or another coding environment:
# Discover the full interface ptedge --help # Get structured JSON output ptedge --format json status ptedge --format json query "SELECT domain, COUNT(*) FROM ai_repos GROUP BY domain"