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
This directory contains a collection of examples demonstrating various use cases of the [Codegen](https://codegen.com) SDK.
4
+
5
+
## Types of Examples
6
+
7
+
The examples in this directory fall into two main categories:
8
+
9
+
1.**Code Transformation Examples**: One-time utilities that transform code in various ways (e.g., migrating from one library to another, converting code patterns, etc.)
10
+
11
+
2.**Modal-based Service Examples**: Applications that can be deployed as services using [Modal](https://modal.com), such as chatbots, webhooks handlers, and analytics tools.
12
+
13
+
## Using the Modal Deployer
14
+
15
+
For Modal-based examples, we provide a convenient deployment tool called `Deployer.sh` that allows you to interactively select and deploy multiple examples concurrently.
16
+
17
+
### Prerequisites
18
+
19
+
- Python 3.9 or higher
20
+
-[Modal](https://modal.com/) account and CLI
21
+
- Git
22
+
23
+
### Running the Deployer
24
+
25
+
To use the deployer:
26
+
27
+
```bash
28
+
# Navigate to the examples directory
29
+
cd examples
30
+
31
+
# Run the deployer script
32
+
bash Deployer.sh
33
+
```
34
+
35
+
The deployer will:
36
+
37
+
1. Check for required dependencies (Python, Modal)
38
+
2. Display a list of deployable examples
39
+
3. Allow you to select which examples to deploy
40
+
4. Deploy the selected examples concurrently
41
+
5. Provide a summary of deployment results
42
+
6. Offer options to view logs or status of deployed examples
43
+
44
+
### Available Modal Examples
45
+
46
+
The following examples can be deployed using the Deployer.sh script:
47
+
48
+
-`ai_impact_analysis`: Analyze the impact of AI on codebases
49
+
-`codegen-mcp-server`: MCP server implementation
50
+
-`codegen_app`: Codegen web application
51
+
-`cyclomatic_complexity`: Calculate cyclomatic complexity of code
52
+
-`deep_code_research`: Deep research on code repositories
53
+
-`delete_dead_code`: Identify and remove dead code
-`modal_repo_analytics`: Repository analytics using Modal
58
+
-`pr_review_bot`: PR review automation
59
+
-`repo_analytics`: Repository analytics tools
60
+
-`slack_chatbot`: Slack chatbot integration
61
+
-`snapshot_event_handler`: Event handler for snapshots
62
+
-`swebench_agent_run`: SWE benchmark agent
63
+
-`ticket-to-pr`: Convert tickets to PRs
64
+
65
+
Each of these examples has its own `deploy.sh` script and README with specific deployment instructions.
66
+
67
+
## Running Non-Modal Examples
68
+
69
+
For examples that don't have a `deploy.sh` script, you can run them locally following the instructions in their respective README files. These examples typically perform one-time code transformations and don't need to be deployed as services.
70
+
71
+
## Contributing
72
+
73
+
If you'd like to add a new example, please follow the [Contributing Guide](../CONTRIBUTING.md) for instructions.
74
+
75
+
## License
76
+
77
+
All examples are licensed under the [Apache 2.0 license](../LICENSE).
0 commit comments