Setup Commands
Commands for initializing Codeflash in your project, setting up continuous optimization, and verifying your installation.codeflash init
Initialize Codeflash for your Python project. This creates the configuration in pyproject.toml.
- Prompts for your Python module directory (
module-root) - Prompts for your test directory (
tests-root) - Configures code formatter preferences
- Sets up telemetry preferences
- Optionally installs the Codeflash VS Code extension
- Optionally sets up GitHub Actions workflow
codeflash init-actions
Set up GitHub Actions workflow for continuous optimization on every pull request.
- Creates a workflow file in
.github/workflows/ - Opens a PR with the workflow configuration
- Requires the Codeflash GitHub App to be installed
codeflash vscode-install
Install the Codeflash extension for VS Code, Cursor, or Windsurf.
- Detects which editor you’re using (VS Code, Cursor, or Windsurf)
- Downloads and installs the appropriate extension
- Works with both Marketplace and Open VSX sources
codeflash --verify-setup
Verify your Codeflash installation by running a sample optimization.
- Creates a temporary demo file
- Runs a sample optimization
- Verifies all components are working correctly
- Cleans up the demo file afterward
This command takes about 3 minutes to complete. It’s a great way to ensure everything is set up correctly before optimizing your actual code.