Skip to content

Commit bfdd541

Browse files
author
codegen-bot
committed
.
1 parent 094c6c1 commit bfdd541

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

docs/cli/create.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ When you run `codegen create rename-function`, it creates:
3333
.codegen/
3434
└── codemods/
3535
└── rename_function/
36-
├── rename_function.py # The codemod implementation
37-
└── rename_function_prompt.md # System prompt (if --description used)
36+
├── rename_function.py # The codemod implementation
37+
└── rename_function-system-prompt.txt # System prompt (if --description used)
3838
```
3939

4040
The generated codemod will have this structure:
@@ -47,7 +47,16 @@ from codegen import Codebase
4747
def run(codebase: Codebase):
4848
"""Add a description of what this codemod does."""
4949
# Add your code here
50-
pass
50+
print('Total files: ', len(codebase.files))
51+
print('Total functions: ', len(codebase.functions))
52+
print('Total imports: ', len(codebase.imports))
53+
54+
if __name__ == "__main__":
55+
print('Parsing codebase...')
56+
codebase = Codebase("./")
57+
58+
print('Running...')
59+
run(codebase)
5160
```
5261

5362
## Examples

docs/cli/notebook.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "notebook"
2+
title: "Notebook Command"
33
sidebarTitle: "notebook"
44
description: "Open a Jupyter notebook with the current codebase loaded"
55
icon: "book"

0 commit comments

Comments
 (0)