You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,37 @@ This is a collection of examples using [Codegen](https://codegen.com). You can u
8
8
9
9
We recommend using [`uv`](https://github.com/astral-sh/uv) with Python 3.13 for the best experience.
10
10
11
-
First, install uv if you haven't already
11
+
To install Codegen, please follow the [official installation guide](https://docs.codegen.com/introduction/installation). Once Codegen is installed, use these steps to run the examples in this repository:
12
+
13
+
Install the Codegen CLI globally
12
14
```bash
13
-
brew install uv
15
+
uv tool install codegen
14
16
```
15
17
16
-
Create and activate a Python 3.13 virtual environment
18
+
Initialize Codegen in your project
17
19
```bash
18
-
uv venv &&source .venv/bin/activate
20
+
codegen init
19
21
```
20
22
21
-
Install the `codegen` package
23
+
Activate the virtual environment
22
24
```bash
23
-
uv sync
25
+
source .codegen/.venv/bin/activate
24
26
```
25
27
28
+
Your environment is now ready to run example codemods.
29
+
30
+
### IDE Configuration (Optional)
31
+
32
+
To configure your IDE for optimal use with Codegen, follow our [IDE setup guide](https://docs.codegen.com/introduction/ide-usage#configuring-your-ide-interpreter).
33
+
26
34
## Examples
27
35
28
-
Each directory contains a self-contained example with:
29
-
- A README explaining the transformation
30
-
- Sample code to transform
31
-
- The Codegen script that performs the transformation
36
+
Within the examples folder, each subdirectory contains a self-contained example with:
37
+
- An explanation of the transformation (`README.md`)
38
+
- A Codegen script that performs the transformation (`run.py`)
39
+
- Sample code to transform, if not using a repository (`input_repo/`)
40
+
41
+
To see a transformation, simply run the `run.py` script within the desired directory.
0 commit comments