CLI reference
fern generate [--group <group>] [--version <version>]
fern generate
runs the compiler. It will validate your API and run the
generators specified in generators.yml
.
If you don’t have a default-group
specified in generators.yml
, then you must
specify a group using the --group
option.
You can specify a version using the --version
option. This version string is
used when publishing SDKs to registries (e.g. npm).
Running locally
By default, the generation runs in the cloud. If you want to run it on your local machine, you can use the --local
option. This will run each generator in a Docker container.
By default, Fern will delete the container after running. To keep the container around (e.g. to look at the generator’s logs), use the --keepDocker
option.
fern check
fern check
will validate that your API is valid.
fern upgrade
fern upgrade
will upgrade your compiler version in fern.config.json
to the
latest version.
fern add <generator>
fern add
adds a new generator to your generators.yml
. You can view the full
list of supported generators in the Generators section.
fern init
fern init
adds a new API to your repo.
fern register
Advanced feature. You can register your API so it can be depended on by other APIs. Read more in the Depending on other APIs section.