featbit-cli is a cross-platform .NET 10 CLI for calling the FeatBit OpenAPI with an access token.
The current scope focuses on three common operations:
- List projects in an organization
- Get a single project by ID
- List feature flags in an environment
It also includes user-level configuration commands so you can store your FeatBit API host, access token, and organization ID outside the repository.
- .NET 10 CLI implementation
- Designed for Windows, Linux, and macOS
- Access token authentication via
Authorization: api-<token> - Default FeatBit API host:
https://app-api.featbit.co - User configuration stored in the user profile, not in the repository
- JSON output for automation and table output for humans
- Validation command with machine-friendly exit codes
src/FeatBit.Cli- CLI applicationAI_AGENT_TEST_STORY.md- AI agent driven validation storyfeatbit-openapis.json- FeatBit OpenAPI contract source
Requirements:
- .NET 10 SDK
Build the solution:
dotnet build featbit-cli.slnx -c ReleaseRun the CLI from source:
dotnet run --project src/FeatBit.Cli -- --helpThe CLI is configured for Native AOT publish targets:
win-x64linux-x64osx-x64osx-arm64
Example:
dotnet publish src/FeatBit.Cli/FeatBit.Cli.csproj -c Release -r win-x64On Windows, Native AOT requires the platform linker prerequisites, including Visual Studio C++ build tools.
The CLI resolves configuration in this order:
- Command-line arguments
- Environment variables
- User config file
If no host is provided, the CLI uses:
https://app-api.featbit.co
FEATBIT_HOSTFEATBIT_TOKENFEATBIT_ORGFEATBIT_USER_CONFIG_FILE(optional override for the user config path)
By default, user config is stored outside the repository.
Typical locations:
- Windows:
%APPDATA%\featbit\config.json - macOS:
~/Library/Application Support/featbit/config.json - Linux:
~/.config/featbit/config.json
Initialize config interactively:
featbit config initSet one or more values directly:
featbit config set --host https://app-api.featbit.co --token api-xxxxx --org <organization-id>Show current config:
featbit config showClear saved config:
featbit config clearValidate the current configuration by calling the FeatBit API:
featbit config validateValidation exit codes:
0- success1- general failure2- authentication failure3- network failure
List projects:
featbit project listList projects with explicit parameters:
featbit project list --host https://app-api.featbit.co --token api-xxxxx --org <organization-id>Get a project by ID:
featbit project get <project-id>List feature flags in an environment:
featbit flag list <env-id>List all flags across pages:
featbit flag list <env-id> --allFilter flags by name or key:
featbit flag list <env-id> --name my-flagUse JSON output for automation:
featbit project list --json
featbit project get <project-id> --json
featbit flag list <env-id> --jsonShow built-in help:
featbit --helpThis repository uses an AI agent driven testing workflow instead of maintaining a dedicated CLI unit test project. The test artifact is structured as an execution-oriented specification with ordered cases, expected results, and reporting fields.
See:
AI_AGENT_TEST_STORY.md
- Authentication uses the FeatBit access token format
api-<token>. - If the token already includes the
api-prefix, it is used as-is. - The CLI currently targets project and feature flag read operations only.