Getting started

This getting started guide shows you how to:

  1. Create an authentication key that allows you to use fauna-shell to interact with a database.

  2. Define a configuration file endpoint.

  3. Display the configuration file.

  4. Start Fauna Shell.

After starting Fauna Shell, experiment with the available commands to gain familiarity with Fauna Shell.

Create a key

  1. Log in to your Fauna account using your email and password.

  2. Choose the Explorer menu item.

  3. Hover over the database name you want and click the key icon.

  4. Click the CREATE-KEY button.

  5. Choose Admin or Server Role and enter an optional Key Name.

  6. Click the SAVE button.

  7. Copy the KEY’S SECRET, which is needed to configure an endpoint.

    This is the only time Fauna displays the secret field, which is equivalent to a password. Fauna cannot recover a secret that is discarded or lost. Copy and save the secret to a password manager or other safe location.

You can now access and query your database using fauna-shell.

Define a configuration endpoint

Use the cloud-login command to create a default configuration endpoint in the fauna-shell configuration file.

  1. Open a terminal window on your local host.

  2. Run the cloud-login command and enter Return to add a cloud definition to your configuration file.:

    fauna cloud-login
    ? The endpoint alias prefix (to combine with a region): cloud

    The cloud configuration defaults to the endpoint.

  3. At the prompt for an authentication method, enter Return to choose Secret as the authentication method:

    ? How do you prefer to authenticate?
      Email and Password
    ❯ Secret
  4. At the prompt, paste the key that you created in the preceding step and enter Return.

  5. In response to the region prompt, choose a region and enter Return.

     Select a region (Use arrow keys)
    ❯ Classic
      Europe (EU)
      United States (US)
  6. Enter Return to accept the default, Y, and accept cloud as the default endpoint:

    ? Would you like endpoint 'cloud' to be default? (Y/n) Y

Display the configuration file

To view the updated configuration file on Linux, macOS, and Unix-like operating systems, enter:

cat $HOME/.fauna-shell

On a Windows operating system, enter:

type %userprofile%\.fauna-shell

Next steps

Go to the Topics and commands documentation to become familiar with the individual Fauna Shell command syntax.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email

Thank you for your feedback!