CLI tool for Port.io self-service actions.
brew tap weka/portcli
brew install portcligo build -o portcli .Set credentials via environment variables:
export PORT_CLIENT_ID="your-client-id"
export PORT_CLIENT_SECRET="your-client-secret"
export PORT_BASE_URL="https://api.getport.io" # optional, this is the defaultOr create ~/.portcli/config.json:
{
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"base_url": "https://api.getport.io"
}portcli blueprint listFilter by regex pattern:
portcli blueprint list --filter "^service"
portcli blueprint list --filter "deploy|build"Options:
--filter— regex pattern to filter blueprint identifiers
portcli blueprint get <identifier>Displays the blueprint's schema properties in a table with columns: Field (key), Title, and Type, sorted alphabetically by field key.
portcli entity get <blueprint> [entity-identifier]If no entity identifier is provided, lists all entities for the blueprint:
portcli entity get <blueprint>Get a specific property value:
portcli entity get <blueprint> <entity-identifier> --property version
portcli entity get <blueprint> <entity-identifier> -p statusFilter entities by property value:
portcli entity get <blueprint> --filter "environment=production"
portcli entity get <blueprint> -f "status=active"Options:
--property,-p— print only the value of a specific property--filter,-f— filter entities by property value (format: field=value)
portcli entity update <blueprint> <entity-identifier> status=active
portcli entity update <blueprint> <entity-identifier> ttl="2026-06-01T09:13:26" status=activeUse --json for complex or nested values:
portcli entity update <blueprint> <entity-identifier> --json '{"status": "active", "metadata": {"nested": true}}'Both key=value args and --json can be combined (--json takes precedence on conflicts).
Update all entities of a blueprint:
portcli entity update <blueprint> --all status=activeOptions:
--json— JSON object of properties to update--all— update all entities of the blueprint (uses bounded concurrency)
portcli entity delete <blueprint> <entity-identifier>Skip confirmation prompt:
portcli entity delete <blueprint> <entity-identifier> --yesDelete all entities of a blueprint:
portcli entity delete <blueprint> --all
portcli entity delete <blueprint> --all --yesDelete all entities matching a filter:
portcli entity delete <blueprint> --all --filter "owner=user@example.com"
portcli entity delete <blueprint> --all --filter "environment=staging" --yesOptions:
--all— delete all entities of the blueprint (uses bounded concurrency)--yes,-y— skip confirmation prompt--filter,-f— filter entities by property value (format: field=value), requires--all
portcli action run <action-identifier> --input key1=value1 --input key2=value2Options:
--input— key=value pairs (supports JSON values)--wait— wait for completion--poll— polling interval in seconds (default: 2)--timeout— timeout in seconds (default: 120)--run-as— email to run as--id— entity identifier
portcli action status <run-id>portcli action logs <run-id>