Skip to content

docs: General Installation Docs Improvement #703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Write code that transforms code. Codegen combines the parsing power of [Tree-sit

We support

- Running Codegen in Python 3.12 3.13 (recommended: Python 3.13)
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
- macOS and Linux
- macOS is supported
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
Expand All @@ -57,7 +57,7 @@ We support
uv pip install codegen

# Install global CLI
uv tool install codegen
uv tool install codegen --python 3.13

# Create a codemod for a given repo
cd path/to/repo
Expand Down
28 changes: 22 additions & 6 deletions docs/introduction/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ iconType: "solid"

Install and set up Codegen in your development environment.

#### We currently support:
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
- macOS and Linux
- macOS is supported
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
- Windows is not supported
- Python, Typescript, Javascript and React codebases

## Prerequisites

We recommend using [uv](https://github.com/astral-sh/uv) for installation. If you haven't installed `uv` yet:
Expand All @@ -17,7 +25,7 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
## Installing Codegen

```bash
uv tool install codegen
uv tool install codegen --python 3.13
```


Expand All @@ -38,7 +46,7 @@ Let's walk through a minimal example of using Codegen in a project:
```bash
codegen init
```

This creates a `.codegen/` directory with:
```bash
.codegen/
Expand Down Expand Up @@ -70,6 +78,18 @@ Let's walk through a minimal example of using Codegen in a project:
codegen reset
```

## Troubleshooting

Having issues? Here are some common problems and their solutions:

- **I'm hitting an UV error related to `[[ packages ]]`**: This means you're likely using an outdated version of UV. Try updating to the latest version with: `uv self update`.
- **I'm hitting an error about `No module named 'codegen.sdk.extensions.utils'`**: The compiled cython extensions are out of sync. Update them with `uv sync --reinstall-package codegen`.
- **I'm hitting a `RecursionError: maximum recursion depth exceeded` error while parsing my codebase**: If you are using python 3.12, try upgrading to 3.13. If you are already on 3.13, try upping the recursion limit with `sys.setrecursionlimit(10000)`.

<Note>
For more help, join our [community Slack](/introduction/community) or check the [FAQ](/introduction/faq).
</Note>

## Next Steps

<CardGroup cols={2}>
Expand Down Expand Up @@ -103,7 +123,3 @@ Let's walk through a minimal example of using Codegen in a project:
</Card>

</CardGroup>

<Note>
For more help, join our [community Slack](/introduction/community) or check the [FAQ](/introduction/faq).
</Note>
26 changes: 22 additions & 4 deletions docs/introduction/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,36 @@ codebase.commit()


<Note>
Codegen handles complex refactors while maintaining correctness, enabling a broad set of advanced code manipulation programs.
Codegen handles complex refactors while maintaining correctness, enabling a broad set of advanced code manipulation programs.
</Note>

<Tip>Codegen works with both Python and Typescript/JSX codebases. Learn more about language support [here](/building-with-codegen/language-support).</Tip>

## Installation
<Warning>Codegen requires Python 3.13</Warning>
## Quick Started

<Note>
Codegen requires Python 3.12 - 3.13 (recommended: Python 3.13+).
</Note>

### Using UV (Recommended)
```bash
pip install codegen
uv tool install codegen --python 3.13
```

### Using Pipx

<Warning>
Pipx is not officially supported by Codegen, but it should still work.
</Warning>

```bash
pipx install codegen
```

<Note>
For further & more in depth installation instructions, see the [installation guide](/introduction/installation).
</Note>

## What can I do with Codegen?

Codegen's simple yet powerful APIs enable a range of applications, including:
Expand Down
Loading
Loading