CLI
Codegen CLI
The Codegen CLI helps you:
- Initialize Codegen in your repository
- Create and run codemods
- Work with AI assistance
For installation instructions, see our Getting Started guide.
Getting Started
- Initialize Codegen in your repository:
- Create your first codemod:
The --description
flag enables AI assistance to help generate your codemod. Be as specific as possible about what you want to achieve.
Available Commands
init
Initialize Codegen in your repository.
create
Create new codemods with optional AI assistance.
run
Execute codemods with various options.
expert
Get help from the Codegen AI expert.
Working with AI
When using Cursor, you can mention @codegen-sh
in any chat or composer window to get:
- Documentation about available APIs
- Context about your active codemod
- Examples of similar codemods
- Relevant code snippets
The AI uses this context to provide accurate and helpful responses about working with Codegen.
Was this page helpful?