日本語 · English

ai-desk

A foundation for letting AI write your programs

All you do is tell the AI what you want, in plain language.
The AI handles reading, writing, fixing, and testing the code.

Try the demos View on GitHub

Who is this for

If you want AI to build things for you but the code keeps falling apart between sessions — this addresses the problem from the structural side, not by hoping the model gets smarter.

A built-in mechanism crushes the combinatorial state-bugs that usually make AI-written code "work halfway, then collapse." It's especially effective for things with lots of branching logic: game rules, business rules, app UI state.

How to use it

No commands to type. Just ask the AI in plain language.

When you want to build something
Read AI_ONBOARDING.md first, then build a rock-paper-scissors game that runs in the browser.
When you want to fix a bug
Read AI_ONBOARDING.md first, then start ai-eyes and fix [the symptom you're seeing].
When you want to edit an existing file
Read AI_ONBOARDING.md first, then change [feature] in app.js to do [new behavior].

Playable demos

Play them right on this page. Click a title to open in a new tab.

Constraint Burst

Click to paint colors that spread. When every ball is one color, you win. Touch friendly.

Color Swarm

Drag the cursor to attract or repel particles. Touch friendly.

Space Race

Hurtle through space and fly through rings. Drag or use arrow keys to steer; the radar at the bottom-left shows the next ring.

Mini Spreadsheet

Cells + formula parser + dependency graph + recalc + UI — all in one 585-line file. SUM / AVG / IF / ranges / cycle detection.

Node Graph

Visual programming. Drag nodes, wire output ports to input ports, watch values flow into Output. DAG evaluation + cycle detection + pan + delete in one 514-line file.

Kanban

Columns / cards / drag-and-drop (cards and columns both reorder) / inline edit / Undo / auto-save — all in one 554-line file.

Vector Pad

Vector drawing tool. Tools / shapes / selection & resize handles / layers / properties panel / Undo / PNG export — all in one file.

Set up gemini-cli + WezTerm on Windows

Windows 10/11 instructions. All commands run in PowerShell (Start menu → "PowerShell"). On Mac/Linux, swap winget for brew / your package manager and the PowerShell env line for export in ~/.zshrc.

Empirically, gemini-cli is most stable on WezTerm (less likely to produce garbled output or input drift). Stating the fact, not explaining it.

1. Install WezTerm
winget install wez.wezterm
No winget? Use the official installer.
2. Install Node.js (v20+)
winget install OpenJS.NodeJS.LTS
If already installed, check with node -v. Update if older than v20 (gemini-cli requires v20+).
3. Install gemini-cli
npm install -g @google/gemini-cli
Verify with gemini --version.
4. Get an API key and persist it as a user env var
[System.Environment]::SetEnvironmentVariable('GEMINI_API_KEY', '<your-key>', 'User')
Free key at aistudio.google.com/apikey. The command above stores it in the user environment (survives reboots). Reopen WezTerm after setting.
5. Open WezTerm and start it
gemini
Then just talk to the AI in plain language:
Read AI_ONBOARDING.md first, then build [what you want]

Vanilla JS, single-file by default

Every demo above (Constraint Burst / Color Swarm / Space Race) is built as zero-dependency vanilla HTML + JS in one file. No framework, no build step.

The "heavy function + one file + zero deps" stance comes from a premise of ai-desk: the AI must be able to hold the whole file inside a single attention spotlight (each demo is roughly 200–500 lines).

Ask the AI "build this" and it can produce new games, visualizers, and small tools using the same structure, one after another. The demos you just touched are the exact templates you can ask for.

Learn more