Skip to main content

Basic Functionality

To get a full list of commands available in Ory CLI, run this command:

ory help

This prints the list of available commands with short descriptions. Additionally, each commands accepts the --help flag. Use it to get more information about the command, available command-specific flags and command modifiers. For example:

ory auth --help

Create an or sign into your Ory Cloud account

Usage:
ory auth [flags]
ory auth [command]

Available Commands:
logout Signs you out of your account on this computer.

Flags:
-c, --config string Path to the Ory Cloud configuration file.
--format string Set the output format. One of table, json, and json-pretty. (default "default")
-h, --help help for auth
-q, --quiet Be quiet with output printing.
-y, --yes Confirm all dialogues with yes.

Use "ory auth [command] --help" for more information about a command.

Create Ory Cloud Account & Project

With Ory CLI, you can create a new Ory Cloud account and project from your terminal.

Follow these steps:

  1. Run this command to start the wizard:

    ory auth
  2. If you haven't signed in with the CLI before, you're asked if you have an Ory Cloud account.

    Do you already have an Ory Console account you wish to use? [y/n]: n

    Answer "no" to create a new account. In the process, you must provide the basic account information: email address, password, user name, and choose if you want to be informed about platform security updates.

  3. As a final step, accept the Terms of Service.

    I accept the Terms of Service https://www.ory.sh/ptos:  [y/n]: y
  4. When the process is completed, the CLI displays the details of the created account and the ID of the currently selected project:

    You are now signed in as: tom@email.com
    ID cae666dg-2ffa-491b-9912-6b090ec10e1c
    EMAIL tom@email.com
    SELECTED_PROJECT 00000000-0000-0000-0000-000000000000
note

By default, no projects are associated with new accounts created through the Ory CLI. To create a new project, use the CLI or the Ory Console.

Create Ory Cloud Project

Run this command to create a new Ory Cloud project:

ory create project

When the operation is successful, the system returns the details of the newly created project:

Project created successfully!
ID 5e2281bd-e094-87b5-9d76-812ce4a9cfb3
SLUG twisty-galois-kz61jdc42q
STATE running
NAME My Amazing Project

Use CLI with Existing Cloud Account

Sign in to use the CLI with your existing Ory Cloud account and project.

  1. Run this command to start the wizard:

    ory auth
  2. If you haven't signed in with the CLI before, you're asked if you have an Ory Cloud account.

    Do you already have an Ory Console account you wish to use? [y/n]: n
  3. Follow the on-screen instructions to sign in to your account.

    info

    If you created your Ory Cloud account with a social sign-in provider, you must adjust the account configuration to use the CLI. Read this section for more information.

  4. Upon successful sign in, the CLI shows the details of the signed-in user and the selected Ory Cloud project:

    You are now signed in as: john.wick@company.com
    ID 7759555-e23a-44b7-b148-7fed7f908024
    EMAIL john.wick@company.com
    SELECTED_PROJECT 00000000-0000-0000-0000-000000000000

Accounts with Social Sign-In

If you created your account through a social sign-in provider such as GitHub or Google, you must adjust your account configuration to use the Ory CLI.

Accounts created with social sign-in providers don't use passwords. To use your account with Ory CLI, your account must have a password.

Follow these steps to create a password for an account created with a social sign-in provider:

  1. Open the Ory Console and sign in.
  2. Go to your account settings.
  3. Enter a new password in the Update Password field.
  4. Click Save to finish.