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
Install the Gram CLI with one of the following methods:
-
Using curl:
curl -fsSL https://go.getgram.ai/cli.sh | bash -
Using Homebrew:
brew update brew install speakeasy-api/homebrew-tap/gram
After installation, run the following command to verify that the Gram CLI is installed correctly:
gram --versionThen authenticate yourself with your Gram account:
gram authAuthentication
Use gram auth to bootstrap your account:
gram authThen, inspect your current user information:
gram whoamiThe first time you run gram auth, it creates and saves a Producer
key in your Gram dashboard.
Available commands
Global CLI options
You can provide any Gram CLI command with the following global options.
api-key
Use api-key to provide your Gram API key (which must be scoped as a ‘Provider’):
gram push --api-key MY_API_KEY [command options]When this option is not provided, the CLI falls back to using the following values, in this order:
- The
GRAM_API_KEYenvironment variable - The
secretfield of the current profile in~/.gram/profile.json
project
Use project to provide your target Gram project’s slug:
gram push --project my-project [command options]When this option is not provided, the CLI falls back to using the following values, in this order:
- The
GRAM_PROJECTenvironment variable - The
defaultProjectSlugfield of the current profile in~/.gram/profile.json
log-level
Use log-level to set the base log level (the default is info):
gram [command] --log-level debug [command options]You can also set the base log level via the GRAM_LOG_LEVEL environment variable.
log-pretty
Use log-pretty to toggle pretty logging off. (By default, this option is set to true.)
gram [command] --log-pretty=false [command options]You can also enable and disable pretty logging set via the GRAM_LOG_PRETTY environment variable.
profile
Use profile to provide the profile name to use from ~/.gram/profile.json:
gram [command] --profile production [command options]You can also set the profile name via the GRAM_PROFILE environment variable.
help
Use help to view the help information for any command:
gram [command] --helpShort form: -h
version
Use version to print the version of the Gram CLI.
gram --versionShort form: -v
Last updated on