The Seed CLI allows you to decide when you want a deployment to be triggered in Seed. You could for example:
- Trigger a deployment to your serverless apps after you run your own CI/CD process.
- Or you can programmatically trigger a deployment anywhere in your workflow.
The Seed CLI allows you to better integrate Seed into your organization’s workflow.
Let’s look at how the Seed CLI works.
The Seed CLI is available as an npm package.
You can install it by running:
$ npm install -g @seed-run/cli
You simply need to pass in the:
- Org name
- App name
- Stage name
- Git commit SHA
- And a Seed CLI token as an environment variable
For example, to deploy a specific commit to the
dev stage of the
backend-api app in the
$ SEED_TOKEN=$ACME_ORG_TOKEN seed deploy \ --org acme \ --app backend-api \ --stage dev \ --commit 700b9c2
$ACME_ORG_TOKEN is the Seed CLI token for the
Note that the commit doesn’t need to be associated with any specific branch. You can deploy any commit that’s available in Git.
You can generate a token for your org from your org settings.
Make sure to secure access to this token as it allows the Seed CLI to trigger deployments to your organization.
You can also optionally remove the token and generate a new one if necessary.
Note that, you can only create a single token per organization.