Hi there! I'm following the steps in <https://docs...
# ask-questions
b
Hi there! I'm following the steps in https://docs.growthbook.io/tools/cli The auth seems successful as it returns
The GrowthBook config has been written at ~/.growthbook/config.toml
But running the line to generate types returns an Unauthorised error:
There was an error fetching the featuresError: Cannot fetch: Unauthorized
Did anyone experience the same?
f
Hi Boris. Are you self-hosting or using GrowthBook Cloud?
b
Self hosting
Is there a way to point it to the instance?
f
Yeah, when you generate features, we use GrowthBook Cloud by default. You can override the host with the
--apiBaseUrl
flag. For example:
Copy code
growthbook features generate-types --apiBaseUrl <http://localhost:3100> --output ./types
Looking at this now, we should really move the API Base URL into the login command. No reason to make you enter it every time. I'll add an issue in GitHub for this
b
Thanks mate, it worked