# Publish and import

> Publish puts a code.extension.dev draft on your account and hands you a live preview, a local preview command and an import link that makes it a repository.

Canonical: https://docs.extension.dev/code/publish
This page as Markdown: https://docs.extension.dev/code/publish.md
Section: Code
Siblings: [AI generation](https://docs.extension.dev/code.md) · [Terminal](https://docs.extension.dev/code/terminal.md) · [Chat mode](https://docs.extension.dev/code/chat-mode.md) · [Starters and templates](https://docs.extension.dev/code/starters.md) · [Live preview](https://docs.extension.dev/code/preview.md) · [Select to edit](https://docs.extension.dev/code/select-to-edit.md) · [The Code tab](https://docs.extension.dev/code/code-tab.md) · [Build console](https://docs.extension.dev/code/build-console.md) · [Checkpoints](https://docs.extension.dev/code/checkpoints.md) · [Drafts](https://docs.extension.dev/code/drafts.md) · [Firefox engine](https://docs.extension.dev/code/firefox-engine.md) · [Download and run locally](https://docs.extension.dev/code/download-and-run.md) · [Share links](https://docs.extension.dev/code/share.md) · [Generation allowance](https://docs.extension.dev/code/allowance.md) · [Settings and sign-in](https://docs.extension.dev/code/settings.md)
Map of every page: https://docs.extension.dev/llms.txt · Whole corpus: https://docs.extension.dev/llms-full.txt

---

# Publish and import

Publish puts the extension on your Extension.dev account and answers with
three handoffs. Reach for it when the prototype is done and you want a
repository, a build pipeline, and a path to the stores.

## Quick start

Press **Publish** in the header. A dialog titled **Published to
Extension.dev** opens with three rows: **Live preview**, **Preview it
locally**, and **Continue on extension.dev**. Press the last one to turn the
draft into a GitHub repository connected as a project.


## How it works

### Three handoffs

| Row | What it gives you |
| --- | --- |
| **Live preview** | A link anyone opens in the browser, no account needed |
| **Preview it locally** | `npx -y extension@latest preview <zipUrl>`, the same build served to the Extension.js CLI on your machine |
| **Continue on extension.dev** | The import link that creates a repository from this publish in your workspace |

The import link opens `www.extension.dev/import` with `source=generation`,
the artifact id, the repository name, and the draft's name and description.
Import creates the repository, connects it as a project, and runs the first
build. From there you cut releases and submit to the stores. See
[Import](/guides/import).

### The agent's publish

`publish` is the agent's command. Typed bare it prints a notice pointing to
the header control. Asked for, the agent runs it and prints `Published`
with the extension's name, then the import link, the view link and the
local command. Signed out, it prints `Sign in to publish:` with the sign-in
address.

### Project and build addresses

Once a project exists, the workbench answers two more address shapes.
`/<workspace>/<project>` is a project address: it says the workbench has
not opened this project and links to the console. The build address,
`/<workspace>/<project>/builds/<ref>`, is a read-only view of one build
pinned at a commit, with its file list and two buttons. **Restore here** brings those files into the
workbench, and **Fork to new project** goes through a confirmation page on
www at `/new/fork`.

## Reference

| Limit | Value |
| --- | --- |
| Publishes per UTC day | 200 |
| Uploads per 10 minutes | 20 |
| Published source kept | 90 days |
| Projects on Free | 1 |
| Projects on Pro | 10 |
| Forks per day | 50 |

| Address | What it shows |
| --- | --- |
| `/<workspace>/<project>` | The project address, with a link to the console |
| `/<workspace>/<project>/builds/<ref>` | One build, read-only, with **Restore here** and **Fork to new project** |

## When it fails

- **The import link returns nothing.** A published source artifact is kept
  90 days. Publish again from the workspace.
- **Import refuses a second project.** Free allows one project. Upgrade, or
  import into the project you have.
- **Typing `publish` only prints a notice.** The bare word is the agent's
  command. Use **Publish** in the header, or ask the agent to publish this
  extension.
- **The agent answers "Nothing to deploy yet."** The workspace has no files
  to publish. Write a `manifest.json` and run `build` first.

## Next

- [Import](/guides/import) for what happens on www after the handoff
- [Share links](/code/share) for a preview without a repository
- [Download and run locally](/code/download-and-run) for the local command
  the dialog prints
