deno task command runs tasks defined in the tasks field of your deno.json or deno.jsonc configuration file.
Usage
Description
Tasks provide a way to define custom scripts that can be run with a simple command. They are useful for automating common development workflows, such as running tests, building code, or starting a development server. Without a task name, this command lists all available tasks defined in the configuration file.Options
The name of the task to run. If omitted, lists all available tasks.
Specify the directory to use as the current working directory for the task.
Filter tasks by package name in a workspace. Supports glob patterns.
Run the task recursively in all workspace packages.
Evaluate the task argument as a shell command rather than looking up a named task.
Additional arguments to pass to the task script (after
--).Examples
List all available tasks
Run a specific task
Run a task with arguments
Run a task in a specific directory
Run task in filtered packages
Run task recursively in workspace
Task Definition
Tasks are defined in thetasks field of your deno.json:
Task Dependencies
Tasks can depend on other tasks. When a task has dependencies, those tasks will run first:deno task build will first run deno task test, then run the build task.
Environment Variables
Number of concurrent tasks to run (default: number of CPUs).
Internal: Force using package.json scripts instead of deno.json tasks.