@sprigr/cli
v0.1.3
Published
Sprigr Team CLI — deploy static sites and Next.js apps to Sprigr Tenant Hosting from your terminal.
Downloads
924
Maintainers
Readme
@sprigr/cli
Sprigr Team CLI — deploy static sites and Next.js apps to Sprigr Tenant Hosting from your terminal.
Install
npm install -g @sprigr/cli
# or run without installing
npx @sprigr/cli --helpRequires Node.js 20+.
Quick start
# 1. Get an API key from https://team.sprigr.com → Settings → API keys
export SPRIGR_API_KEY=sk_...
# 2. Deploy a static site
sprigr deploy my-site --dir ./public
# 3. Or deploy a Next.js app (built with @opennextjs/cloudflare)
sprigr deploy my-app --dir ./.open-next --framework nextCommands
sprigr deploy <siteId> --dir <dir>
Bundle a directory and deploy it as a new build for the given website.
| Flag | Description | Default |
| --- | --- | --- |
| --dir <path> | Directory to bundle | required |
| --framework <static\|next\|astro\|remix> | Framework hint | static |
| --endpoint <url> | API endpoint override | https://api.team.sprigr.com |
| --api-key <key> | API key (overrides env) | from SPRIGR_API_KEY |
The CLI streams progress and prints the build id. Use sprigr builds get to follow status, or watch the portal's Builds panel.
sprigr builds list <siteId>
List recent builds for a site.
| Flag | Description | Default |
| --- | --- | --- |
| --limit <N> | Number of rows | 20 |
sprigr builds get <siteId> <buildId>
Fetch a single build's status, including logs once available.
Environment variables
| Variable | Purpose |
| --- | --- |
| SPRIGR_API_KEY | Authentication. Create one in the portal. |
| SPRIGR_ENDPOINT | API endpoint. Accepts a full URL, or the shortcuts staging / prod. |
How deploys work
- The CLI tarballs your
--dir(gzip). - It POSTs to the Sprigr Team provisioning worker, which enqueues a build job.
- The build farm container picks it up, runs the framework adapter (no-op for
static,@opennextjs/cloudflare buildfornext), and streams output back. - On success the bundle is uploaded to Workers for Platforms for SSR sites or to R2 + website-serve for static, then the site's production deployment pointer flips atomically.
Static sites are billed by request count; SSR sites are billed by request count + container-seconds during the build. Plan limits (max sites, retention, custom domains) are enforced at deploy time.
Roadmap
- PKCE login (
sprigr login) so you don't need to copy an API key from the portal. - Binary file support in the bundler (currently text + UTF-8 only).
sprigr logs <buildId> --followfor live tailing.
Links
- Sprigr — https://sprigr.com
- Issues — https://github.com/greben99/sprigr-team/issues
License
MIT
