Loading...
Loading...
通过逆向工程的 Gemini Web API 生成图片和文本。支持文本生成、提示词生图、参考图片视觉输入和多轮对话。当其他技能需要图片生成后端,或用户要求"用Gemini生成图片"、"Gemini文本生成"时使用。
npx skill4agent add tuziapi/tuzi-skills tuzi-danger-gemini-webscripts/SKILL_DIR${SKILL_DIR}/scripts/<script-name>.ts${SKILL_DIR}| Script | Purpose |
|---|---|
| CLI entry point for text/image generation |
| TypeScript port of |
~/Library/Application Support/tuzi-skills/gemini-web/consent.json~/.local/share/tuzi-skills/gemini-web/consent.json%APPDATA%\tuzi-skills\gemini-web\consent.jsonaccepted: truedisclaimerVersion: "1.0"acceptedAtAskUserQuestion{"version":1,"accepted":true,"acceptedAt":"<ISO>","disclaimerVersion":"1.0"}# Check project-level first
test -f .tuzi-skills/tuzi-danger-gemini-web/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.tuzi-skills/tuzi-danger-gemini-web/EXTEND.md" && echo "user"# Text generation
npx -y bun ${SKILL_DIR}/scripts/main.ts "Your prompt"
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Your prompt" --model gemini-3-flash
# Image generation
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cute cat" --image cat.png
npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles system.md content.md --image out.png
# Vision input (reference images)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Describe this" --reference image.png
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Create variation" --reference a.png --image out.png
# Multi-turn conversation
npx -y bun ${SKILL_DIR}/scripts/main.ts "Remember: 42" --sessionId session-abc
npx -y bun ${SKILL_DIR}/scripts/main.ts "What number?" --sessionId session-abc
# JSON output
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json| Option | Description |
|---|---|
| Prompt text |
| Read prompt from files (concatenated) |
| Model: gemini-3-pro (default), gemini-3-flash, gemini-3-flash-thinking, gemini-3.1-pro-preview |
| Generate image (default: generated.png) |
| Reference images for vision input |
| Session ID for multi-turn conversation |
| List saved sessions |
| Output as JSON |
| Refresh cookies, then exit |
| Custom cookie file path |
| Chrome profile directory |
| Model | Description |
|---|---|
| Default, latest 3.0 Pro |
| Fast, lightweight 3.0 Flash |
| 3.0 Flash with thinking |
| 3.1 Pro preview (empty header, auto-routed) |
--loginGEMINI_WEB_CHROME_PATH| Variable | Description |
|---|---|
| Data directory |
| Cookie file path |
| Chrome profile directory |
| Chrome executable path |
| Proxy for Google access (set inline with command) |
sessions/<id>.jsonidmetadatamessages