Speakeasy Logo
Skip to Content
Gram DocumentationCommand Linegram push

gram push

The push command deploys the staged sources in your deployment configuration to your Gram project.

For more information on staging sources, see the gram stage reference.

Usage

gram push --api-key YOUR_API_KEY --project my-project --config gram.json

Deployment File

The deployment file contains the configuration for all sources that will be pushed to Gram. Below is a sample deployment file:

gram.json
{ "schema_version": "1.0.0", "type": "deployment", "sources": [ { "type": "openapiv3", "location": "/path/to/spec.yaml", "name": "My API", "slug": "my-api" } ] }

Options

config

Path to the deployment file. If not specified, defaults to gram.json in the current working directory.

gram push --config ./path/to/deployment.json [command options]

method

Deployment method for handling existing artifacts. (default: “merge”)

  • merge - The deployment merges with any existing deployment artifacts in the Gram project.
  • replace - The deployment replaces any existing deployment artifacts in the Gram project.
gram push --method replace [command options]

idempotency-key

A unique key to identify this deployment request for idempotency. This ensures that the same deployment is not applied multiple times if the command is run again with the same key.

gram push --idempotency-key unique-deployment-id [command options]

skip-poll

Skip polling for deployment completion and return immediately. (default: false)

gram push --skip-poll [command options]

Last updated on