> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pull Schema

> Pull schemas

Download schema definitions from a workspace to local JSON files. Saves one JSON file per schema (named by slug) to the output directory. Use `--slug` to pull a single schema, or omit to pull all. <br /><br />
By default, pulled schemas are stored in the `suprsend/schema/` directory, but you can change the destination using the -d flag.

## Syntax

```bash theme={"system"}
suprsend schema pull [flags]
```

## Flags

| Flag                | Description                                          | Default             |
| ------------------- | ---------------------------------------------------- | ------------------- |
| `-h, --help`        | Show help for the command                            | –                   |
| `-d, --dir string`  | Directory to save schema files to                    | `./suprsend/schema` |
| `-f, --force`       | Skip directory confirmation prompt, use default path | –                   |
| `-m, --mode string` | Version mode (`draft` or `live`)                     | `live`              |
| `-g, --slug string` | Schema slug to pull (omit to pull all)               | –                   |

## Example

```bash theme={"system"}
# Pull schemas from staging workspace (default)
suprsend schema pull

# Pull schemas from production workspace
suprsend schema pull --workspace production

# Pull individual schema by passing it's slug
suprsend schema pull --slug my-schema

# Pull schemas into custom directory path
suprsend schema pull --dir schemas

# Pull draft schemas from production
suprsend schema pull --mode draft --workspace production

```
