mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-16 12:28:06 +00:00
fix(en): correct file locations to match zh structure
- Move Code Organization.md, General Project Architecture Template.md to 00-fundamentals - Move Learning Experience.md, Gemini Headless..., vibe-coding-experience... to 02-methodology - Update README files
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Gemini Headless Mode Translation Guide
|
||||
|
||||
Objective: To perform non-interactive bulk translation locally using Gemini CLI (gemini-2.5-flash), avoiding tool calls and permission pop-ups, suitable for quick machine translation drafts of prompts/skills/documents.
|
||||
|
||||
## Principle Overview
|
||||
- CLI connects directly to Gemini API using locally cached Google credentials; model inference is done in the cloud.
|
||||
- Use `--allowed-tools ''` to disable tool calls, ensuring only plain text is returned, without triggering shell/browser actions.
|
||||
- Pass text to be translated via standard input, and get results from standard output, facilitating script pipeline processing.
|
||||
- A proxy (http/https) can be set to route requests through a local proxy node, improving success rate and stability.
|
||||
|
||||
## Basic Commands
|
||||
```bash
|
||||
# Proxy (if needed)
|
||||
export http_proxy=http://127.0.0.1:9910
|
||||
export https_proxy=http://127.0.0.1:9910
|
||||
|
||||
# Single example: Chinese -> English
|
||||
printf '你好,翻译成英文。' | gemini -m gemini-2.5-flash \
|
||||
--output-format text \
|
||||
--allowed-tools '' \
|
||||
"Translate this to English."
|
||||
```
|
||||
- The prompt can be placed as a positional argument (`-p/--prompt` is deprecated).
|
||||
- Output is plain text, can be redirected for saving.
|
||||
|
||||
## Batch File Translation Example (stdin → stdout)
|
||||
```bash
|
||||
src=i18n/zh/prompts/README.md
|
||||
dst=i18n/en/prompts/README.md
|
||||
cat "$src" | gemini -m gemini-2.5-flash --output-format text --allowed-tools '' \
|
||||
"Translate to English; keep code fences unchanged." > "$dst"
|
||||
```
|
||||
- Can loop through multiple files in a script; check exit code and output on failure.
|
||||
|
||||
## Integration with existing l10n-tool
|
||||
- l10n-tool (deep-translator) is used for full machine translation; if quality or connectivity is unstable, it can be switched to file-by-file processing with Gemini CLI.
|
||||
- Process: `cat source_file | gemini ... > target_file`; if necessary, place redirection instructions or manually proofread in other language directories.
|
||||
|
||||
## Notes
|
||||
- Ensure `gemini` command is in PATH and identity authentication is complete (first run will guide login).
|
||||
- For long texts, it is recommended to split them into segments to avoid timeouts; code blocks can be kept as is by declaring "keep code fences unchanged" in the prompt.
|
||||
- Adjust proxy port according to actual environment; if no proxy is needed, omit relevant environment variables.
|
||||
@@ -0,0 +1,5 @@
|
||||
The texts that impressed me the most
|
||||
|
||||
Huangdi Yinfu Jing: Sever the benefit from one source, and use the master ten times. Three repetitions day and night, and use the master ten thousand times.
|
||||
|
||||
Douyin says: People are driven by profit; great profit leads to great deeds, small profit to small deeds, and no profit to no deeds.
|
||||
@@ -8,4 +8,7 @@ Tools, tutorials, and development guides.
|
||||
- [LazyVim Shortcut Cheatsheet](./LazyVim%20Shortcut%20Cheatsheet.md)
|
||||
- [auggie-mcp Configuration Document](./auggie-mcp%20Configuration%20Document.md)
|
||||
- [SSH via Mobile with FRP](./How%20to%20SSH%20to%20Local%20Computer%20from%20Any%20Location%20via%20Mobile%2C%20Based%20on%20FRP%20Implementation.md)
|
||||
- [Gemini Headless Mode Translation Guide](./Gemini%20Headless%20Mode%20Translation%20Guide.md)
|
||||
- [Learning Experience](./Learning%20Experience.md)
|
||||
- [Vibe Coding Experience Collection](./vibe-coding-experience-collection.md)
|
||||
- [telegram-dev/](./telegram-dev/) - Telegram development resources
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
https://x.com/3i8ae3pgjz56244/status/1993328642697707736?s=46
|
||||
|
||||
I wrote the design document very detailed, including the specific logic of the service layer in pseudocode, and then handed it over to AI. It outputted the code in one go. Then I used another AI to review it, modified it according to the review comments, ran the test cases, and let the AI generate the commit and push.
|
||||
|
||||
Comment: Requirements -> Pseudocode -> Code
|
||||
|
||||
---
|
||||
|
||||
https://x.com/jesselaunz/status/1993231396035301437?s=20
|
||||
|
||||
For Gemini 3 Pro's system prompt, it improved the performance of multiple agent benchmarks by about 5%.
|
||||
|
||||
---
|
||||
|
||||
Point -> Line -> Body iterative refinement: for tasks within the scope of use, first polish a single basic task, then perform batch execution based on this.
|
||||
|
||||
---
|
||||
|
||||
https://x.com/nake13/status/1995123181057917032?s=46
|
||||
|
||||
---
|
||||
|
||||
https://x.com/9hills/status/1995308023578042844?s=46
|
||||
|
||||
---
|
||||
|
||||
File header comments, a paragraph describing the code's purpose, upstream and downstream links, documentation maintained by agents or Claude maintaining a paragraph description for each module, reducing cognitive load, trying to do subtraction and indexing, reference Claude skill.
|
||||
|
||||
---
|
||||
|
||||
https://x.com/dogejustdoit/status/1996464777313542204?s=46
|
||||
|
||||
As software scales, "looking at code" with human eyes not only fails to cope with increasing complexity but also exhausts developers. Code is ultimately converted into machine code for execution. High-level languages are just an abstraction to facilitate human understanding. What's important is to verify the program's execution logic and ensure correct behavior through automated testing, static analysis, formal verification, and other means. The core of future software engineering will not be "understanding code," but "verifying that code runs according to the correct logic."
|
||||
|
||||
---
|
||||
|
||||
https://x.com/yanboofficial/status/1996188311451480538?s=46
|
||||
|
||||
```prompt
|
||||
Based on my requirements, please create a real-time interactive 3D particle system using Three.js. If you do it well the first time, I will give you a $100 tip; my requirements are:
|
||||
```
|
||||
|
||||
Comment: This prompt may improve the generation effect.
|
||||
|
||||
---
|
||||
|
||||
https://x.com/zen_of_nemesis/status/1996591768641458368?s=46
|
||||
|
||||
---
|
||||
|
||||
https://github.com/tesserato/CodeWeaver
|
||||
|
||||
CodeWeaver weaves your codebase into a navigable Markdown document.
|
||||
|
||||
It can directly "weave" your entire project, no matter how much spaghetti code it has, into a clear and organized Markdown file with a tree-like structure, making it clear at a glance. All code is put into code blocks, greatly simplifying the sharing, documentation, and integration with AI/ML tools of the codebase.
|
||||
|
||||
---
|
||||
|
||||
https://x.com/magic47972451/status/1998639692905087356?s=46
|
||||
Reference in New Issue
Block a user