Speakeasy Logo
Skip to Content
Gram DocumentationCommand Linegram auth

gram auth

The auth command authenticates with the Gram platform by opening a browser window for login. After successful authentication, it creates and saves a Producer API key to the local profile configuration.

Usage

Authenticate with Gram:

gram auth

This command will:

  1. Open a browser window to the Gram authentication page
  2. Prompt for login credentials
  3. Create a Producer API key in the Gram dashboard
  4. Saves the API key and profile information locally
  5. Saves the current project in the browser as your default project

After authentication, verify the setup with gram whoami.

Subcommands

Change your default project context:

gram auth switch --project {project-slug}

Completely clear auth information in your local profile so you can gram auth fresh:

gram auth clear

Options

api-url

The URL of the Gram web application. This option is useful for connecting to custom or self-hosted Gram instances.

gram auth --api-url https://custom.gram.instance [other options]

Can also be set via the GRAM_API_URL environment variable.

Last updated on