> ## Documentation Index
> Fetch the complete documentation index at: https://codegeninc-tawsif-change-additional-tools-to-tools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Codegen CLI

The Codegen CLI helps you:

* Initialize Codegen in your repository
* Create and run codemods
* Work with AI assistance

<Note>
  For installation instructions, see our [Getting
  Started](/introduction/getting-started) guide.
</Note>

## Getting Started

1. **Initialize Codegen** in your repository:

```bash
codegen init
```

2. **Create your first codemod**:

```bash
codegen create my-codemod --description "What you want to accomplish"
```

The `--description` flag enables AI assistance to help generate your codemod. Be as specific as possible about what you want to achieve.

## Available Commands

<CardGroup cols={2}>
  <Card title="init" icon="power-off" href="/cli/init">
    Initialize Codegen in your repository.
  </Card>

  <Card title="create" icon="plus" href="/cli/create">
    Create new codemods with optional AI assistance.
  </Card>

  <Card title="run" icon="play" href="/cli/run">
    Execute codemods with various options.
  </Card>

  <Card title="expert" icon="robot" href="/cli/expert">
    Get help from the Codegen AI expert.
  </Card>
</CardGroup>

## 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.
