Feature flags for PowerShell projects.
Gatekeeper lets you control feature rollouts using JSON-based feature flags with a rule engine. Define properties, write rules, and evaluate them against device context -- all in PowerShell.
Install-Module GatekeeperWorks on Windows, Linux, and macOS with PowerShell 5.1+.
# Define what properties matter to your org
$props = New-PropertySet -Name 'MyProps' -Properties @(
(New-Property -Name 'Environment' -Type string -EnumValues @('Production', 'Staging', 'Dev'))
(New-Property -Name 'IsCompliant' -Type boolean)
)
# Create a rule: allow only compliant staging devices
$conditions = New-ConditionGroup -Operator AllOf -Conditions @(
(New-Condition -Property 'Environment' -Operator Equals -Value 'Staging')
(New-Condition -Property 'IsCompliant' -Operator Equals -Value 'true')
)
$rule = New-Rule -Name 'Compliant Staging' -Effect Allow -Conditions $conditions
# Create the flag (deny by default)
$flag = New-FeatureFlag -Name 'NewDashboard' -DefaultEffect Deny -Rules $rule
# Evaluate against a device's context
$context = @{ Environment = 'Staging'; IsCompliant = $true }
Test-FeatureFlag -FeatureFlag $flag -PropertySet $props -Context $context
# Returns: True- JSON-native -- flags are JSON files validated by JSON Schema
- Pluggable context -- you define properties and context; Gatekeeper doesn't assume your environment
- Safe by default -- returns
$falseunless an explicit Allow rule matches - No external runtime dependencies -- just PowerShell and a JSON file
- Cross-platform -- Windows, Linux, macOS
| Topic | Description |
|---|---|
| Getting Started | Install and evaluate your first flag |
| Concepts | Data model, terminology, and how evaluation works |
| Creating Flags | Build properties, conditions, rules, and flags |
| Configuration | Multi-level configuration system |
| Logging | Audit and warning script setup |
| Command Reference | All exported cmdlets |
See the CHANGELOG for version history.