Speakeasy Logo
Skip to Content
Gram DocumentationCommand Line

Gram CLI Overview

Overview

The Gram CLI is a powerful tool that allows you to manage and deploy your MCP servers directly from your terminal. With the CLI, you can create new projects, configure toolsets, deploy servers, and monitor their performance with ease.

Installation

Using curl:

curl -fsSL https://go.getgram.ai/cli.sh | bash

Using Homebrew:

brew update brew install speakeasy-api/homebrew-tap/gram

After installation, verify that the Gram CLI is installed correctly by running:

gram --version

Then authenticate with your Gram account:

gram auth

Authentication

Use gram auth to bootstrap your account:

gram auth

Then, inspect your current user information:

gram whoami

The first time you run gram auth, it will create and save a Producer key in your Gram dashboard.

Available Commands

Global CLI Options

Global options can be provided to any Gram CLI command.

api-key

Your Gram API key (must be scoped as a ‘Provider’).

gram push --api-key MY_API_KEY [command options]

When this option is not provided, the CLI will fallback to using the following values, in this order:

  • The GRAM_API_KEY environment variable.
  • The secret field of the current profile in ~/.gram/profile.json.

project

The slug of the target Gram project.

gram push --project my-project [command options]

When this option is not provided, the CLI will fallback to using the following values, in this order:

  • The GRAM_PROJECT environment variable.
  • The defaultProjectSlug field of the current profile in ~/.gram/profile.json.

log-level

Set the base log level. (default: “info”)

gram [command] --log-level debug [command options]

Can also be set via the GRAM_LOG_LEVEL environment variable.

log-pretty

Toggle pretty logging. (default: true)

gram [command] --log-pretty=false [command options]

Can also be set via the GRAM_LOG_PRETTY environment variable.

profile

Profile name to use from ~/.gram/profile.json.

gram [command] --profile production [command options]

Can also be set via the GRAM_PROFILE environment variable.

help

Show help information for any command.

gram [command] --help

Short form: -h

version

Print the version of the Gram CLI.

gram --version

Short form: -v

Last updated on