Skip to content

Find credit savings in your config with the Config Optimizer CLI extension

New feature

Config Optimizer is now available in open preview as an extension for the CircleCI CLI.

It reads your project’s config and recent job usage, then suggests changes predicted to lower your credit spend. Examples include moving over-provisioned Docker jobs to a smaller resource class and fixing cache keys that never hit.

Update the CircleCI CLI to the latest version, then install the extension:

brew upgrade circleci        # or update the CLI the way you installed it
circleci extension install configoptimizer

Then run it from your project’s checkout:

  • circleci configoptimizer analyze lists suggested changes and the reason behind each one. It does not modify anything.
  • circleci configoptimizer apply -o optimized.yml writes the suggested changes to a new file for you to review. Your existing config is not changed.

Hand it to your coding agent

To have an AI coding agent do the setup and run the analysis, open it in your project’s checkout and paste this prompt:

Set up CircleCI Config Optimizer and analyze this project's CircleCI config.

1. Update the CircleCI CLI to the latest version, using the same method it
   was installed with (for example, `brew upgrade circleci`). If the CLI is
   not installed, install it.
2. Check that I am logged in with `circleci auth me`. If I am not, stop and
   ask me to run `circleci auth login` myself.
3. Install the extension with `circleci extension install configoptimizer`,
   then confirm it works with `circleci configoptimizer version`.
4. Run `circleci configoptimizer analyze -v` from the root of this checkout.
   Explain what it found in plain language, including the reason given for
   each job that has no suggested change.
5. If there are suggested changes, run
   `circleci configoptimizer apply -o optimized.yml` and show me the diff
   against .circleci/config.yml.

Do not edit .circleci/config.yml, commit, or push anything. I will review
the changes myself.

Savings are estimates, shown as a share of the pipeline’s credits. Test changes before merging them. Config Optimizer supports CircleCI cloud only.