Skip to content

Commit f660f1f

Browse files
authored
Merge pull request #14 from sublimegame/feature/multi-language-support
Feature/multi language support
2 parents 4aac572 + 2d4aaac commit f660f1f

File tree

5 files changed

+265
-178
lines changed

5 files changed

+265
-178
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,7 @@ coverage/
9696
.node_repl_history
9797

9898
# LLM cache
99-
llm_cache.json
99+
llm_cache.json
100+
101+
# Output files
102+
output/

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
> *Ever stared at a new codebase written by others feeling completely lost? This tutorial shows you how to build an AI agent that analyzes GitHub repositories and creates beginner-friendly tutorials explaining exactly how the code works.*
66
77
<p align="center">
8-
<img
8+
<img
99
src="./assets/banner.png" width="800"
1010
/>
1111
</p>
@@ -19,7 +19,7 @@ This is a tutorial project of [Pocket Flow](https://github.com/The-Pocket/Pocket
1919
## ⭐ Example Results for Popular GitHub Repositories!
2020

2121
<p align="center">
22-
<img
22+
<img
2323
src="./assets/example.png" width="600"
2424
/>
2525
</p>
@@ -67,7 +67,7 @@ This is a tutorial project of [Pocket Flow](https://github.com/The-Pocket/Pocket
6767

6868
1. Clone this repository
6969

70-
2. Install dependencies:
70+
2. Install dependencies:
7171
```bash
7272
pip install -r requirements.txt
7373
```
@@ -79,38 +79,42 @@ This is a tutorial project of [Pocket Flow](https://github.com/The-Pocket/Pocket
7979
api_key=os.getenv("GEMINI_API_KEY", "your-api_key"),
8080
)
8181
```
82-
82+
8383
You can use your own models. We highly recommend the latest models with thinking capabilities (Claude 3.7 with thinking, O1). You can verify that it is correctly set up by running:
8484
```bash
8585
python utils/call_llm.py
8686
```
8787

88-
7. Generate a complete codebase tutorial by running the main script:
88+
4. Generate a complete codebase tutorial by running the main script:
8989
```bash
9090
# Analyze a GitHub repository
9191
python main.py --repo https://github.com/username/repo --include "*.py" "*.js" --exclude "tests/*" --max-size 50000
9292

9393
# Or, analyze a local directory
9494
python main.py --dir /path/to/your/codebase --include "*.py" --exclude "*test*"
95+
96+
# Or, generate a tutorial in Chinese
97+
python main.py --repo https://github.com/username/repo --language "Chinese"
9598
```
99+
96100
- `--repo` or `--dir` - Specify either a GitHub repo URL or a local directory path (required, mutually exclusive)
97101
- `-n, --name` - Project name (optional, derived from URL/directory if omitted)
98102
- `-t, --token` - GitHub token (or set GITHUB_TOKEN environment variable)
99103
- `-o, --output` - Output directory (default: ./output)
100104
- `-i, --include` - Files to include (e.g., "*.py" "*.js")
101105
- `-e, --exclude` - Files to exclude (e.g., "tests/*" "docs/*")
102106
- `-s, --max-size` - Maximum file size in bytes (default: 100KB)
103-
104-
The application will crawl the repository, analyze the codebase structure, generate tutorial content, and save the output in the specified directory (default: ./output).
107+
- `--language` - Language for the generated tutorial (default: "english")
105108

109+
The application will crawl the repository, analyze the codebase structure, generate tutorial content in the specified language, and save the output in the specified directory (default: ./output).
106110

107111
## 💡 Development Tutorial
108112

109113
- I built using [**Agentic Coding**](https://zacharyhuang.substack.com/p/agentic-coding-the-most-fun-way-to), the fastest development paradigm, where humans simply [design](docs/design.md) and agents [code](flow.py).
110114

111115
- The secret weapon is [Pocket Flow](https://github.com/The-Pocket/PocketFlow), a 100-line LLM framework that lets Agents (e.g., Cursor AI) build for you
112-
113-
- Check out the Step-by-step YouTube development tutorial:
116+
117+
- Check out the Step-by-step YouTube development tutorial:
114118

115119
<br>
116120
<div align="center">

0 commit comments

Comments
 (0)