Loading...
Loading...
pctl CLI (v0.6.3) — PAIC Control, a unified testing CLI for PingOne Advanced Identity Cloud (AIC). Handles connection profiles, JWT token generation/decoding/validation, authentication journey testing, local ELK stack management (Elasticsearch + Kibana log streaming), historical log search, and configuration change tracking. Contains environment shorthands, ELK workflow recipes, and gotchas.
npx skill4agent add autumnfallenwang/paic-skills pctlpctl <command> <action> --help| Profile Name | Tenant | Purpose |
|---|---|---|
| yourtenantsandbox | Sandbox |
| yourtenantdev | Development |
| yourtenantstaging | Staging |
| yourtenantprod | Production |
pctl conn list # See all saved profiles
pctl conn show sandbox # Show details of a specific profile
pctl conn validate sandbox # Validate credentialspctl conn <add|list|show|validate|delete> [options] [conn_name]# Add with flags
pctl conn add myenv --platform https://openam-env.id.forgerock.io \
--sa-id "account-id" --sa-jwk-file /path/to/jwk.json
# Add from YAML config file
pctl conn add myenv -c /path/to/conn.yaml
# Add without credential validation
pctl conn add myenv --platform https://... --sa-id "..." --sa-jwk-file ... --no-validate
# Show, validate, delete
pctl conn show sandbox
pctl conn validate sandbox
pctl conn delete sandbox # Prompts for confirmation
pctl conn delete sandbox --force # Skip confirmationplatform: "https://openam-env.id.forgerock.io"
sa_id: "service-account-id"
sa_jwk_file: "/path/to/jwk.json" # File path OR inline JSON via sa_jwk
log_api_key: "optional-key"
log_api_secret: "optional-secret"
admin_username: "optional-admin"
admin_password: "optional-password"
description: "Environment description"--sa-jwk-file /path/to/file.json--sa-jwk '{"kty":"RSA",...}'pctl token <get|decode|validate> [options] <conn_name|token_string># Generate access token from connection profile
pctl token get sandbox # Raw token string
pctl token get sandbox --format bearer # With "Bearer " prefix
pctl token get sandbox --format json # Full JSON response
# Inspect a JWT (no verification, just decode)
pctl token decode "eyJhbGciOiJS..."
# Validate JWT structure and format
pctl token validate "eyJhbGciOiJS..."token gettoken decodetoken validatepctl journey <run|validate> [options] <file># Validate config before running
pctl journey validate path/to/config.yaml
# Run journey
pctl journey run path/to/config.yaml
# Interactive step-by-step mode (pauses between steps)
pctl journey run path/to/config.yaml --step
# With custom timeout
pctl journey run path/to/config.yaml --timeout 30000platformUrl: https://openam-env.id.forgerock.io
realm: alpha
journeyName: Login
steps:
step1:
Username: testuser
step2:
Password: testpassword--step-spctl elk <init|health|start|stop|status|clean|purge|hardstop|down> [options]# 1. Initialize — deploy containers, templates, policies (one-time setup)
pctl elk init
# 2. Check health — verify Elasticsearch + Kibana are running
pctl elk health
# 3. Start streaming logs from a connection profile
pctl elk start sandbox # Streamer named "sandbox"
pctl elk start sandbox --name my-streamer # Custom streamer name
pctl elk start sandbox --log-level 3 # DEBUG level
pctl elk start sandbox -c am-core,idm-core # Specific components
# 4. Check streamer status
pctl elk status # All streamers
pctl elk status --name sandbox # Specific streamer
# 5. Stop streamers
pctl elk stop # Stop all
pctl elk stop --name sandbox # Stop specific# Clean index data but keep streamer running (name required)
pctl elk clean --name sandbox
pctl elk clean --name sandbox --force # Skip confirmation
# Purge streamer completely — stop + delete indices (name required)
pctl elk purge --name sandbox
pctl elk purge --name sandbox --force # Skip confirmation# Stop all streamers + containers, PRESERVE data
pctl elk hardstop
pctl elk hardstop --force # Skip confirmation
# Stop all + REMOVE containers + DELETE all data
pctl elk down
pctl elk down --force # Skip confirmation1234elk cleanelk purge--name-nelk stopelk hardstopelk downpctl elk startpctl log searchhttp://localhost:9200paic-logs-{profile_name}-{YYYY.MM}paic-logs-sandbox-2026.03paic-logs-*paic-logs-sandbox*| Field | ES Type | Description |
|---|---|---|
| | ISO 8601 timestamp |
| | Log source (e.g., |
| | |
| | Log content (flexible structure) |
typetext/plainpayloadmessageapplication/jsonpayload| Payload Field | Description |
|---|---|
| Log message (present in both types) |
| Log level string ( |
| Java class name (e.g., |
| Transaction ID for request tracing |
| Same transaction ID (nested in MDC context) |
| Java thread name |
| AM context (e.g., |
| Log-level timestamp (may differ slightly from top-level |
# Check available indices
curl -s 'localhost:9200/_cat/indices/paic-logs-*?v&s=index'
# Search by source
curl -s 'localhost:9200/paic-logs-sandbox*/_search?pretty' -H 'Content-Type: application/json' -d '
{"query":{"match":{"source":"idm-core"}},"size":10,"sort":[{"timestamp":"desc"}]}'
# Search by keyword in message
curl -s 'localhost:9200/paic-logs-sandbox*/_search?pretty' -H 'Content-Type: application/json' -d '
{"query":{"match":{"payload.message":"authentication failed"}},"size":10,"sort":[{"timestamp":"desc"}]}'
# Filter by transaction ID
curl -s 'localhost:9200/paic-logs-sandbox*/_search?pretty' -H 'Content-Type: application/json' -d '
{"query":{"match":{"payload.transactionId":"abc-123-def"}}}'
# Errors — structured logs (application/json) use payload.level
curl -s 'localhost:9200/paic-logs-sandbox*/_search?pretty' -H 'Content-Type: application/json' -d '
{"query":{"bool":{"must":[{"match":{"payload.level":"SEVERE"}},{"range":{"timestamp":{"gte":"now-1h"}}}]}}}'
# Errors — text/plain logs have level in the message string
curl -s 'localhost:9200/paic-logs-sandbox*/_search?pretty' -H 'Content-Type: application/json' -d '
{"query":{"bool":{"must":[{"match":{"payload.message":"SEVERE"}},{"match":{"type":"text/plain"}}]}}}'
# Count docs per source
curl -s 'localhost:9200/paic-logs-sandbox*/_search?pretty' -H 'Content-Type: application/json' -d '
{"size":0,"aggs":{"by_source":{"terms":{"field":"source"}}}}'pctl log searchpctl log searchpctl elk startpctl log search [options] <conn_name># Last 24h from idm-config (all defaults)
pctl log search sandbox
# Last 7 days, specific component, with filter
pctl log search sandbox -c idm-config --days 7 -q '/payload/objectId co "endpoint/"'
# Specific date range
pctl log search sandbox -c am-access --from 2025-10-01 --to 2025-10-06
# Filter by transaction ID
pctl log search sandbox --txid "abc-123-def"
# Errors only
pctl log search sandbox -l 1
# Save to file
pctl log search sandbox -c idm-config --days 7 -o logs.jsonl
pctl log search sandbox -c idm-config --format json -o report.json1234idm-config--days 1--days--from--to--no-default-noise-filterpctl log changes [options] <conn_name># Endpoint changes
pctl log changes sandbox --type endpoint --name my_endpoint
# Connector changes (last 30 days)
pctl log changes sandbox --type connector --name MyConnector --days 30
# Email template changes
pctl log changes sandbox --type emailtemplate --name welcome-email
# Mapping changes
pctl log changes sandbox --type mapping --name managedAlpha_user
# Access control changes (no --name needed, global config)
pctl log changes sandbox --type access --days 30
# Repo changes (no --name needed)
pctl log changes sandbox --type repo --days 7# Script changes (name auto-resolved to UUID)
pctl log changes sandbox --type script --name "My Test Script"
# Journey changes
pctl log changes sandbox --type journey --name MyLoginJourney --days 30
# SAML entity changes
pctl log changes sandbox --type saml --name "https://example.com/saml/logout/"# JSON (default, human-readable)
pctl log changes sandbox --type endpoint --name my_endpoint --format json
# JSONL (one object per line, for piping)
pctl log changes sandbox --type endpoint --name my_endpoint --format jsonl
# JS (JavaScript, for embedding)
pctl log changes sandbox --type endpoint --name my_endpoint --format js
# Save to file
pctl log changes sandbox --type endpoint --name my_endpoint -o report.jsonendpointconnectoremailtemplatemappingaccessreposcriptjourneysamlaccessrepo--name--namescripttoken decodetoken validatetoken getelk cleanelk purge--nameelk downelk hardstop--days--from--tolog searchlog changeslog changesaccessrepo--namelog changesscript--sa-jwk-file--sa-jwkconn add--no-validate--step