The Krypt CLI works the same in CI as it does on your laptop. Generate an API key, store it as a CI secret, and useDocumentation Index
Fetch the complete documentation index at: https://docs.krypthq.com/llms.txt
Use this file to discover all available pages before exploring further.
krypt pull or krypt run in your pipeline to inject secrets without committing .env files.
Generate a CI-specific API key
Create a separate API key for each CI environment. This lets you revoke a single key without disrupting other pipelines.Open the API keys page
Generate a new key
Click Generate Key and name it descriptively — e.g. “github-actions-staging”, “gitlab-production”, “vercel-preview”.
GitHub Actions
- Pull secrets to .env
- Inject directly (no .env file)
Write secrets to
.env before your build step:Store
KRYPT_API_KEY as a GitHub Actions secret: Repository → Settings → Secrets and variables → Actions → New repository secret.GitLab CI
Same pattern in.gitlab-ci.yml:
KRYPT_API_KEY in GitLab: Settings → CI/CD → Variables. Mark it as masked and protected for production branches.
Vercel deployments
Vercel doesn’t run arbitrary CI steps during its build process. Two options: Option 1 — Build command override In yourvercel.json or project settings, set the build command to install Krypt and pull secrets before building:
KRYPT_API_KEY as an environment variable in your Vercel project settings.
Option 2 — Separate CI job
Use GitHub Actions (or another CI) to pull secrets and deploy to Vercel:
For most Vercel projects, adding env vars directly in the Vercel dashboard is simpler. Use Krypt’s CI integration when you manage many environments or want centralized secrets across multiple platforms.
Other CI providers
The same pattern works everywhere: install the CLI, login with a stored API key, pull or run.| Provider | Secret storage | Install step |
|---|---|---|
| CircleCI | Project Settings → Environment Variables | run: npm install -g @kryptorg/cli |
| Jenkins | Credentials → Secret text | sh 'npm install -g @kryptorg/cli' |
| Bitbucket Pipelines | Repository settings → Pipelines → Variables | - npm install -g @kryptorg/cli |
Security best practices
Troubleshooting
”Not authenticated” in CI
Cause: TheKRYPT_API_KEY secret is not set, misspelled, or not accessible to the job.
Fix: Verify the secret name in your CI settings matches what’s in your YAML exactly. In GitHub Actions, check that the secret is available to the repository (not just the organization level). In GitLab, check variable scope and protected branch settings.
Secrets pulled but missing in next step
Cause: Each CI step runs in a fresh shell. Environment variables exported in one step don’t carry to the next. Fix: Either usekrypt run to wrap the command that needs secrets, or use krypt pull to write a .env file that your application loads at startup (via dotenv or your framework’s env loading).
Rate limiting in CI
Cause: High-frequency CI runs hitting Krypt’s rate limit (600 requests per 15 minutes per API key). Fix: Cache the pulled.env file between steps so you only call krypt pull once per job. If you need higher limits, contact support@krypthq.com.
