> 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`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: origami export-site

## Article: origami export-site

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

## Article Content:

# wix origami export-site

<blockquote class="caution">

__Alpha:__
[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 alpha. 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, 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/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 the exported files without asking, when you export again into an exported site. |
| `--verbose` | Displays diagnostic details during the export. |
| `--json` | Outputs the result in JSON format. |