Help articles

Configuring TypeGen in Sanity CLI config

As of version 4.19.0 it is recommended to configure typegen through the Sanity CLI config.

Starting with Sanity CLI v4.19.0, configure type generation in sanity.cli.ts by setting the TypeGen properties under the typegen field.

Before v4.19.0, you configured TypeGen in a separate file, sanity-typegen.json. That file is deprecated, and the CLI prints a warning when it finds one.

Was this page helpful?