Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now in beta. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. |
fauna schema pull
Pull a database’s remote .fsl
schema files into a local schema directory.
Syntax
fauna schema pull [--active] [--[no-]color ] [--delete]
[--dir <value>] [--endpoint <value>] [--environment <value>]
[--help] [--secret <value>] [--timeout <value>]
[--url <value>]
Description
fauna schema pull
pulls a database’s remote .fsl
schema files into a
local schema directory.
If the database has staged schema, the command pulls the database’s remote staged schema by default. If the database has no staged schema, the command pulls the database’s remote schema.
To pull the remote active schema regardless of whether schema is staged, use the
--active
option. See Pull active schema files.
You can check whether a database has staged schema using
fauna schema status
.
Options
Option | Description |
---|---|
|
Pulls remote active schema files for the database into the local schema directory. |
|
Enables or disables color formatting for the output. Color formatting is
enabled by default if the terminal supports it (determined using
chalk/supports-color). Use
|
|
Delete |
|
A local directory to pull |
|
Fauna server endpoint. |
|
Environment to use from |
|
Help for |
|
Authentication secret. Overrides the
secret in Use a scoped key to interact with a child database using a parent database’s admin key. For example, with a parent database’s admin key secret of |
|
Connection timeout in milliseconds. |
|
Database URL. Overrides the |
Examples
Basic example
fauna schema pull
If the database has staged schema, the command pulls the database’s remote staged schema.
If the database has no staged schema, the command pulls the database’s remote schema.
Pull active schema files
Use the --active
option to pull the database’s remote active schema regardless
of whether the database has staged schema:
fauna schema pull --active
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!