Skip to main content
Install and set up Codegen in your development environment.

Prerequisites

We recommend using uv for installation. If you haven’t installed uv yet:

Installing Codegen

Install the Codegen CLI globally:
This makes the codegen command available globally in your terminal, while keeping its dependencies isolated.

Quick Start

Let’s walk through a simple example of using Codegen in a project:
  1. Navigate to your repository:
  2. Initialize Codegen in your project:
    This creates a .codegen/ directory with:
  3. Create your first codemod with codegen create:
    The -d flag in codegen create generates an AI-powered implementation. This requires a Github account registered on codegen.sh
  4. Run your codemod with codegen run:
  5. Reset any filesystem changes (excluding .codegen/*) with codegen reset:

Next Steps

IDE Integration

Learn how to use Codegen effectively in VSCode, Cursor, and other IDEs.

Tutorials

Follow step-by-step tutorials for common code transformation tasks.

Work with AI

Leverage AI assistants like Copilot, Cursor and Devin

Guides

Learn more about building with Codegen
For more help, join our community Slack or check the FAQ.