Skip to content

fauna/fauna-shell

Repository files navigation

Fauna CLI

The Fauna CLI lets you access Fauna from your terminal. You can use the CLI to:

fauna-cli

Requirements

Node.js v18.x or later.

Installation

Install the Fauna CLI globally using npm:

npm install -g fauna-shell

To upgrade the CLI, run:

npm update -g fauna-shell

Documentation

For usage instructions and a full list of commands, see the Fauna docs.

You can also access help directly in the CLI by running:

# For general help:
fauna --help

# For a specific command:
fauna <COMMAND> --help
# For example:
fauna eval --help

Development

To test changes during development, follow these steps:

  1. Install the required packages:

    yarn install
  2. You can run commands in dev in one of two ways:

    • Option 1: Run against the just-in-time built project with development settings:

      # Run `fauna cloud-login` in dev:
      ./bin/dev cloud-login
      
      # Run `fauna eval` in dev:
      ./bin/dev eval
    • Option 2: Run against built assets. Use yarn link to place them in your $PATH as if globally installed:

      # Build the package and place it in your $PATH:
      yarn build && yarn link
      # Run CLI commands using `fauna ...`:
      fauna eval