### Install OpenFeature CLI via Go Source: https://github.com/open-feature/cli/blob/main/README.md Installs the OpenFeature CLI using Go, requiring Go version 1.23 or higher. ```go go install github.com/open-feature/cli/cmd/openfeature@latest ``` -------------------------------- ### Example OpenFeature CLI Configuration (YAML) Source: https://github.com/open-feature/cli/blob/main/README.md Illustrates an example `.openfeature.yaml` configuration file, showing how to override default paths for manifest and generated output, and how to specify language-specific options for React and Go. This file customizes the CLI's behavior. ```yaml # Example .openfeature.yaml manifest: "flags/manifest.json" # Overrides the default manifest path generate: output: "src/flags" # Overrides the default output directory # Any language-specific options can be specified here # For example, for React: react: output: "src/flags/react" # Overrides the default React output directory # For Go: go: package: "github.com/myorg/myrepo/flags" # Overrides the default Go package name output: "src/flags/go" # Overrides the default Go output directory ``` -------------------------------- ### Example Configuration File (YAML) Source: https://github.com/open-feature/cli/blob/main/README.md An example of an OpenFeature CLI configuration file in YAML format, demonstrating how to override default settings for manifest paths, output directories, and language-specific options. ```yaml # Example .openfeature.yaml manifest: "flags/manifest.json" # Overrides the default manifest path generate: output: "src/flags" # Overrides the default output directory # Any language-specific options can be specified here # For example, for React: react: output: "src/flags/react" # Overrides the default React output directory # For Go: go: package: "github.com/myorg/myrepo/flags" # Overrides the default Go package name output: "src/flags/go" # Overrides the default Go output directory ``` -------------------------------- ### Install OpenFeature CLI via curl Source: https://github.com/open-feature/cli/blob/main/README.md Installs the OpenFeature CLI using a shell command, suitable for Unix-like systems. ```bash curl -fsSL https://openfeature.dev/scripts/install_cli.sh | sh ``` -------------------------------- ### Install Lefthook Configuration Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Installs the Lefthook configuration into the current Git repository. ```bash lefthook install ``` -------------------------------- ### Install Lefthook CLI Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Installs the Lefthook command-line interface using Homebrew. ```bash brew install lefthook ``` -------------------------------- ### Example Flag Manifest Structure (JSON) Source: https://github.com/open-feature/cli/blob/main/README.md An example of a flag manifest file in JSON format, defining feature flags with their keys, descriptions, types, and default values. ```json { "$schema": "https://raw.githubusercontent.com/open-feature/cli/refs/heads/main/schema/v0/flag-manifest.json", "flags": { "uniqueFlagKey": { "description": "Description of what this flag does", "type": "boolean|string|number|object", "defaultValue": "default-value" } } } ``` -------------------------------- ### Go Generator Structure Example Source: https://github.com/open-feature/cli/blob/main/internal/generators/README.md Illustrates the expected directory structure for a Go language generator within the Open Feature CLI project, including the Go implementation file and its associated template file. ```go /internal/generators/ golang/ golang.go golang.tmpl ``` -------------------------------- ### Example Flag Manifest Structure (JSON) Source: https://github.com/open-feature/cli/blob/main/README.md Demonstrates the structure of a flag manifest file in JSON format, including the schema reference, flag key, description, type, and default value. This file defines the feature flags used by the OpenFeature CLI. ```json { "$schema": "https://raw.githubusercontent.com/open-feature/cli/refs/heads/main/schema/v0/flag-manifest.json", "flags": { "uniqueFlagKey": { "description": "Description of what this flag does", "type": "boolean|string|number|object", "defaultValue": "default-value" } } } ``` -------------------------------- ### Displaying Help for NestJS Generation Command Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_nestjs.md This option provides immediate help information for the `openfeature generate nestjs` command, detailing its usage and available flags. It's a standard way to get assistance directly from the command line. ```Shell -h, --help help for nestjs ``` -------------------------------- ### Using OpenFeature CLI Java Generation Specific Options Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_java.md This example demonstrates how to use options specific to the `openfeature generate java` command. The `--package-name` flag is used to specify the desired Java package for the generated client, overriding the default `com.example.openfeature`. ```Shell openfeature generate java --package-name "com.mycompany.featureflags" ``` -------------------------------- ### Printing OpenFeature CLI Version Source: https://github.com/open-feature/cli/blob/main/README.md This command displays the current version number of the OpenFeature CLI installed on the system. It is useful for verifying the installed CLI version and for debugging purposes. ```bash openfeature version ``` -------------------------------- ### Using OpenFeature CLI Inherited Options for Generation Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_java.md This example illustrates how to use options inherited from parent commands with `openfeature generate java`. It shows enabling debug logging, specifying a custom flag manifest file, and defining the output directory for the generated files. ```Shell openfeature generate java --debug --manifest "./config/flags.json" --output "./src/main/java" ``` -------------------------------- ### OpenFeature Init Command Specific Options - Shell Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_init.md This snippet lists the command-line options directly applicable to the `openfeature init` command. These options include displaying help information and forcing an override of an existing configuration. ```Shell -h, --help help for init --override Override an existing configuration ``` -------------------------------- ### OpenFeature CLI Commands Source: https://github.com/open-feature/cli/blob/main/README.md Provides an overview of the available commands for the OpenFeature CLI, including init, generate, and version. ```APIDOC openfeature init Initialize a new flag manifest in your project. See [here](./docs/commands/openfeature_init.md), for all available options. openfeature generate [language] Generate strongly typed flag accessors for your project. Available languages: openfeature generate Basic usage: openfeature generate [language] With custom output directory: openfeature generate typescript --output ./src/flags See [here](./docs/commands/openfeature_generate.md), for all available options. openfeature version Print the version number of the OpenFeature CLI. See [here](./docs/commands/openfeature_version.md), for all available options. ``` -------------------------------- ### Create Flag Manifest File Source: https://github.com/open-feature/cli/blob/main/README.md Creates a sample flag manifest file named 'flags.json' in the current directory. ```bash cat > flags.json << EOL { "$schema": "https://raw.githubusercontent.com/open-feature/cli/refs/heads/main/schema/v0/flag-manifest.json", "flags": { "enableMagicButton": { "flagType": "boolean", "defaultValue": false, "description": "Activates a special button that enhances user interaction with magical, intuitive functionalities." } } } EOL ``` -------------------------------- ### OpenFeature CLI Related Commands Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature.md Related commands for the OpenFeature CLI, including compare, generate, init, and version. ```bash openfeature compare openfeature generate openfeature init openfeature version ``` -------------------------------- ### Generate Feature Flag Accessors Source: https://github.com/open-feature/cli/blob/main/README.md Generates strongly typed feature flag accessors for a specified language. This example shows generating for React. ```bash openfeature generate react ``` -------------------------------- ### C# Integration Test Implementation Overview Source: https://github.com/open-feature/cli/blob/main/test/csharp-integration/README.md Provides an overview of the C# integration test implementation using Dagger. It outlines the steps of building the CLI in a Go container, generating C# code, and testing it within a .NET container. ```go // The implementation is located in test/integration/cmd/csharp/run.go ``` -------------------------------- ### OpenFeature CLI Init Command Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_init.md Initializes a new project for the OpenFeature CLI. Supports overriding existing configurations and controlling interactive prompts. ```APIDOC openfeature init Initialize a new project for OpenFeature CLI. Synopsis: openfeature init [flags] Options: -h, --help help for init --override Override an existing configuration Options inherited from parent commands: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts See Also: openfeature (openfeature.md) CLI for OpenFeature. ``` -------------------------------- ### OpenFeature CLI Synopsis Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature.md The main command for the OpenFeature CLI. ```bash openfeature [flags] ``` -------------------------------- ### Help Option for OpenFeature Python Generation Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_python.md This snippet shows the `--help` or `-h` option specific to the `openfeature generate python` command. Using this flag will display comprehensive help information, including usage details and available options for the Python client generation process. ```Shell -h, --help help for python ``` -------------------------------- ### Run Unit Tests Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Executes all unit tests for the OpenFeature CLI project. ```bash go test ./... ``` -------------------------------- ### OpenFeature CLI Generate Go Command Options Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_go.md Details the specific options available for the 'openfeature generate go' command, including help flags and package name configuration. ```APIDOC openfeature generate go: Synopsis: Generate typesafe accessors compatible with the OpenFeature Go SDK. Options: -h, --help help for go --package-name string Name of the generated Go package (default "openfeature") Inherited Options: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved See Also: openfeature generate Generate typesafe OpenFeature accessors. ``` -------------------------------- ### OpenFeature CLI Options Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature.md Available flags for the OpenFeature CLI. ```bash --debug Enable debug logging -h, --help help for openfeature -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts ``` -------------------------------- ### Displaying Help for OpenFeature React Generation (CLI) Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_react.md This option provides detailed help information for the `openfeature generate react` command, outlining its usage and available flags. ```Shell -h, --help help for react ``` -------------------------------- ### Run Integration Tests Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Executes integration tests for the OpenFeature CLI, including options for specific languages. ```bash # Run all integration tests make test-integration # Run tests for a specific language make test-csharp-dagger ``` -------------------------------- ### Specifying Comparison Options - CLI Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_compare.md These options customize the behavior of the `openfeature compare` command. They allow specifying the target manifest file to compare against, requesting help, and defining the desired output format for the comparison results. ```Shell -a, --against string Path to the target manifest file to compare against -h, --help help for compare -o, --output string Output format. Valid formats: tree, flat, json, yaml (default "tree") ``` -------------------------------- ### Run C# Integration Tests with Dagger Source: https://github.com/open-feature/cli/blob/main/test/csharp-integration/README.md Executes the C# integration tests for the OpenFeature CLI using a Dagger command. This process involves building the CLI, generating C# client code, and running compilation tests in an isolated environment. ```bash make test-csharp-dagger ``` -------------------------------- ### OpenFeature Generate C# Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate.md Generates a typesafe C# client for OpenFeature. ```bash openfeature generate csharp ``` -------------------------------- ### Integration Test Runner Structure Source: https://github.com/open-feature/cli/blob/main/test/README.md Describes the core components and their roles within the OpenFeature CLI integration testing framework. It highlights how tests are organized and executed using Dagger. ```go test/integration/integration.go: Defines the `Test` interface and common utilities test/integration/cmd/run.go: Runner for all integration tests that executes each language-specific test test/integration/cmd//run.go: Combined implementation and runner for each language test/-integration/: Contains language-specific test files (code samples, project files) ``` -------------------------------- ### OpenFeature CLI Compare Command Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_compare.md Compares two OpenFeature flag manifests. It accepts paths to the manifests and an output format. Options include specifying the target manifest file, help, output format (tree, flat, json, yaml), debug logging, manifest path, and disabling interactive prompts. ```APIDOC openfeature compare [flags] Options: -a, --against string Path to the target manifest file to compare against -h, --help help for compare -o, --output string Output format. Valid formats: tree, flat, json, yaml (default "tree") Options inherited from parent commands: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts SEE ALSO: * [openfeature](openfeature.md) - CLI for OpenFeature. ``` -------------------------------- ### Displaying Version Command Help (Shell) Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_version.md This option displays the help message for the `openfeature version` command, providing information on its usage and available flags. ```Shell -h, --help help for version ``` -------------------------------- ### OpenFeature Inherited Command Options - Shell Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_init.md This snippet details the command-line options that are inherited from parent commands and can be used with `openfeature init`. These options control aspects like enabling debug logging, specifying the path to the flag manifest, and disabling interactive prompts. ```Shell --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts ``` -------------------------------- ### OpenFeature Generate Java Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate.md Generates a typesafe Java client for OpenFeature. ```bash openfeature generate java ``` -------------------------------- ### Inherited Options for openfeature generate go Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_go.md These options are inherited from parent commands and can be used with `openfeature generate go`. They provide common functionalities such as enabling debug logging, specifying the path to the flag manifest file, disabling interactive prompts, and defining the output directory for the generated files. ```Shell --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved ``` -------------------------------- ### Run Pre-push Hook Manually Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Manually triggers the pre-push hook for Lefthook. ```bash lefthook run pre-push ``` -------------------------------- ### OpenFeature Generate Python Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate.md Generates a typesafe Python client for OpenFeature. ```bash openfeature generate python ``` -------------------------------- ### Generate Java Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_java.md Generates a typesafe Java client for the OpenFeature SDK. It allows specifying the package name, manifest path, output directory, and debug logging. ```bash openfeature generate java [flags] Flags: -h, --help help for java --package-name string Name of the generated Java package (default "com.example.openfeature") Inherited Flags: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved ``` -------------------------------- ### C# Integration Test Program Source: https://github.com/open-feature/cli/blob/main/test/csharp-integration/README.md The sample C# program used in the integration tests to verify the generated client code. ```csharp // Program.cs: Test program that uses the generated code ``` -------------------------------- ### Go Template Function: ToKebab Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to kebab-case. This function is automatically included in templates. ```go {{ "hello world" | ToKebab }} ``` -------------------------------- ### Go Template Function: ToTitle Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to Title Case. This function is automatically included in templates. ```go {{ "hello world" | ToTitle }} ``` -------------------------------- ### OpenFeature Generate Node.js Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate.md Generates a typesafe Node.js client for OpenFeature. ```bash openfeature generate nodejs ``` -------------------------------- ### Generate Node.js Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_nodejs.md Generates a typesafe Node.js client for the OpenFeature JavaScript Server SDK. Supports specifying output paths and enabling debug logging. ```bash openfeature generate nodejs [flags] Flags: -h, --help help for nodejs Inherited Flags: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved ``` -------------------------------- ### OpenFeature CLI Generate Go Command Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_go.md Generates typesafe accessors for the OpenFeature Go SDK. It allows specifying the package name and output path for the generated files. Inherits flags like debug logging and manifest path from parent commands. ```go openfeature generate go [flags] Flags: -h, --help help for go --package-name string Name of the generated Go package (default "openfeature") Inherited Flags: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved ``` -------------------------------- ### Run OpenFeature CLI via Docker Source: https://github.com/open-feature/cli/blob/main/README.md Executes the OpenFeature CLI within a Docker container, mounting the current directory for access. ```docker docker run -it -v $(pwd):/local -w /local ghcr.io/open-feature/cli:latest ``` -------------------------------- ### Go Template Function: ToPascal Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to PascalCase. This function is automatically included in templates. ```go {{ "hello world" | ToPascal }} ``` -------------------------------- ### All Integration Tests Runner (Go) Source: https://github.com/open-feature/cli/blob/main/test/new-generator.md Orchestrates the execution of all integration tests, including C# and Python. It uses `exec.Command` to run individual test suites. ```go package main import ( "fmt" "os" "os/exec" ) func main() { // Run the generator-specific tests fmt.Println("=== Running all integration tests ===") // Run the C# integration test csharpCmd := exec.Command("go", "run", "github.com/open-feature/cli/test/integration/cmd/csharp") csharpCmd.Stdout = os.Stdout csharpCmd.Stderr = os.Stderr if err := csharpCmd.Run(); err != nil { fmt.Fprintf(os.Stderr, "Error running C# integration test: %v\n", err) os.Exit(1) } // Run the Python integration test pythonCmd := exec.Command("go", "run", "github.com/open-feature/cli/test/integration/cmd/python") pythonCmd.Stdout = os.Stdout pythonCmd.Stderr = os.Stderr if err := pythonCmd.Run(); err != nil { fmt.Fprintf(os.Stderr, "Error running Python integration test: %v\n", err) os.Exit(1) } // Add more tests here as they are available fmt.Println("=== All integration tests passed successfully ===") } ``` -------------------------------- ### Run All Integration Tests Source: https://github.com/open-feature/cli/blob/main/test/README.md Executes all integration tests defined for the OpenFeature CLI. This command is typically used to ensure the overall health and correctness of the CLI generators. ```bash make test-integration ``` -------------------------------- ### Run Specific Integration Test (C#) Source: https://github.com/open-feature/cli/blob/main/test/README.md Executes a specific integration test suite, in this case, for C# generated code. This allows for focused testing of a particular language generator. ```bash # For C# tests make test-csharp-dagger ``` -------------------------------- ### Python Integration Test Runner (Go) Source: https://github.com/open-feature/cli/blob/main/test/new-generator.md Implements the integration test for the Python generator using Dagger. It builds the CLI, generates Python client code, and runs pytest against the generated files. ```go package main import ( "context" "fmt" "os" "path/filepath" "dagger.io/dagger" "github.com/open-feature/cli/test/integration" ) // Test implements the integration test for the Python generator type Test struct { ProjectDir string TestDir string } // New creates a new Test func New(projectDir, testDir string) *Test { return &Test{ ProjectDir: projectDir, TestDir: testDir, } } // Run executes the Python integration test func (t *Test) Run(ctx context.Context, client *dagger.Client) (*dagger.Container, error) { // Source code container source := client.Host().Directory(t.ProjectDir) testFiles := client.Host().Directory(t.TestDir, dagger.HostDirectoryOpts{ Include: []string{"test_openfeature.py", "requirements.txt"}, }) // Build the CLI cli := client.Container(). From("golang:1.24-alpine"). WithDirectory("/src", source). WithWorkdir("/src"). WithExec([]string{"go", "build", "-o", "cli"}) // Generate Python client generated := cli.WithExec([]string{ "./cli", "generate", "python", "--manifest=/src/sample/sample_manifest.json", "--output=/tmp/generated", "--package=openfeature_test", }) // Get generated files generatedFiles := generated.Directory("/tmp/generated") // Test Python with the generated files pythonContainer := client.Container(). From("python:3.11-slim"). WithDirectory("/app/openfeature", generatedFiles). WithDirectory("/app/test", testFiles). WithWorkdir("/app"). WithExec([]string{"pip", "install", "-r", "test/requirements.txt"}). WithExec([]string{"python", "-m", "pytest", "test/test_openfeature.py", "-v"}) return pythonContainer, nil } // Name returns the name of the integration test func (t *Test) Name() string { return "python" } func main() { ctx := context.Background() // Get project root projectDir, err := filepath.Abs(os.Getenv("PWD")) if err != nil { fmt.Fprintf(os.Stderr, "Failed to get project dir: %v\n", err) os.Exit(1) } // Get test directory testDir, err := filepath.Abs(filepath.Join(projectDir, "test/python-integration")) if err != nil { fmt.Fprintf(os.Stderr, "Failed to get test dir: %v\n", err) os.Exit(1) } // Create and run the Python integration test test := New(projectDir, testDir) if err := integration.RunTest(ctx, test); err != nil { fmt.Fprintf(os.Stderr, "Error: %v\n", err) os.Exit(1) } } ``` -------------------------------- ### Run Pre-commit Hook Manually Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Manually triggers the pre-commit hook for Lefthook. ```bash lefthook run pre-commit ``` -------------------------------- ### Inherited Options for OpenFeature CLI Commands Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_python.md This snippet lists common options inherited by various `openfeature` CLI commands. These include `--debug` for enabling verbose logging, `--manifest` to specify the path to the flag definition file (defaulting to 'flags.json'), `--no-input` to disable interactive prompts, and `--output` to define the directory where generated files should be saved. ```Shell --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved ``` -------------------------------- ### Generate Python Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_python.md Generates a typesafe Python client for the OpenFeature SDK. This command can take flags to customize the generation process, such as specifying the manifest file or the output directory. ```bash openfeature generate python [flags] Flags: -h, --help help for python Inherited Flags: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved ``` -------------------------------- ### Makefile Target for Python Dagger Test Source: https://github.com/open-feature/cli/blob/main/test/new-generator.md Defines a Makefile target `test-python-dagger` to execute the Python integration test using Dagger. It echoes a message and then runs the Go command. ```makefile .PHONY: test-python-dagger test-python-dagger: @echo "Running Python integration test with Dagger..." @go run ./test/integration/cmd/python/run.go ``` -------------------------------- ### Generate C# Client Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_csharp.md Generates typesafe C# client code compatible with the OpenFeature .NET SDK. Allows specifying a namespace for the generated code. ```bash openfeature generate csharp [--namespace string] [--debug] [--manifest string] [--no-input] [--output string] ``` -------------------------------- ### OpenFeature Generate Go Accessors Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate.md Generates typesafe accessors for OpenFeature in Go. ```bash openfeature generate go ``` -------------------------------- ### Go Template Function: ToUpper Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to UPPER CASE. This function is automatically included in templates. ```go {{ "hello world" | ToUpper }} ``` -------------------------------- ### Go Template Function: Quote Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Wraps a string in double quotes. This function is automatically included in templates. ```go {{ "hello world" | Quote }} ``` -------------------------------- ### Generating TypeScript Accessors to Custom Directory Source: https://github.com/open-feature/cli/blob/main/README.md This command generates strongly typed TypeScript flag accessors and outputs them to a specified custom directory, ./src/flags. This allows for organized placement of generated code within a project structure. ```bash openfeature generate typescript --output ./src/flags ``` -------------------------------- ### Go Template Function: ToLower Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to lower case. This function is automatically included in templates. ```go {{ "HELLO WORLD" | ToLower }} ``` -------------------------------- ### OpenFeature CLI Generate C# Options Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_csharp.md Defines the options available for the `openfeature generate csharp` command, including specific flags for namespace and inherited flags for debugging, manifest path, input disabling, and output path. ```APIDOC openfeature generate csharp: Generates typesafe C# client compatible with the OpenFeature .NET SDK. Synopsis: openfeature generate csharp [flags] Options: -h, --help help for csharp --namespace string Namespace for the generated C# code (default "OpenFeature") Options inherited from parent commands: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved See Also: openfeature generate - Generate typesafe OpenFeature accessors. ``` -------------------------------- ### Go Template Function: ToScreamingSnake Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to SCREAMING_SNAKE_CASE. This function is automatically included in templates. ```go {{ "hello world" | ToScreamingSnake }} ``` -------------------------------- ### OpenFeature Generate React Hooks Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate.md Generates typesafe React Hooks for OpenFeature. ```bash openfeature generate react ``` -------------------------------- ### C# Integration Test Project File Source: https://github.com/open-feature/cli/blob/main/test/csharp-integration/README.md The .NET project file used for compilation testing within the C# integration test suite. ```csharp // CompileTest.csproj: .NET project file for compilation testing ``` -------------------------------- ### Go Template Function: ToCamel Source: https://github.com/open-feature/cli/blob/main/CONTRIBUTING.md Converts a string to camelCase. This function is automatically included in templates. ```go {{ "hello world" | ToCamel }} ``` -------------------------------- ### openfeature generate react Command Source: https://github.com/open-feature/cli/blob/main/docs/commands/openfeature_generate_react.md Generates typesafe React Hooks for OpenFeature. This command is in alpha stability. It accepts flags for help, debug logging, manifest path, disabling input, and specifying the output directory. ```APIDOC openfeature generate react [flags] Synopsis: Generate typesafe React Hooks compatible with the OpenFeature React SDK. Options: -h, --help help for react Inherited Options: --debug Enable debug logging -m, --manifest string Path to the flag manifest (default "flags.json") --no-input Disable interactive prompts -o, --output string Path to where the generated files should be saved See Also: openfeature generate Generate typesafe OpenFeature accessors. ```