Type-safe client generation
SDKs come with a CLI tool to auto-generate a client so you can access your flags with end-to-end type-safety. This ensures typos in flag names or incorrectly passed targeting attributes can be caught at build-time rather than runtime. It also improves the developer experience with code completion, "find all references" and type-safe flag clean up.
To generate a client, first define the following environment variables in your .env
file:
Replace token
with your project token which you can find in the Settings tab of your project.
Then run:
Customize client generation
You can customize client generation with the following environment variables:
You can also pass these as command-line arguments. To see all available options, run:
This will output:
Last updated