Skip to content

Commit ec41e1d

Browse files
authored
docs: General Installation Docs Improvement (#703)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
1 parent a483fdf commit ec41e1d

File tree

4 files changed

+422
-390
lines changed

4 files changed

+422
-390
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Write code that transforms code. Codegen combines the parsing power of [Tree-sit
4545

4646
We support
4747

48-
- Running Codegen in Python 3.12 3.13 (recommended: Python 3.13)
48+
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
4949
- macOS and Linux
5050
- macOS is supported
5151
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
@@ -57,7 +57,7 @@ We support
5757
uv pip install codegen
5858
5959
# Install global CLI
60-
uv tool install codegen
60+
uv tool install codegen --python 3.13
6161
6262
# Create a codemod for a given repo
6363
cd path/to/repo

docs/introduction/installation.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ iconType: "solid"
77

88
Install and set up Codegen in your development environment.
99

10+
#### We currently support:
11+
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
12+
- macOS and Linux
13+
- macOS is supported
14+
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
15+
- Windows is not supported
16+
- Python, Typescript, Javascript and React codebases
17+
1018
## Prerequisites
1119

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

1927
```bash
20-
uv tool install codegen
28+
uv tool install codegen --python 3.13
2129
```
2230

2331

@@ -38,7 +46,7 @@ Let's walk through a minimal example of using Codegen in a project:
3846
```bash
3947
codegen init
4048
```
41-
49+
4250
This creates a `.codegen/` directory with:
4351
```bash
4452
.codegen/
@@ -70,6 +78,18 @@ Let's walk through a minimal example of using Codegen in a project:
7078
codegen reset
7179
```
7280

81+
## Troubleshooting
82+
83+
Having issues? Here are some common problems and their solutions:
84+
85+
- **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`.
86+
- **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`.
87+
- **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)`.
88+
89+
<Note>
90+
For more help, join our [community Slack](/introduction/community) or check the [FAQ](/introduction/faq).
91+
</Note>
92+
7393
## Next Steps
7494

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

105125
</CardGroup>
106-
107-
<Note>
108-
For more help, join our [community Slack](/introduction/community) or check the [FAQ](/introduction/faq).
109-
</Note>

docs/introduction/overview.mdx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,36 @@ codebase.commit()
2929

3030

3131
<Note>
32-
Codegen handles complex refactors while maintaining correctness, enabling a broad set of advanced code manipulation programs.
32+
Codegen handles complex refactors while maintaining correctness, enabling a broad set of advanced code manipulation programs.
3333
</Note>
3434

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

37-
## Installation
38-
<Warning>Codegen requires Python 3.13</Warning>
37+
## Quick Started
3938

39+
<Note>
40+
Codegen requires Python 3.12 - 3.13 (recommended: Python 3.13+).
41+
</Note>
42+
43+
### Using UV (Recommended)
4044
```bash
41-
pip install codegen
45+
uv tool install codegen --python 3.13
4246
```
4347

48+
### Using Pipx
49+
50+
<Warning>
51+
Pipx is not officially supported by Codegen, but it should still work.
52+
</Warning>
53+
54+
```bash
55+
pipx install codegen
56+
```
57+
58+
<Note>
59+
For further & more in depth installation instructions, see the [installation guide](/introduction/installation).
60+
</Note>
61+
4462
## What can I do with Codegen?
4563

4664
Codegen's simple yet powerful APIs enable a range of applications, including:

0 commit comments

Comments
 (0)