CUDly is an open source CLI for discovering and purchasing AWS Reserved Instances and Savings Plans in a single command. It is dry-run by default: nothing is purchased until you pass --purchase. configure-azure and configure-gcp bootstrap credentials for the separate self-hosted platform; this CLI's own recommend-and-purchase workflow is AWS-only today. See cloud setup.
It is also built to be driven by an AI agent for the discovery and analysis side: searching recommendations, sizing a plan, filtering by account or region. The purchase step still needs a human to review the numbers before committing money. --yes currently skips the confirmation prompt outright, including for a non-interactive caller (a script, a CI job, an agent driving the CLI as a subprocess): see Safety Features and #1943 before wiring --purchase --yes into anything unattended.
The CLI depends on the published shared Go modules in cloud-commitments-go, pinned to fixed versions in go.mod. No sibling checkout or parent workspace is needed for local development.
- Dry-run by default -
--purchaseis the only opt-in that moves money; a bare invocation only prints results and writes a CSV. - Grounded recommendations - sized from AWS Cost Explorer's own recommendation and coverage data, not a locally-guessed baseline.
- Multiple AWS services, one interface - RDS, ElastiCache, EC2, OpenSearch, Redshift, MemoryDB, and Savings Plans through the same command and flags. See Implementation Status for per-service maturity.
- Coverage control - purchase a percentage of what's recommended, or of actual historical usage via
--target-coverage, instead of buying everything a provider suggests in one run. - CSV + audit log - every dry run and every purchase is written to CSV and to a permanent JSONL audit log.
- Dry-run by default - no purchase without the explicit
--purchaseflag. - Confirmation prompt -
--purchaseprints a summary of instance count and estimated savings, then prompts for confirmation.--yesskips this prompt, including for a non-interactive caller - it is not currently an automation boundary. #1943 tracks closing that gap. - Coverage and instance limits -
--coverage,--target-coverage, and--max-instancesshape what a dry run recommends before there is anything to confirm. - RDS extended-support filtering - by default, recommendations for instances running an engine version in AWS Extended Support are excluded, since the surcharge can erase RI savings; pass
--include-extended-supportto include them. - Audit log written per recommendation - the audit log path is checked for writability before any cloud API call. Each recommendation then gets its own audit record: for a dry run, written as soon as its (local, no-API-call) result is generated; for a real purchase, written after that purchase call returns.
- Permanent CSV exports of every dry run and every purchase.
- Duplicate-purchase dedup, fails closed - every path (
--servicesand--input-csv) subtracts commitments purchased in the last 24 hours before sizing a recommendation.--idempotency-windowdoesn't change that fixed 24h lookback yet (#1262). If the existing-commitments API call itself fails, a dry run continues with a warning (nothing is bought); a--purchaserun refuses that (service, region) with a "Refusing to purchase" line and buys nothing there.
Full internals: Purchase Safety.
| AWS service | Status |
|---|---|
| RDS, ElastiCache | Production - the tested paths. |
| EC2, OpenSearch, Redshift, MemoryDB, Savings Plans | Experimental - implemented and functional, still accumulating real-world purchase validation. |
Azure and GCP are not part of this CLI's recommend-and-purchase workflow; configure-azure and configure-gcp only bootstrap credentials for the self-hosted platform.
Use the Go version declared in go.mod.
make build
./cudly --helpmake build creates ./cudly from ./cmd. The build does not deploy or configure a cloud account.
Read the CLI reference for commands. See the guides for cloud setup, filtering, and purchase safety.
Preview RDS recommendations before enabling a purchase:
./cudly --services rds --profile defaultExport a reviewable report when you need to share results:
./cudly --services rds --profile default --output recommendations.csvAll purchase operations can spend money. Check the account, region, quantity, and selected commitment before confirming - see Safety Features for what is and is not enforced today.
Use the AWS SDK's supported credential chain. Select a profile with --profile and validate access before a purchase.
- Recommendation data and purchase APIs can change outside this repository.
- See Implementation Status for per-service maturity.
configure-azureandconfigure-gcpbootstrap credentials for the self-hosted platform, not for this CLI - see cloud setup.
- Shared Go libraries provide provider and common packages.
- MCP server exposes a separate tool interface.
- Self-hosted platform owns the API, dashboard, and deployment paths.
This component owns the CLI under cmd and its CLI documentation. It does not own the web dashboard, MCP server, or deployment infrastructure.
CUDly is maintained by LeanerCloud and licensed under the Open Software License 3.0. See the repository license and attribution files for third-party notices.