Lists the keys that exist in the current database.

fauna list-keys


The list-keys command lists the keys that you have created in the current database, which can include keys for the current database or its child databases.

If you don’t pass any options at the command line, Fauna uses the default options specified in the fauna-shell configuration file.

Option Description


Optional - The Fauna server domain, that is, the hostname where Fauna is running. Defaults to
Since the introduction of Region Groups, three cloud domains are available. You do not need to specify a domain, but connections work as expected if you do.
Classic (US and EU):
United States (US):
Europe (EU):


Optional - The name of the endpoint to use for the command.


Optional - The connection port. Defaults to 8443.


Optional - The connection scheme. Must be one of https or http. Defaults to https.


Optional - The secret to use. A secret authenticates your connection to Fauna, and connects you to a specific database.


Optional - The connection timeout, an integer number of milliseconds. When the specified period has elapsed, fauna-shell stops waiting for a response and displays an error.

The default is zero, which means that fauna-shell waits until a response is received.






For the purpose of this example, let’s assume that you have previously created some keys. We can display that list with fauna list-keys:

fauna list-keys
listing keys
Key ID               Database             Role
259718958404338186   app1                 server
259719743570706945   app1                 client
265528117038154259   my-test-db           admin
265437820880945683   my_test_db           admin

You can verify the existence of these keys from the shell:

fauna shell
Connected to
Type Ctrl+D or .exit to exit the shell
  data: [
    Ref(Keys(), "259718958404338186"),
    Ref(Keys(), "259719743570706945"),
    Ref(Keys(), "265437820880945683"),
    Ref(Keys(), "265528117038154259")

The numeric identifiers in each key’s Reference matches up with the Key ID column in the list-keys output.

Is this article helpful? 

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

Thank you for your feedback!