Skip to content

Conversation

cjea
Copy link
Collaborator

@cjea cjea commented Oct 6, 2025

Support for uploading gram functions.

Upload

env GRAM_API_KEY="$(gram-api-key-dev )" go run . upload \
  --api-url https://dev.getgram.ai \
  --project test-2 \
  --type function \
  --location ~/Downloads/example.zip \
  --name "Example function" \
  --slug example-function \
  --runtime nodejs:22

Push

$ env GRAM_API_KEY="$(gram-api-key-prod )” \
  go run . push --config ~/code/speakeasy/gram_demo/fixtures/gram.json --project cj-2

INFO <app/push.go:97> Deploying to project project=cj-2 config=/Users/babe/code/speakeasy/gram_demo/fixtures/gram.json
INFO <deploy/workflow.go:99> uploading assets
INFO <deploy/workflow.go:196> creating deployment
INFO <deploy/workflow.go:209> created new deployment deployment_id=0199bc03-a9ee-7cfc-b89a-a304cd29289b
INFO <deploy/workflow.go:287> Polling deployment status... deployment_id=0199bc03-a9ee-7cfc-b89a-a304cd29289b
INFO <app/push.go:141> Deployment succeeded deployment_id=0199bc03-a9ee-7cfc-b89a-a304cd29289b

$ jq <  ~/code/speakeasy/gram_demo/fixtures/gram.json

{
  "schema_version": "1.0.0",
  "type": "deployment",
  "sources": [
    {
      "type": "openapiv3",
      "location": "./petstore.yaml",
      "name": "CJ's Petstore (remote)",
      "slug": "cjs-petstore"
    },
    {
      "type": "openapiv3",
      "location": "./symphony.json",
      "name": "Night at the Symphony",
      "slug": "symphony"
    },
    {
      "type": "function",
      "location": “/code/Downloads/example.zip",
      "name": "Example functions",
      "slug": "example-function",
      "runtime": "nodejs:22"
    }
  ]
}


Copy link

changeset-bot bot commented Oct 6, 2025

🦋 Changeset detected

Latest commit: b7599c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@gram/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
gram Ready Ready Preview Comment Oct 10, 2025 4:31pm
gram-docs Ready Ready Preview Comment Oct 10, 2025 4:31pm
gram-landing-redirect Ready Ready Preview Comment Oct 10, 2025 4:31pm

@cjea cjea merged commit fde5a08 into main Oct 10, 2025
17 checks passed
@cjea cjea deleted the feat/gram-cli-upload-function branch October 10, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants