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 run-queries
Run the queries from a file.
Syntax
fauna run-queries [<DBNAME>] [<QUERY>] [--[no-]color ]
[--file <value>] [--endpoint <value>] [--environment <value>]
[--format json|json-tagged|shell] [--output <value>]
[--secret <value>] [--stdin] [--timeout <value>]
[--typecheck] [--url <value>] [--version 4|10]
Description
Run the queries provided in file.
By default, this command supports FQL v10 queries. For FQL v4
queries, use the --version 4
option.
FQL v4 access
Fauna accounts created after August 21, 2024 can’t use |
Options
Option | Description |
---|---|
|
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
|
|
Connection endpoint from |
|
Environment to use, from a Fauna project. |
|
Name of file with queries to run. |
|
Output format: |
|
Help for |
|
File to write output to. |
|
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 |
|
Read file input from stdin. Write to stdout by default. |
|
Connection timeout (milliseconds). |
|
Enable typechecking. |
|
Database URL. Overrides the URL in |
|
FQL Version: See FQL v4 access. |
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!