fauna-shell reference

fauna-shell is a command line tool that provides several capabilities:

  • An interactive query command line that allows you to manually execute FQL queries.

  • Create, delete, and list databases, endpoints, and keys.

  • Manage endpoints, which are shorthand for connection configurations.

  • Login to your account to acquire a secret (allows you to authenticate and connect to your Fauna database).

  • Evaluate stored FQL queries.

  • Import a GraphQL schema into a database.

  • Provides instruction for adding autocomplete to your terminal sessions.

The interactive query interface can help you explore the capabilities of Fauna and learn FQL.

This section explains how to install fauna-shell and provides a reference for everything that fauna-shell can do. See Configuration for details on configuring fauna-shell.

For more information, see our Introducing Fauna Shell blog post.

Requirements

  • Node.js, version 14.x or newer.

Installation

To install fauna-shell, issue the following command:

npm i -g fauna-shell

Command reference

Information
add-endpoint

Adds a connection endpoint for Fauna.

autocomplete

Displays autocomplete installation instructions.

cloud-login

Adds the Fauna endpoint to the configuration.

create-database

Creates a child database in the current database.

create-key

Creates a key for the specified database.

default-endpoint

Sets an endpoint as the default.

delete-database

Deletes a child database from the current database.

delete-endpoint

Deletes a connection endpoint for Fauna.

delete-key

Deletes a key.

eval

Runs the specified query.

help

Displays help for fauna command.

import

Import JSON or CSV data into your database.

list-databases

Lists child databases in current database.

list-endpoints

Lists Fauna connection endpoints.

list-keys

Lists keys for the current database or its child databases.

shell

Starts an interactive shell to run Fauna queries.

upload-graphql-schema

Uploads a GraphQL schema file to the GraphQL API.

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!