Generate with AI
You want to describe an extension and get a running one back. code.extension.dev starts a session from a prompt, and every session lives at its own address, /s/<id>. You can also reach it from the create menu on extension.dev/new.
Anonymous sessions carry 3 prompts before sign-in, so the first working extension costs no account.
What a prompt returns
A routing step first chooses a starting template from the Extension.js corpus, so generation edits a working extension instead of inventing one. The model then returns structured operations, not a wall of text:
| Part | What it is |
|---|---|
| Operations | write, delete, rename, and incremental edits to files |
| Preview entry | Which surface the preview opens on |
| User steps | What you have to do by hand, permissions to grant, pages to open |
| Assumptions | What the model decided when the prompt did not say |
The session keeps the project editable, recompiles on change, and shows the running extension next to its source, so a wrong answer gets corrected instead of regenerated.
How it compiles
Compilation happens in the page: esbuild-wasm through @extension.dev/compiler, rendered by @extension.dev/emulator. There is no server build and no container, which is what keeps the edit to preview loop immediate. The emulator is the same one that shared build links use.
Graduating the session
A session becomes a real project through one of two doors:
Publish it as an artifact. Publishing returns an /import URL, and opening it creates a real GitHub repository from the session, connected as a project.
Continue locally. The session hands you a command:
bashnpx extension@latest dev <zipUrl>That runs the generated project on your machine with the Extension.js framework, no account involved. The framework is documented at extension.js.org.
When it fails
- The fourth prompt asks for a sign-in. Anonymous sessions carry 3 prompts. Sign in and the session continues where it stopped.
- The preview loads but nothing visible happens. Read the user steps and assumptions the session returned. Extensions often need a step the page cannot do for you, a permission grant or a target page to open.
- The import link from a published session returns nothing. Published artifacts are kept 90 days. Reopen the session and publish again.
- The generated code is close but wrong. Prompt the correction in the same session. Incremental operations edit the existing files, so you do not lose the parts that were right.
