CLI (picoctl)

picoctl is a command-line tool for interacting with the Pico API. Create links, view analytics, and manage API keys from your terminal.


Installation

# Install via pip (macOS / Linux / Windows)
pip install https://pico-ya5y.onrender.com/api/picoctl/whl

# Or install as a CLI tool via uv
uv tool install https://pico-ya5y.onrender.com/api/picoctl/whl

The wheel is pure-Python — works on all platforms. Requires Python 3.11+.

Configuration

Set your API key and optional custom API URL as environment variables:

# Required: your API key (generate from dashboard → API Keys)
export PICO_API_KEY=pk_pico_xxxxx

# Optional: custom API URL (defaults to https://pico-ya5y.onrender.com)
export PICO_API_URL=https://pico-ya5y.onrender.com

Usage

Create a short link

picoctl create https://example.com/my-long-article
# With custom alias:
picoctl create https://example.com --alias my-link

List all links

picoctl list

View analytics

# Per-link analytics
picoctl analytics qrV8k

# Account summary
picoctl summary

Manage links

# Disable a link (soft-delete)
picoctl disable qrV8k

# Permanently delete a link
picoctl delete qrV8k

Manage API keys

# Create a new API key
picoctl keys create my-key

# List existing keys (use --all to include revoked)
picoctl keys list
picoctl keys list --all

# Revoke a key (soft-delete, can't be used)
picoctl keys revoke <key-id>

# Re-enable a revoked key
picoctl keys enable <key-id>

# Permanently delete a key
picoctl keys delete <key-id>

Back to code examples

See API usage in Python, JavaScript, and curl.

Code examples