Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

PerfectScale agent skill

Explore how to bring agentic workflows into your Kubernetes optimization process with the PerfectScale agent skill

What is PerfectScale CLI

PerfectScale CLI is a command-line tool that uses PerfectScale’s public APIs to access cluster cost and optimization data. It lets you work with AI agents such as Claude, Codex, and Antigravity to query clusters, workloads, namespaces, costs, waste, risks, and other metrics, and combine this data with information from other sources to get a more complete operational context.

When to use

PerfectScale CLI introduces various use cases to improve your optimization workflows:

  • Query clusters, workloads, namespaces, costs, waste, and risks from the command line

  • Aggregate and rank data, group by namespace, team label, workload type, risk severity

  • Access InfraFit node group utilization, costs, and optimization recommendations, and investigate unevictable pods and their remediation guidance

  • Export workload data to CSV for reporting and downstream analysis

  • Return list, summary, and grouped results as JSON or JSONL for programmatic consumption

  • Review automation audit logs with filtering by cluster, namespace, and time range

  • Pipe results into any workflow: dashboards, Slack bots, CI/CD pipelines, custom reports

Getting started

1

Download the skill

Use your Agent to install PerfectScale CLI skill with a single prompt:

Install the skill from https://github.com/doitintl/perfectscale-cli

Alternatively, you can do it manually. Download and install the latest release for your platform from:

2

Generate an API Token

  1. Click the user icon in the bottom-left corner

  2. Go to Org Settings -> API Tokens

  3. Click Generate Token and assign a Read Only role

  4. Copy the client_id and client_secret

3

Authenticate

pscli auth login --client-id 'YOUR_CLIENT_ID' --client-secret 'YOUR_CLIENT_SECRET' 

The CLI validates the token and saves a local profile. Credentials are stored securely in your OS config directory with restricted file permissions.

4

Start Querying

pscli clusters list # List your clusters
pscli workloads list -c prod-a -s waste -r desc -T 10 # Top 10 wasteful workloads
pscli workloads summary -c prod-a # Cost summary for a cluster
pscli workloads export -c prod-a -F workloads.csv # Export to CSV

What is PerfectScale CLI

PerfectScale CLI is a command-line tool that uses PerfectScale’s public APIs to access cluster cost and optimization data. It lets you work with AI agents such as Claude, Codex, and Antigravity to query clusters, workloads, namespaces, costs, waste, risks, and other metrics, and combine this data with information from other sources to get a more complete operational context.

When to use

PerfectScale CLI introduces various use cases to improve your optimization workflows:

  • Query clusters, workloads, namespaces, costs, waste, and risks from the command line

  • Aggregate and rank data, group by namespace, team label, workload type, risk severity

  • Access InfraFit node group utilization, costs, and optimization recommendations, and investigate unevictable pods and their remediation guidance

  • Export workload data to CSV for reporting and downstream analysis

  • Return list, summary, and grouped results as JSON or JSONL for programmatic consumption

  • Review automation audit logs with filtering by cluster, namespace, and time range

  • Pipe results into any workflow: dashboards, Slack bots, CI/CD pipelines, custom reports

Getting started

1

Installing PerfectScale CLI

Install the PerfectScale CLI using the option for your platform:

  • macOS/Linux (Homebrew):

  • Windows (Scoop):

  • Linux (.deb/.rpm): Download the package for your architecture and install it with dpkg -i or rpm -Uvh.

  • Other platforms: Download the release archive and extract the pscli binary onto your PATH.

Run pscli update to check for a newer version. It prints the appropriate upgrade command for your installation method.

2

Generate an API Token

  1. Click the user icon in the bottom-left corner

  2. Go to Org Settings -> API Tokens

  3. Click Generate Token and assign a Read Only role

  4. Copy the client_id and client_secret

3

Authenticate

The CLI validates the token and saves a local profile. Credentials are stored securely in your OS config directory with restricted file permissions.

4

Installing the Agent skill (optional)

This skill ships with the CLI binary, so there’s no separate download needed. Use --all to install it for every agent whose config directory already exists.

5

Start Querying

Last updated

Was this helpful?