Get Started with Hatchet
This guide will help you get started with Hatchet, at the end of the guide you will have a Hatchet project with a basic task and a worker to execute the task.
Set environment variables
All Hatchet SDKs require the HATCHET_CLIENT_TOKEN
environment variable to be set. This token is used to authenticate your requests to the Hatchet API. You can generate an API token from the Hatchet frontend by navigating to the Settings
tab and clicking on the API Tokens
tab. Click the Generate API Token
button to create a new token. Set this environment variable in your project, and do not share it publicly.
export HATCHET_CLIENT_TOKEN="<your-client-token>"
Additionally, if you are a self-hosted user provisioning without TLS enabled, you will need to set the HATCHET_CLIENT_TLS_STRATEGY
environment variable to none
. If you are on Hatchet Cloud, TLS is enabled by default, so this is not required.
export HATCHET_CLIENT_TLS_STRATEGY=none
Setup your codebase
Continue to the next section to learn how to create your first task