Fotbiler.RuleGate.Cli 1.0.0

dotnet tool install --global Fotbiler.RuleGate.Cli --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Fotbiler.RuleGate.Cli --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Fotbiler.RuleGate.Cli&version=1.0.0
                    
nuke :add-package Fotbiler.RuleGate.Cli --version 1.0.0
                    

RuleGate CLI

Fotbiler.RuleGate.Cli is the RuleGate command-line tool for deterministic manifest validation and linting, policy testing, redacted decision explanations, C# constant generation, stale-output checks, and CI automation.

Install

dotnet tool install \
  --global \
  Fotbiler.RuleGate.Cli \
  --version 1.0.0

The installed command is rulegate.

Supported runtimes

  • .NET 8
  • .NET 9
  • .NET 10

Validate manifests

rulegate validate
rulegate validate ./policies/rulegate.yaml
rulegate validate --format json

Test policy behavior

rulegate test
rulegate test ./policies/authorization.tests.yaml
rulegate test ./policies/authorization.tests.yaml --filter organization
rulegate test ./policies/authorization.tests.yaml --format json

Fixtures evaluate explicit authorization requests against a compiled manifest without starting the host application. They support allow, deny, indeterminate, and exact failure-code expectations with fixed evaluation times.

Explain and lint

rulegate explain \
  ./policies/authorization.tests.yaml \
  --test organization-mismatch

rulegate lint ./policies/rulegate.yaml
rulegate lint ./policies/rulegate.yaml --format json

Explanation uses the runtime evaluator pipeline but omits subject/resource identities and every request or literal value. Lint reports deterministic structural findings and returns 1 when any finding exists.

Validated manifests can be activated at runtime through RuleGate policy sources. See the policy-source guide for atomic reload behavior.

Validation covers the complete manifest requirement model, including typed attributes, attribute comparisons, explicit-time-zone schedules, bounded date-time rules, authentication age, and canonical context policies.

Generate C# constants

rulegate generate csharp \
  ./rulegate.yaml \
  --namespace Sample.Authorization

Write deterministic UTF-8 source to a file:

rulegate generate csharp \
  ./rulegate.yaml \
  --namespace Sample.Authorization \
  --output Generated/RuleGate.g.cs

The generated file contains:

  • RuleGatePolicies
  • RuleGateResourceTypes
  • RuleGateActions

Detect stale output

rulegate generate csharp \
  ./rulegate.yaml \
  --namespace Sample.Authorization \
  --output Generated/RuleGate.g.cs \
  --check

Check mode does not modify the file. Current output returns 0; missing or stale output returns 1.

Fail-closed generation

Generation runs only after complete manifest compilation. Invalid manifests, invalid namespaces, empty values, and identifier collisions produce no source. Existing output files are preserved when generation fails.

Help, version, and information

rulegate --help
rulegate validate --help
rulegate test --help
rulegate explain --help
rulegate lint --help
rulegate generate csharp --help
rulegate --version
rulegate info

Exit codes

Code Meaning
0 Command completed successfully
1 Input, expectation, lint finding, generation, missing-output, or stale failure
2 Command-line usage error
3 Unexpected internal error
130 Operation canceled

RuleGate packages

Package Purpose
Fotbiler.RuleGate.Abstractions Public authorization contracts and extension abstractions
Fotbiler.RuleGate.Core Local fail-closed authorization engine and built-in evaluators
Fotbiler.RuleGate.Manifest YAML manifest loading, validation, and compilation
Fotbiler.RuleGate.AspNetCore ASP.NET Core integration and attribute enrichment
Fotbiler.RuleGate.Cli Validation, testing, explanation, linting, C# generation, and CI automation
Fotbiler.RuleGate.Keycloak Optional Keycloak claim normalization and subject mapping

Documentation

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0 46 8/1/2026
1.0.0-rc.1 53 8/1/2026
0.9.0-preview.4 47 7/31/2026
0.9.0-preview.3 36 7/31/2026
0.9.0-preview.2 43 7/31/2026
0.9.0-preview.1 36 7/31/2026
0.8.0-preview.2 33 7/31/2026
0.7.0-preview.2 39 7/29/2026
0.7.0-preview.1 40 7/29/2026
0.6.0-preview.2 35 7/29/2026
0.6.0-preview.1 34 7/29/2026
0.5.0-preview.2 48 7/29/2026
0.3.0-preview.2 50 7/28/2026
0.3.0-preview.1 42 7/28/2026

Publishes the stable RuleGate 1.0 API and coordinated NuGet package family after release-candidate API freeze, security hardening, reproducibility, and package-only compatibility verification.