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 CLI commands

fauna add-endpoint

Adds an endpoint to query databases.

fauna cloud-login

Adds a Fauna endpoint with login credentials.

fauna create-database

Creates a database.

fauna create-key

Creates a key to access a database.

fauna default-endpoint

Selects an endpoint configuration entry as the default endpoint.

fauna delete-database

Deletes a database.

fauna delete-endpoint

Deletes an endpoint entry from the configuration file.

fauna delete-key

Deletes a database key.

fauna endpoint add

Adds an endpoint to .fauna-shell.

fauna endpoint list

Lists endpoints in .fauna-shell.

fauna endpoint remove

Removes an endpoint from .fauna-shell.

fauna endpoint select

Sets the default endpoint.

fauna environment add

Adds an environment to the .fauna-project file.

fauna environment list

Lists environments available in .fauna-project file.

fauna environment select

Updates the default environment in .fauna-project file.

fauna eval

Runs an FQL query.

fauna help

Displays the Fauna CLI help.

fauna import

Imports JSON files, CSV files, or directories into a collection.

fauna list-databases

Lists child databases.

fauna list-endpoints

Lists connection endpoints.

fauna list-keys

Lists keys in the current database.

fauna project init

Initializes a project directory by creating a .fauna-project file.

fauna run-queries

Runs the queries from a file.

fauna schema abandon

Abandons a staged schema change.

fauna schema commit

Applies a staged schema change to the database.

fauna schema diff

Prints the diff between local, staged, or active schema.

fauna schema pull

Pulls a database’s remote .fsl schema files into a local schema directory.

fauna schema push

Pushes a local directory of .fsl schema files to Fauna. By default, stages a schema change.

fauna schema status

Prints the build status of a staged schema change.

fauna shell

Starts an interactive Fauna session to run queries.

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!