CLI dev command
The trigger.dev dev
command is used to run your tasks locally.
This runs a server on your machine that can execute Trigger.dev tasks:
It will first perform an update check to prevent version mismatches, failed deploys, and other errors. You will always be prompted first.
You will see in the terminal that the server is running and listening for tasks. When you run a task, you will see it in the terminal along with a link to view it in the dashboard.
It is worth noting that each task runs in a separate Node process. This means that if you have a long-running task, it will not block other tasks from running.
Options
The name of the config file found at the project path. Defaults to trigger.config.ts
The project ref. Required if there is no config file.
Load environment variables from a file. This will only hydrate the process.env
of the CLI
process, not the tasks.
Skip checking for @trigger.dev
package updates.
Common options
These options are available on most commands.
The login profile to use. Defaults to “default”.
Override the default API URL. If not specified, it uses https://api.trigger.dev
. This can also be set via the TRIGGER_API_URL
environment variable.
The CLI log level to use. Options are debug
, info
, log
, warn
, error
, and none
. This does not affect the log level of your trigger.dev tasks. Defaults to log
.
Opt-out of sending telemetry data. This can also be done via the TRIGGER_TELEMETRY_DISABLED
environment variable. Just set it to anything other than an empty string.
Shows the help information for the command.
Displays the version number of the CLI.
Concurrently running the terminal
Install the concurrently package as a dev dependency:
Then add something like this in your package.json scripts: