CodeEvolve CLI
An open framework where language models and evolutionary selection find and improve code for optimization tasks
- 157 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- The evaluation script executes language-model-generated code on your machine
- A single run makes many paid calls to the model API
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/codeevolveDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The evaluation script executes language-model-generated code on your machine
- A single run makes many paid calls to the model API
This is third-party code. Review the repository files before installing.
What it does
CodeEvolve is a Python framework that combines large language models with evolutionary algorithms to find programs that solve hard optimization problems. You supply starting code and an evaluation script, and the system gets edits from a language model generation after generation, scores them with a numeric metric and keeps the best. At its core is an island genetic scheme: several populations evolve independently and periodically exchange leaders, so diversity is preserved while good solutions spread across the search space. It runs with the `codeevolve` command and the arguments `--inpt_dir` (a directory with the evaluation script and initial code), `--cfg_path` (a YAML config), `--out_dir` (where to write results) and `--load_ckpt` (0 for a new run, -1 for the latest checkpoint). The model connects through any OpenAI-compatible API: the `API_KEY` and `API_BASE` variables point to a cloud provider, a gateway or a local server. The authors claim parity with the closed AlphaEvolve on known algorithm discovery tasks, and open models such as Qwen often match expensive closed ones. The repository includes scripts for reproducing the paper results.
Who it is for. Algorithm researchers and engineers who solve combinatorial optimization problems or tune compute kernels and want to automate code search with a metric.
Good fit when
- You have a function and a numeric quality metric and want to search automatically for faster or more accurate variants
- A search for a mathematical construction or heuristic where solution quality can be measured by a script
- You want to reproduce results of a research paper on evolutionary program search with language models
- You want to compare an open model such as Qwen with closed ones on an algorithm discovery task
Not a fit when
- You need an ordinary chat coding assistant: the tool runs metric-driven optimization loops
- The task has no automatic quality evaluation: without an evaluation script the search does not work
- You need an instant edit of one file: an evolutionary run spends many model calls
Example request
Run codeevolve on the task in the problem/ folder with config.yaml and results in results/, then show the best code foundLimitations
A run requires a conda environment from `environment.yml` and a key for an OpenAI-compatible API. Every run makes many model calls, so a paid provider bill grows fast and duration depends on population size and the evaluation script. The evaluation script executes generated code on your machine, and without a sandbox that endangers the system.
Result quality is set by the metric: if it is weak or gameable, evolution will find a shortcut. `scripts/run.sh` uses `taskset` to limit load, which exists only on Linux. Argument details are in `src/codeevolve/cli.py`.
How to disable. Deactivate the environment with `conda deactivate` and remove it with `conda env remove -n codeevolve`. `--out_dir` result folders stay on disk; delete them by hand.
FAQ
How do I install CodeEvolve?
Clone the repository, create the environment with `conda env create -f environment.yml` and activate it with `conda activate codeevolve`.
Which model can I connect?
Any model through an OpenAI-compatible API: a cloud provider, a gateway or a local server. `API_BASE` and `API_KEY` set the address and key.
What is the island model?
Several code populations evolve separately and periodically exchange their best solutions. This preserves diversity and speeds up search.
How do I resume an interrupted run?
Pass `--load_ckpt=-1` for the latest checkpoint or a specific epoch number; `--load_ckpt=0` starts a new run.
How does this differ from AlphaEvolve?
AlphaEvolve is closed. CodeEvolve is open and reproducible, and the authors claim comparable quality on known benchmarks and publish scripts to repeat it.
Discussion
No questions or reviews yet.
Related
CLI toolsSix skills and the ae CLI: an agent runs an AlphaEvolve experiment from problem setup to merging the best evolved code
An agent evolution framework that edits prompts and skills with parallel workers and keeps only what passes a held-out check.
Evolution Kernel loops over a git repo to improve code toward a measurable goal in a sandbox and commits accepted changes.
Parallel self-evolution of skills and prompts: workers propose edits and an aggregator merges them into one versioned artifact
Runs a coding agent over tasks with known answers, studies failures and writes new skills and prompts, versioned in Git.
Agent memory over MCP: past work trajectories become guidelines for new tasks, with a lite version for Claude Code and Codex
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| CodeEvolve (this card) | no | 157 | |
| AlphaEvolve on Google Cloud | no | 130 | a managed Google Cloud service, with no open framework you run yourself |
| Proteus | no | 112 | evolution of agents and prompts, with no metric-driven program search |
README in short
A research paper accompanies the project and the authors stress transparency, reproducibility and low cost through open models. The repository includes architecture docs, sample configurations and scenarios for reproducing the published results.