Skip to main content

SDK Variables

VariableRequiredPurpose
ENACT_SECRETYes (or pass secret= to EnactClient)HMAC signing key. Minimum 32 characters.
GITHUB_TOKENFor GitHubConnectorGitHub Personal Access Token or App token
SLACK_BOT_TOKENFor SlackConnectorSlack bot token (xoxb-...). Needs chat:write scope. Add chat:delete to enable rollback.
ENACT_FREEZEOptionalSet to 1 to activate the code_freeze_active policy
CLOUD_API_KEYFor cloud featuresAPI key from enact.cloud — enables receipt push and HITL

Cloud Backend Variables

VariableRequiredPurpose
CLOUD_SECRETYesServer-side signing secret for HITL tokens and receipts
ENACT_DB_PATHOptionalPath to the SQLite database file. Defaults to enact.db. Read fresh on every connection call (enables test isolation).
ENACT_EMAIL_DRY_RUNOptionalSet to 1 to skip real email sends in dev/test. Prints the approval link to stdout instead.

Generating a Secure Secret

export ENACT_SECRET="$(openssl rand -hex 32)"
Or in Python:
import secrets
print(secrets.token_hex(32))
Minimum 32 characters. No default — EnactClient will raise if missing. For dev/testing only:
EnactClient(..., secret="short", allow_insecure_secret=True)