feat: add phantom-canvas skill for Gemini image generation

This commit is contained in:
Kunthawat Greethong
2026-05-26 12:43:48 +07:00
parent b1bb6cbedc
commit a7477db220
5 changed files with 550 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# AGENTS.md
CLI tool and HTTP API for AI image/video generation via Gemini Web.
## What this tool does
Phantom Canvas wraps Gemini Web as a programmable CLI and HTTP API. It launches Chrome via CDP, automates Gemini's web UI, and exposes generation capabilities for AI agents, scripts, and applications.
## How to use
```bash
bun add -g phantom-canvas # or: npm install -g phantom-canvas
phantom-canvas generate "your prompt" -o output.png --headed # first time: login in Chrome
phantom-canvas generate "your prompt" -o output.png # after that: headless
```
See [SKILL.md](SKILL.md) for complete agent instructions.
## Architecture
- `index.ts` — CLI entry point (chrome / generate / serve)
- `lib/browser.ts` — Browser automation (Chrome CDP + Playwright)
- `lib/tasks.ts` — Async task queue
- `dist/index.js` — Compiled Node.js bundle
## Session
Chrome stores login in `~/.phantom-canvas/chrome-profile/`. First time requires `--headed` to login interactively. After that, login persists and headless mode works.