How to use the CLI
init
command incorporates Trigger.dev into your project. It performs the following functions:
init
command in a terminal window to setup your project with Trigger.dev
Are you using the Trigger.dev cloud or self-hosted?
Enter the URL of your self-hosted Trigger.dev instance
Enter your development API key
tr_dev_
).Enter a unique ID for your endpoint
dev
CLI command to run Trigger.dev locally. You should run this command every time you want to use Trigger.dev locally.
dev
terminal
command running while you develop.--port 3001
to the end--hostname <host>
. For example, in case your app is running on 0.0.0.0: --hostname 0.0.0.0
.update
command will update all Trigger.dev packages to the latest version.
whoami
command will print out information about your current Trigger.dev project and environment, based on the API key found in your .env
or .env.local
file
send-event
command will send an event to your Trigger.dev project. This is useful for testing your Trigger.dev project locally.