Technical Reference · gram upload
gram upload
Upload a single asset and deploy it in one step, without a deployment file.
The upload command uploads one asset — an OpenAPI document or a functions
bundle — and deploys it in a single step. Where gram stage and gram push work from a
gram.deploy.json file describing several sources, upload takes the asset’s
details as flags, so it needs no configuration file.
If the project already has a deployment, the uploaded asset evolves it (the previous deployment is cloned with the new asset added). If the project has no deployment yet, a new one is created.
The gram upload command requires an API key, an organization slug, and a
project slug. After running gram auth, these values come from the local
profile. For more information on these values, see the global CLI
options.
gram upload --type openapiv3 \ --location https://raw.githubusercontent.com/my/spec.yaml \ --name "My API" \ --slug my-apiOptions
Section titled “Options”type (required)
Section titled “type (required)”The type of asset to upload: openapiv3 or functions.
location (required)
Section titled “location (required)”The location of the asset, as a local file path or a URL.
name (required)
Section titled “name (required)”The human-readable name of the asset.
slug (required)
Section titled “slug (required)”The URL-friendly slug for the asset. Names and slugs must be unique across all sources in the target project.
runtime
Section titled “runtime”The runtime to use for function execution. Required when the type is
functions.
gram upload --type functions --runtime nodejs:22 [command options]The number of instances to run for a function.
memory-mib
Section titled “memory-mib”The amount of memory, in MiB, to allocate for the function.