Skip to main content

Log in to Layer

In order to work on a Layer project, you must first log in to Layer. You can log in using a web browser, a CLI command, or a script that calls the SDK. For more information about CLI commands, refer to Layer CLI commands.

The first time you log in, you will be asked to create a Layer account based on your Google account.

note

Layer authenticates with Google SSO. You must have a Google account in order to have a Layer account.

Log in to Layer with a web browser#

You can log in to Layer from a web browser. This does not require the Layer SDK to be installed.

  1. In a Chrome or Safari web browser, navigate to layer.co.

  2. Click Login.

  3. If prompted, enter your Google account information.

    Layer logs you in to your account with the web browser.

Log in to Layer with the CLI#

If you have installed Layer SDK on your local machine, then you can run a command to log in to Layer with both a web browser and your local terminal.

  1. Enter the following command in your terminal:

    layer login

    In your default web browser, Layer opens the remote Layer login page.

  2. Log in with the Google account that is associated with your Layer account.

    Layer logs you in with both the web browser and the terminal running the Layer SDK.

Log in to Layer with the CLI (headless)#

If you have installed Layer SDK on your local machine, then you can run a command to log in to Layer with your local terminal.

  1. Enter the following command in your terminal:

    layer login-headless
  2. Copy the link Layer provides and paste it into your web browser.

    Layer opens a tab in your default web browser and displays a code.

  3. Copy the code, paste it where prompted in the terminal, and then press Enter or Return.

    Layer logs you in to your account with the terminal running the Layer SDK.

Log in with the SDK and a script#

If you use Jupyter Notebook or a similar tool, then you can use the SDK to log in to Layer.

import layerlayer.login()

The first time you log in with this method:

  1. Copy the link Layer provides and paste it into your web browser.
  2. Log in using your Google account.
  3. Copy the code, paste it where prompted in the notebook, and then press Enter or Return.

Layer reuses your credentials on subsequent logins.