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
# 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
- [ ] I have read and agree to the [Contributor License
Agreement](../CLA.md)
---------
Co-authored-by: codegen-bot <[email protected]>
The `--fetch-docs` flag downloads API documentation and examples specific to your project's programming language.
32
31
</Note>
33
32
33
+
## Virtual Environment
34
+
35
+
Codegen maintains its own virtual environment in `.codegen/.venv/` to ensure consistent package versions and isolation from your project's dependencies. This environment is:
36
+
37
+
- Created using `uv` for fast, reliable package management
38
+
- Initialized with Python 3.13
39
+
- Automatically managed by Codegen commands
40
+
- Used for running codemods and Jupyter notebooks
41
+
- Gitignored to avoid committing environment-specific files
42
+
43
+
The environment is created during `codegen init` and used by commands like `codegen run` and `codegen notebook`.
44
+
45
+
<Note>To debug codemods, you will need to set the python virtual environment in your IDE to `.codegen/.venv`</Note>
46
+
34
47
### Configuration
35
48
36
49
The `config.toml` file stores your project settings:
@@ -49,13 +62,15 @@ Codegen automatically adds appropriate entries to your `.gitignore`:
49
62
50
63
```gitignore
51
64
# Codegen
52
-
.codegen/prompts/
65
+
.codegen/.venv/
53
66
.codegen/docs/
54
-
.codegen/examples/
67
+
.codegen/jupyter/
68
+
.codegen/codegen-system-prompt.txt
55
69
```
56
70
57
71
<Info>
58
-
While prompts, docs, and examples are ignored, your codemods in `.codegen/codemods/` are tracked in Git.
72
+
- While most directories are ignored, your codemods in `.codegen/codemods/` and `config.toml` are tracked in Git
73
+
- The virtual environment and Jupyter notebooks are gitignored to avoid environment-specific issues
Copy file name to clipboardExpand all lines: docs/introduction/overview.mdx
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ iconType: "solid"
9
9
10
10
It provides a scriptable interface to a powerful, multi-lingual language server built on top of [Tree-sitter](https://tree-sitter.github.io/tree-sitter/).
11
11
12
-
exportconstintoSnippet=`# Codegen builds a complete graph connecting
12
+
exportconstmetaCode=`# Codegen builds a complete graph connecting
13
13
# functions, classes, imports and their relationships
14
14
from codegen import Codebase
15
15
@@ -21,13 +21,23 @@ for function in codebase.functions:
0 commit comments