Sage Gate — Precision config gates for CLI tools
v2.4 — gate engine rewrite

Config gates that fail loud, not silent.

Sage Gate validates environment variables, secrets, and runtime config at process start. One 1.2MB binary, zero runtime deps, 14ms cold start. If something is missing, your CLI tells you exactly what and where — before it breaks production.

Single binary Zero deps 14ms startup
sage-gate
Gates
Runtime
Secrets
Schema
Trace
Settings
sage-gate — check — zsh
$ sage-gate check --env production → loading gates from ./sage-gate.yml → resolving 12 gates across 3 namespaces ✓ DATABASE_URL required:string pass ✓ REDIS_URL required:string pass ✓ JWT_SECRET required:min32 pass ✗ STRIPE_SECRET_KEY required:string FAIL └─ gate.stripe.secret_key: env STRIPE_SECRET_KEY is unset expected: string matching ^sk_live_ hint: check .env.production or run `sage-gate init` ⚠ SENTRY_DSN optional:string skip 11 passed · 1 failed · 1 skipped · 14ms
14ms
Cold start
1.2MB
Binary size
0
Runtime deps
38k
Weekly installs
Capabilities

Every gate runs before your code does.

Sage Gate sits between your shell and your application. It reads a YAML schema, resolves every variable from your environment, vault, or .env files, and halts execution with a precise error if anything is wrong.

Schema-driven validation

Declare types, ranges, regex patterns, and required fields in one YAML file. The gate engine parses it in under 4ms and produces a typed report.

gates: - key: PORT type: int range: 1-65535 - key: NODE_ENV enum: prod,dev - key: API_KEY regex: ^sk_

Secret redaction

Values marked as secret are never logged, traced, or echoed. The gate engine masks them in output and strips them from error reports automatically.

JWT_SECRET = ******** [redacted · 64 chars · sha256 verified] STRIPE_KEY = ******** [redacted · masked from trace output]

Resolution chain

Variables resolve from .env files, OS environment, HashiCorp Vault, and AWS SSM in a deterministic order. Every source is logged in the trace output.

DATABASE_URL ① .env.production miss ② os.environ miss ③ vault://prod/db ✓ hit

Exit codes that pipe

Non-zero exit on any failed gate. Structured JSON output via --format json for CI integration. Works with make, just, npm scripts, and shell pipes.

$ sage-gate check && node server.js 12 gates evaluated exit code: 1 → pipeline halted, server.js not started
Configuration

One file. Every gate.

The entire schema lives in a single YAML file at your project root. Commit it, diff it, review it — your config gates are now version-controlled infrastructure.

  • Namespacing for multi-service repos
  • Type coercion: int, bool, string, enum, regex
  • Conditional gates with when: expressions
  • Custom error messages and remediation hints
  • Import shared schemas across projects
sage-gate.yml
# sage-gate.yml — production config gates
version: 2
namespace: api-server

gates:
  - key: DATABASE_URL
    type: string
    required: true
    regex: ^postgres://
    hint: "Set in vault://prod/db"

  - key: PORT
    type: int
    range: [1, 65535]
    default: 3000

  - key: JWT_SECRET
    type: string
    min_length: 32
    secret: true

  - key: SENTRY_DSN
    type: string
    required: false
    when: NODE_ENV == "production"

resolution:
  order: [env, dotenv, vault, ssm]
  timeout_ms: 5000
Pricing

Pay for the gates you need.

The CLI is free forever for single projects. Team and enterprise tiers add shared schemas, audit trails, and priority resolution backends.

Starter
$0/mo

Single project, local .env resolution, community support.

  • 1 project, 1 schema file
  • Local env + .env resolution
  • CLI output (text + JSON)
  • Community Discord support
Download binary
Enterprise
$99/mo

SSO, on-prem resolution backend, SLA, custom gate types.

  • Everything in Pro
  • SAML SSO + RBAC
  • On-prem resolution server
  • Custom gate type SDK
  • 99.9% uptime SLA
Contact sales
We replaced 200 lines of bash env-checks with a 40-line sage-gate.yml. The gate engine caught a missing STRIPE_SECRET_KEY in staging that would have shipped to production on a Friday. That alone paid for the license.
Mara Okafor
Staff SRE · Ledgerly

Gate your config in 90 seconds.

Write a schema, run the check, ship with confidence. No signup required for the Starter tier — just download the binary.

macOS · Linux · Windows · 1.2MB static binary · MIT licensed
≡ hart

Hosted on hart

intrane-landings/174-sage-gatepublic
🏠 hart home🔎 Explore public👤 More from intrane-landings