Skip to main content

Usage

dokrypt ci <subcommand> [flags]

Subcommands

SubcommandDescription
generateGenerate CI/CD workflow files
validateValidate existing CI workflow

generate

Generate a CI/CD pipeline configuration file for your project.
dokrypt ci generate [flags]

Flags

FlagTypeDefaultDescription
--providerstringgithubCI provider: github, gitlab
--outputstring.Output directory for generated files
--deployboolfalseInclude testnet deployment step

Supported Providers

ProviderFlag ValueGenerated File
GitHub Actionsgithub.github/workflows/dokrypt.yml
GitLab CIgitlab.gitlab-ci.yml

Examples

GitHub Actions (default)

dokrypt ci generate
Generates .github/workflows/dokrypt.yml with test job.

GitHub Actions with deploy

dokrypt ci generate --deploy
Adds a deploy-testnet job that runs after tests pass on the main branch.

GitLab CI

dokrypt ci generate --provider gitlab
Generates .gitlab-ci.yml with Docker-in-Docker service.

Custom output directory

dokrypt ci generate --output ./ci-config

Generated Pipeline Steps

Every generated workflow includes:
  1. Install Dokrypt via npm
  2. Run dokrypt doctor to verify prerequisites
  3. Start environment with dokrypt up --detach --fresh
  4. Wait for services with dokrypt status --wait --timeout 60s
  5. Run tests with dokrypt test run --json
  6. Upload results as build artifact
  7. Clean up with dokrypt down --volumes (runs even on failure)

Config Integration

If your project has a dokrypt.yaml with test settings, the generated workflow respects them:
# dokrypt.yaml
tests:
  gas_report: true
  coverage: true
The generated workflow will include --gas-report --coverage flags automatically.

validate

Check that an existing CI workflow file contains the required Dokrypt steps.
dokrypt ci validate

What It Checks

CheckLooks For
Code checkoutactions/checkout
Environment startupdokrypt up
Test executiondokrypt test
Environment cleanupdokrypt down

Example Output

✓ Found GitHub Actions workflow: .github/workflows/dokrypt.yml
✓ Environment startup
✓ Test execution
✓ Environment cleanup
✓ Code checkout
✓ Workflow is valid