Manage workflows, jobs, and automation from the command line.
config show — Display settingsconfig set — Update configworkflows list — List all workflowsworkflows get — Get detailsworkflows run — Execute workflowworkflows enable — Enable workflowworkflows disable — Disable workflowjobs list — List executionsjobs get — Get job detailsjobs cancel — Cancel running jobjobs follow — Live log streamlogs job — Historical job logslogs workflow — Workflow run logssecrets list — List secretssecrets get — Get secret valuesecrets set — Create/update secretsecrets delete — Delete secretapprovals list — List approvalsapprovals approve — Approve requestapprovals reject — Reject requestapprovals get — Get request details--help — Command helpInstall the PyExecutor CLI from the local package:
cd cli/
pip install -e .
# Verify installation
pyexec --version
# Output: pyexec, version 1.0.0
# Configure your API endpoint and key
pyexec config-cmd set --api-url http://localhost:8000
pyexec config-cmd set --api-key your_token_here
# Verify configuration
pyexec config-cmd show
# You should see:
# api_url: http://localhost:8000
# api_key: ***token_last_4_chars (masked)
# timeout: 60
pyexec workflows list
# Filter by trigger type
pyexec workflows list --filter "trigger_type=cron"
# Filter by status
pyexec workflows list --filter "status=active"
# JSON output
pyexec workflows list --output json
# YAML output
pyexec workflows list --output yaml
# Export to file
pyexec workflows list --output json > workflows.json
# Get by workflow ID
pyexec workflows get 15
# Get by workflow name
pyexec workflows get "KPI Score Pipeline"
# JSON output
pyexec workflows get 15 --output json > workflow.json
# Enable a workflow
pyexec workflows enable 15
# Disable a workflow
pyexec workflows disable 15
# Disable by name
pyexec workflows disable "KPI Score Pipeline"
# Run by ID
pyexec workflows run 15
# Run by name
pyexec workflows run "KPI Score Pipeline"
# Pass context variables
pyexec workflows run 15 --context key1=value1 --context key2=value2
# Pass context from JSON file
pyexec workflows run 15 --context-file payload.json
# Wait for completion
pyexec workflows run 15 --wait
# Wait and stream logs
pyexec workflows run 15 --wait --follow-logs
pyexec jobs list
# Filter by workflow
pyexec jobs list --filter "workflow=12"
# Filter by status
pyexec jobs list --filter "status=failed"
# Show only recent jobs (limit)
pyexec jobs list --filter "limit=50"
# JSON output
pyexec jobs list --output json
# YAML output
pyexec jobs list --output yaml
pyexec jobs get 907
# JSON output
pyexec jobs get 907 --output json
# Export to file
pyexec jobs get 907 --output json > job.json
# Follow logs in real-time
pyexec jobs follow 907
# Shows step-by-step execution with live output
# Press Ctrl+C to stop following
# Example output:
# [INFO] Job #907 started.
# [STEP 1/3] Executing "Run Health Checks"
# [INFO] Running health checks...
# [CHECK] Auth Service DOWN 343.0ms
# [CHECK] Payment Gateway OK 106.0ms
# Cancel a running job
pyexec jobs cancel 907
# Note: Stopped jobs can be retried from the web UI
# Retry with same inputs
# pyexec jobs retry 907
# Retry from specific step
# pyexec jobs retry 907 --from-step 2
⚠️ Not yet implemented.
# Interactive prompt (secure)
pyexec secrets set SLACK_WEBHOOK_URL
# From command line (less secure)
pyexec secrets set API_KEY "sk_your_key_here"
# Retrieve secret value (requires confirmation)
pyexec secrets get SLACK_WEBHOOK_URL
# Retrieve without confirmation
pyexec secrets get SLACK_WEBHOOK_URL --force
# List all secrets (without values - values are hidden for security)
pyexec secrets list
# JSON output
pyexec secrets list --output json
# YAML output
pyexec secrets list --output yaml
# Delete a secret (requires confirmation)
pyexec secrets delete SLACK_WEBHOOK_URL
# Delete without confirmation
pyexec secrets delete SLACK_WEBHOOK_URL --force
# List all pending approvals
pyexec approvals list
# Filter by status
pyexec approvals list --status pending
pyexec approvals list --status approved
pyexec approvals list --status rejected
# View full details for an approval request
pyexec approvals get 30
# Output as JSON
pyexec approvals get 30 --output json
# Approve with a comment
pyexec approvals approve 30 --comment "Looks good, ship it"
# Approve (will prompt for comment)
pyexec approvals approve 30
# Reject with a reason
pyexec approvals reject 30 --reason "Not ready for production"
# Reject (will prompt for reason)
pyexec approvals reject 30
# Stream job logs in real-time
pyexec jobs follow 907
# Press Ctrl+C to stop following
# Get stored logs for a completed job
pyexec logs job 907
# Filter by level
pyexec logs job 907 --level error
pyexec logs job 907 --level warning
pyexec logs job 907 --level info
# Get logs from the most recent job for this workflow
pyexec logs workflow 12
# Also works with workflow name
pyexec logs workflow "Service Health Monitor"
pyexec config-cmd show
# Displays:
# api_url: http://localhost:8000
# api_key: ***n62g (masked for security)
# timeout: 60 (seconds)
# output_format: table (table, json, or yaml)
# Set API endpoint
pyexec config-cmd set --api-url https://api.example.com
# Set API key
pyexec config-cmd set --api-key your_token_here
# Set request timeout
pyexec config-cmd set --timeout 120
# Set default output format
pyexec config-cmd set --output-format json
# View again to verify
pyexec config-cmd show
The CLI manages workflows, jobs, secrets, and approvals. These workflows can leverage all platform features including:
Multi-Language Scripts
Python, JavaScript, PowerShell, Bash, Go — all execute in isolated Docker containers
12 Step Types
Script, API, Database, Transform, AI, Condition, Loop, Notification, Approval, Subflow, Delay, Output
5 AI Providers
Gemini, OpenAI, Azure OpenAI, LM Studio, Ollama — with JSON mode and token tracking
Template Gallery
Clone pre-built workflow templates and configure them via the API
Git Version Control
Branches, commits, diffs, pull requests, and tags for workflows & scripts
RBAC & Analytics
Organizations, roles, permissions, API keys with scopes, and 10 analytics dashboards
#!/bin/bash
# Get job ID from the API
JOB_ID=$1
if [ -z "$JOB_ID" ]; then
echo "Usage: $0 "
exit 1
fi
# Follow job logs in real-time
echo "Following job #$JOB_ID (Press Ctrl+C to stop)"
pyexec jobs follow "$JOB_ID"
# Check final status
STATUS=$(pyexec jobs get "$JOB_ID" --output json | jq -r '.status')
echo "Job completed with status: $STATUS"
#!/bin/bash
# Create/update secrets
echo "Setting up application secrets..."
pyexec secrets set DATABASE_URL
pyexec secrets set API_KEY
pyexec secrets set WEBHOOK_SECRET
# List all secrets (without values)
echo "Configured secrets:"
pyexec secrets list
# Later, retrieve a secret (with confirmation)
echo "Retrieving database URL:"
DB_URL=$(pyexec secrets get DATABASE_URL --force)
# Use the secret
export DATABASE_URL="$DB_URL"
#!/bin/bash
# Get all workflows as JSON
echo "Fetching all workflows..."
pyexec workflows list --output json > workflows.json
# Filter for active cron workflows
echo "Active scheduled workflows:"
pyexec workflows list --output json | jq '.[] | select(.trigger_type=="cron" and .is_active==true)'
# Get details of a specific workflow
WORKFLOW_ID=$(pyexec workflows list --output json | jq '.[0].id')
echo "Details of workflow $WORKFLOW_ID:"
pyexec workflows get "$WORKFLOW_ID" --output json | jq '.'
#!/bin/bash
# Export all workflows
pyexec workflows list --output json > data/workflows.json
pyexec workflows list --output yaml > data/workflows.yaml
# Export all jobs
pyexec jobs list --output json > data/jobs.json
# Export secrets list (without values)
pyexec secrets list --output json > data/secrets.json
# Count statistics
WORKFLOW_COUNT=$(cat data/workflows.json | jq 'length')
JOB_COUNT=$(cat data/jobs.json | jq 'length')
echo "Exported $WORKFLOW_COUNT workflows and $JOB_COUNT jobs"
# Global help
pyexec --help
# Command group help
pyexec workflows --help
pyexec jobs --help
pyexec secrets --help
pyexec config-cmd --help
pyexec logs --help
# Version info
pyexec --version
# Table format (default)
pyexec workflows list
# JSON format
pyexec workflows list --output json
# YAML format
pyexec workflows list --output yaml
# Change default format
pyexec config-cmd set --output-format json
pyexec config-cmd showpyexec config-cmd showpyexec config-cmd set --timeout 120pip install -e . in the cli/ directory