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

# forest schema:apply

> Send the .forestadmin-schema.json file of your repository to an environment

# forest schema:apply

Send the `.forestadmin-schema.json` file of the current directory to an environment. Use it to update an environment's schema from a deployment pipeline without starting the back-end against it.

## Usage

```bash theme={null}
forest schema:apply [options]
```

## Options

| Option | Description |
| - | - |
| `-s, --secret` | Environment secret of the target environment. Defaults to the `FOREST_ENV_SECRET` environment variable |

Run the command from the directory that holds `.forestadmin-schema.json`. If the schema has not changed, the command reports it and changes nothing.

## Examples

```bash theme={null}
# Apply the schema to the environment of FOREST_ENV_SECRET
forest schema:apply

# Apply it to a given environment
forest schema:apply --secret "$PRODUCTION_FOREST_ENV_SECRET"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.