Skip to main content

CLI for CloudClerk - BigQuery cost optimization from the terminal

Project description

CloudClerk CLI

BigQuery cost optimization from the terminal. Analyze your most expensive queries and get actionable recommendations to reduce costs.

Install

pipx install cloudclerk

Or with uv:

uv tool install cloudclerk

Quick Start

# 1. Configure with your API key (from the CloudClerk dashboard)
cloudclerk configure

# 2. See your most expensive queries
cloudclerk queries top

# 3. Get details and recommendations for a specific query
cloudclerk queries show <query_sha>

Commands

Command Description
cloudclerk configure Set API key and server URL
cloudclerk queries top List most expensive queries by cost
cloudclerk queries show <sha> Full analysis: context, recommendations, issues

Options

cloudclerk queries top --limit 20          # Show top 20
cloudclerk queries top --priority high     # Filter by priority (high/medium/low)
cloudclerk queries top --json              # Raw JSON for piping
cloudclerk queries show <sha> --json       # Raw JSON for piping
cloudclerk --version                       # Show version

What You Get

queries top - A ranked table of your most expensive queries with cost, savings potential, and priority.

queries show - Full detail for a single query:

  • Query context (executions, bytes billed, referenced tables, date range)
  • The actual SQL pattern
  • Actionable recommendations with estimated savings and SQL examples
  • Issues found with severity ratings

Authentication

API keys are generated from the CloudClerk dashboard. Keys are prefixed with cc_live_ and scoped to your organization.

Configuration is stored in ~/.cloudclerk/config.toml.

Requirements

  • Python 3.10+
  • A CloudClerk account with API key access

Development

git clone https://github.com/numia-xyz/cloudclerk-cli.git
cd cloudclerk-cli
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest -v

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudclerk-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloudclerk-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file cloudclerk-0.1.0.tar.gz.

File metadata

  • Download URL: cloudclerk-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cloudclerk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea2fc8a052145b26b1892b369cda23c421e258cc4110cdd0bba71a02e6692034
MD5 f2b8f85a9de1810ad3f52eaf03575dc4
BLAKE2b-256 3883e7cdf9a19ba0e7d54b7621294f97525e02f8a4f3c07edfd8e3daf6dcfca3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudclerk-0.1.0.tar.gz:

Publisher: publish.yml on cloud-clerk/cloud-clerk-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cloudclerk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cloudclerk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cloudclerk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72bdb6a533ff894ee8ffb20a7d304fe4a9390e8f504cb4687cd860271d2495f9
MD5 c6fdd9b87da1f6fcce6d1e723946fad5
BLAKE2b-256 f97a66176e77558c836382832d9edaf59e8aebc982f055e9f08d196afb1a5bc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudclerk-0.1.0-py3-none-any.whl:

Publisher: publish.yml on cloud-clerk/cloud-clerk-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page