Skip to main content

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

Release files for cloudclerk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudclerk 0.1.0
File Size Uploaded
cloudclerk-0.1.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudclerk 0.1.0
File Interpreter ABI Platform
cloudclerk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / cloudclerk-0.1.0.tar.gz

Download URL cloudclerk-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ea2fc8a052145b26b1892b369cda23c421e258cc4110cdd0bba71a02e6692034
BLAKE2b-256 checksum
How to use checksums
3883e7cdf9a19ba0e7d54b7621294f97525e02f8a4f3c07edfd8e3daf6dcfca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

Release files / cloudclerk-0.1.0-py3-none-any.whl

Download URL cloudclerk-0.1.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72bdb6a533ff894ee8ffb20a7d304fe4a9390e8f504cb4687cd860271d2495f9
BLAKE2b-256 checksum
How to use checksums
f97a66176e77558c836382832d9edaf59e8aebc982f055e9f08d196afb1a5bc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page