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
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,42 @@ 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
+
The complete installation guide for Codegen is available [here](https://docs.codegen.com/introduction/installation). The steps below are a quickstart to getting the examples working.
12
+
11
13
First, install uv if you haven't already
12
14
```bash
13
15
brew install uv
14
16
```
15
17
16
-
Create and activate a Python 3.13 virtual environment
18
+
Install the Codegen CLI globally
19
+
```bash
20
+
uv tool install codegen
21
+
```
22
+
23
+
Initialize Codegen in your project
17
24
```bash
18
-
uv venv &&source .venv/bin/activate
25
+
codegen init
19
26
```
20
27
21
-
Install the `codegen` package
28
+
Activate a virtual environment
22
29
```bash
23
-
uv sync
30
+
source .codegen/.venv/bin/activate
24
31
```
25
32
33
+
Your environment is now ready to run example codemods.
34
+
35
+
### IDE Configuration
36
+
37
+
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).
38
+
26
39
## Examples
27
40
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
41
+
Within the /examples folder, each subdirectory contains a self-contained example with:
42
+
- An explanation of the transformation (`README.md`)
43
+
- A Codegen script that performs the transformation (`run.py`)
44
+
- Sample code to transform if not using a repository (`input_repo/`)
45
+
46
+
To see the transformation, simply run the `run.py` script within the desired directory.
0 commit comments