Skip to content

Command reference

WebKit provides a comprehensive CLI for managing your project lifecycle. This page documents all available commands.

Global options

These options are available for all commands:

FlagDescription
--help, -hShow help for any command
--version, -vShow WebKit version

Commands

webkit update

Regenerate all project files from your app.json manifest.

bash
webkit update

This is the primary command you'll use. It:

  • Reads your app.json manifest
  • Generates GitHub Actions workflows
  • Creates Docker configuration
  • Updates project files (package.json, turbo.json, etc.)
  • Tracks all generated files in .webkit/manifest.json
  • Cleans up orphaned files

webkit validate

Validate your app.json manifest without generating files.

bash
webkit validate

Checks for:

  • Required fields
  • Valid values and types
  • Resource references
  • Domain configuration

webkit drift

Detect manual modifications to generated files.

bash
webkit drift

Compares current file contents against stored hashes to identify changes made outside of WebKit.

webkit scaffold

Generate individual components without running a full update.

bash
webkit scaffold <component>

Available components vary based on your configuration.

webkit version

Display the installed WebKit version.

bash
webkit version

Subcommand groups

webkit infra

Infrastructure management commands using Terraform.

CommandDescription
webkit infra planPreview infrastructure changes
webkit infra applyApply infrastructure changes
webkit infra destroyDestroy all infrastructure
webkit infra outputDisplay Terraform outputs
webkit infra importImport existing resources
webkit infra exec -- <cmd>Run arbitrary Terraform commands

See Infrastructure overview for detailed documentation.

webkit secrets

SOPS-encrypted secrets management.

CommandDescription
webkit secrets scaffoldCreate secret file templates
webkit secrets syncSync secrets with SOPS files
webkit secrets encryptEncrypt a secrets file
webkit secrets decryptDecrypt a secrets file
webkit secrets get <key>Get a specific secret value
webkit secrets validateValidate secrets configuration

webkit env

Environment variable management.

CommandDescription
webkit env scaffoldCreate .env.example files
webkit env syncSync environment variables
webkit env generateGenerate .env files for an environment

webkit cicd

CI/CD workflow generation.

CommandDescription
webkit cicd actionsCopy reusable GitHub Actions
webkit cicd backupGenerate backup workflow
webkit cicd prGenerate PR workflow
webkit cicd releaseGenerate release workflow

webkit docs

Documentation generation.

CommandDescription
webkit docs agentsGenerate AGENTS.md
webkit docs readmeGenerate README.md

webkit payload

Payload CMS management.

CommandDescription
webkit payload bumpUpdate Payload CMS dependencies
webkit payload bump --dry-runPreview updates without applying

Examples

Initial project setup

bash
# Create your manifest
vim app.json

# Generate all project files
webkit update

# Validate configuration
webkit validate

Deploy infrastructure

bash
# Preview changes
webkit infra plan

# Apply changes
webkit infra apply

# View outputs
webkit infra output

Manage secrets

bash
# Create secret templates
webkit secrets scaffold

# Encrypt secrets for production
webkit secrets encrypt production

# Get a specific secret
webkit secrets get PAYLOAD_SECRET --env production

Update environment files

bash
# Generate .env for local development
webkit env generate dev

# Sync all environments
webkit env sync

Exit codes

CodeMeaning
0Success
1General error
2Configuration error
3Validation error

Further reading

Released under the MIT Licence.