> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt
> - To build a Wix site agentically, follow https://www.wix.com/headless/skill.md

## Resource: origami export-site

## Article: origami export-site

## Article Link: https://dev.wix.com/docs/wix-cli/cli-for-origami/command-reference/export-commands/origami-export-site.md

## Article Content:

# wix origami export-site

<blockquote class="caution">

__Beta:__
[Exporting your site to code](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/about-exporting-your-site-to-code.md) is currently in beta. This feature is subject to change and may have bugs, issues, and limitations. We're actively improving it based on your feedback.

</blockquote>

Exports a Studio Two site to a local folder as code. For more information, see [About Exporting Your Site to Code](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/about-exporting-your-site-to-code.md).

The CLI prompts you to pick one of your sites, then prompts you for a folder and suggests `origami/sites/<site-id>` in the current folder. If the folder already exists and isn't empty, the CLI asks before the export replaces its contents.

When you run the command in the root of an exported site without `--site` or `--dir`, it exports the same site again into that folder. It asks first, and if the folder is a git repository, it commits your local changes before it replaces them. Otherwise, local changes that you haven't imported are lost.

> **Note:** This command is part of the `origami` flow. To use it, [add the flow](https://dev.wix.com/docs/wix-cli/cli/command-reference/global-commands/flows.md) to the CLI.

## Usage

```bash
wix origami export-site [flags]
```

## Flags

The following flags are available for the `wix origami export-site` command:

| Flag | Description |
| ---- | ----------- |
| `--site <site>` | The name or ID of the site to export. |
| `-d, --dir <path>` | The folder to export the site to. |
| `-y, --yes` | Replaces an exported site or a non-empty folder without asking. Required with `--json` or in a non-interactive terminal. |
| `--verbose` | Displays diagnostic details during the export. |
| `--json` | Outputs the result in JSON format. |