https://github.com/heyitsgilbert/gatekeeper
Helps implement feature flags in your PowerShell projects.
https://github.com/heyitsgilbert/gatekeeper
feature-flag feature-flags feature-flags-management powershell powershell-module
Last synced: 22 days ago
JSON representation
Helps implement feature flags in your PowerShell projects.
- Host: GitHub
- URL: https://github.com/heyitsgilbert/gatekeeper
- Owner: HeyItsGilbert
- License: mit
- Created: 2025-06-14T22:00:20.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-11-18T04:30:21.000Z (7 months ago)
- Last Synced: 2025-11-18T06:19:35.677Z (7 months ago)
- Topics: feature-flag, feature-flags, feature-flags-management, powershell, powershell-module
- Language: PowerShell
- Homepage: https://heyitsgilbert.github.io/Gatekeeper/
- Size: 1.64 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# Gatekeeper
Feature flags for PowerShell projects.
[](https://www.powershellgallery.com/packages/Gatekeeper/)
[](https://www.powershellgallery.com/packages/Gatekeeper/)
[](https://github.com/HeyItsGilbert/Gatekeeper/actions/workflows/Publish.yaml)
[](https://www.powershellgallery.com/packages/Gatekeeper/)
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.
**[Read the full documentation](https://heyitsgilbert.github.io/Gatekeeper)**
## Install
```powershell
Install-Module Gatekeeper
```
Works on Windows, Linux, and macOS with PowerShell 5.1+.
## Quick example
```powershell
# 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
```
## Why Gatekeeper?
- **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 `$false` unless an explicit Allow rule matches
- **No external runtime dependencies** -- just PowerShell and a JSON file
- **Cross-platform** -- Windows, Linux, macOS
## Documentation
| Topic | Description |
|-------|-------------|
| [Getting Started](https://heyitsgilbert.github.io/Gatekeeper/getting-started/) | Install and evaluate your first flag |
| [Concepts](https://heyitsgilbert.github.io/Gatekeeper/concepts/) | Data model, terminology, and how evaluation works |
| [Creating Flags](https://heyitsgilbert.github.io/Gatekeeper/guides/creating-flags/) | Build properties, conditions, rules, and flags |
| [Configuration](https://heyitsgilbert.github.io/Gatekeeper/guides/configuration/) | Multi-level configuration system |
| [Logging](https://heyitsgilbert.github.io/Gatekeeper/guides/logging/) | Audit and warning script setup |
| [Command Reference](https://heyitsgilbert.github.io/Gatekeeper/en-US/) | All exported cmdlets |
## Contributing
See the [CHANGELOG](CHANGELOG.md) for version history.