boolfnames - Linux


boolfnames is a command-line tool that operates on boolean flags/field names extracted from proto files. It is primarily used to generate various types of code and files based on the flags/field names defined in proto files for different programming languages.


Usage: boolfnames [flags] <command> [args]
    generate: Generate code based on boolean flags/field names
    list: List boolean flags/field names
    help: Print help


  • -language, -l: Target programming language (default: "go")
    • Options: "go", "java", "python"
  • -output, -o: Output directory (default: ".")
  • -filename: Output filename (default: "flags.go", "", "")
  • -proto: Proto file path (required)
  • -ignorecase: Ignore case when comparing boolean flag names (default: false)
  • -debug: Enable debug mode


Generate Go code for boolean flags:

boolfnames generate -l=go -o=./myflags -proto=myproto.proto

List boolean flag names from a proto file:

boolfnames list -proto=myproto.proto

Common Issues

  • Error: "Proto file path not specified"
    • Solution: Use the -proto flag to specify the proto file path.
  • Error: "Invalid language specified"
    • Solution: Specify a valid language using the -language flag. Options are "go", "java", and "python".


Example script to generate code for multiple proto files:


for proto in $(find . -name "*.proto"); do
    boolfnames generate -l=go -o=./generated -proto=$proto

Related Commands

  • protoc: Protocol buffer compiler
  • protoc-gen-*: Protocol buffer compiler plugins for specific languages