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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea2fc8a052145b26b1892b369cda23c421e258cc4110cdd0bba71a02e6692034
|
|
| MD5 |
f2b8f85a9de1810ad3f52eaf03575dc4
|
|
| BLAKE2b-256 |
3883e7cdf9a19ba0e7d54b7621294f97525e02f8a4f3c07edfd8e3daf6dcfca3
|
Provenance
The following attestation bundles were made for cloudclerk-0.1.0.tar.gz:
Publisher:
publish.yml on cloud-clerk/cloud-clerk-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloudclerk-0.1.0.tar.gz -
Subject digest:
ea2fc8a052145b26b1892b369cda23c421e258cc4110cdd0bba71a02e6692034 - Sigstore transparency entry: 1189288412
- Sigstore integration time:
-
Permalink:
cloud-clerk/cloud-clerk-cli@d1d3d903f158a1f0ef87e1fc9822fdaeebbb1168 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cloud-clerk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1d3d903f158a1f0ef87e1fc9822fdaeebbb1168 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72bdb6a533ff894ee8ffb20a7d304fe4a9390e8f504cb4687cd860271d2495f9
|
|
| MD5 |
c6fdd9b87da1f6fcce6d1e723946fad5
|
|
| BLAKE2b-256 |
f97a66176e77558c836382832d9edaf59e8aebc982f055e9f08d196afb1a5bc3
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloudclerk-0.1.0-py3-none-any.whl -
Subject digest:
72bdb6a533ff894ee8ffb20a7d304fe4a9390e8f504cb4687cd860271d2495f9 - Sigstore transparency entry: 1189288420
- Sigstore integration time:
-
Permalink:
cloud-clerk/cloud-clerk-cli@d1d3d903f158a1f0ef87e1fc9822fdaeebbb1168 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cloud-clerk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1d3d903f158a1f0ef87e1fc9822fdaeebbb1168 -
Trigger Event:
release
-
Statement type: