Skip to content

Commit 004d70a

Browse files
committed
Merge remote-tracking branch 'origin/main' into docs/task-examples
2 parents 1c39281 + 972b5e3 commit 004d70a

18 files changed

+560
-152
lines changed

docs/cli-deploy-commands.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "CLI deploy options"
3+
sidebarTitle: "Deploy"
4+
description: "Use these options to help deploy your tasks to Trigger.dev."
5+
---
6+
7+
import CliDeployCommands from '/snippets/cli-commands-deploy.mdx';
8+
9+
<CliDeployCommands/>

docs/cli-deploy.mdx

Lines changed: 2 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -4,90 +4,8 @@ description: "The `trigger.dev deploy` command can be used to manually deploy."
44
---
55

66
import ComingSoon from '/snippets/coming-soon-generic.mdx';
7+
import CliDeployCommands from '/snippets/cli-commands-deploy.mdx';
78

8-
You run the command like this:
9-
10-
<CodeGroup>
11-
12-
```bash npm
13-
npx trigger.dev@beta deploy
14-
```
15-
16-
```bash pnpm
17-
pnpm dlx trigger.dev@beta deploy
18-
```
19-
20-
```bash yarn
21-
yarn dlx trigger.dev@beta deploy
22-
```
23-
24-
</CodeGroup>
25-
26-
<Warning>Will fail in CI if any version mismatches are detected. Ensure everything runs locally first using the [dev](/cli-dev) command and don't bypass the version checks!</Warning>
27-
28-
It performs a few steps to deploy:
29-
30-
1. Optionally updates packages when running locally.
31-
2. Typechecks the code.
32-
3. Compiles and bundles the code.
33-
4. Checks that [environment variables](/deploy-environment-variables) are set.
34-
5. Deploys the code to the cloud.
35-
6. Registers the tasks as a new version in the environment (prod by default).
36-
37-
You can also setup [GitHub Actions](/github-actions) to deploy your tasks automatically.
38-
39-
## Options
40-
41-
### Environment `--env` or `-e`
42-
43-
Defaults to `prod` but you can specify `staging`.
44-
45-
### Skip typecheck `--skip-typecheck` or `-T`
46-
47-
Skips the pre-build typecheck step.
48-
49-
### Build platform `--build-platform`
50-
51-
The platform to build the deployment image for. Defaults to `linux/amd64`.
52-
53-
### Log level `--log-level` or `-l`
54-
55-
The log level to use (debug, info, log, warn, error, none). Defaults to `log`.
56-
57-
### Set config filename `--config` or `-c`
58-
59-
The name of the config file, found where the command is run from. Defaults to `trigger.config.ts`.
60-
61-
### Set the projectRef `--project-ref` or `-p`
62-
63-
The project ref. Required if there is no config file.
64-
65-
### Self-hosted options
66-
67-
These options are usually only relevant to self-hosters or for local development.
68-
69-
#### Skip deploying the image `--skip-deploy` or `-D`
70-
71-
Load the built image into your local docker.
72-
73-
#### Self-hosted (builds locally) `--self-hosted`
74-
75-
Builds and loads the image using your local docker. Use the `--registry` option to specify the registry to push the image to when using `--self-hosted`, or just use `--push` to push to the default registry.
76-
77-
#### Registry `--registry`
78-
79-
<ComingSoon />
80-
81-
The registry to push the image to when using --self-hosted.
82-
83-
#### Push image `--push`
84-
85-
When using the --self-hosted flag, push the image to the default registry. (defaults to false when not using --registry)
86-
87-
#### Tag the image `--tag`
88-
89-
<ComingSoon />
90-
91-
Specify the tag to use when pushing the image to the registry.
9+
<CliDeployCommands/>
9210

9311
{/* todo add options, remove the reference docs */}

docs/cli-dev-commands.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "CLI dev command"
3+
sidebarTitle: "Dev"
4+
description: "The `trigger.dev dev` command is used to run your tasks locally."
5+
---
6+
7+
import CliDevCommands from "/snippets/cli-commands-develop.mdx";
8+
9+
<CliDevCommands />

docs/cli-dev.mdx

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,6 @@ title: "CLI dev command"
33
description: "The `trigger.dev dev` command is used to run your tasks locally."
44
---
55

6-
This runs a server on your machine that can execute Trigger.dev tasks:
6+
import CliDevCommands from "/snippets/cli-commands-develop.mdx";
77

8-
<CodeGroup>
9-
10-
```bash npm
11-
npx trigger.dev@beta dev
12-
```
13-
14-
```bash pnpm
15-
pnpm dlx trigger.dev@beta dev
16-
```
17-
18-
```bash yarn
19-
yarn dlx trigger.dev@beta dev
20-
```
21-
22-
</CodeGroup>
23-
24-
It will first perform an update check to prevent version mismatches, failed deploys, and other errors. You will always be prompted first.
25-
26-
You will see in the terminal that the server is running and listening for requests. When you run a task, you will see it in the terminal along with a link to view it in the dashboard.
27-
28-
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.
29-
30-
## Options
31-
32-
### Attaching a local debugger
33-
34-
You can use the `--debugger` flag to run the server in debug mode. This will allow you to attach a debugger to the server and debug your tasks.
35-
36-
<CodeGroup>
37-
38-
```bash npm
39-
npx trigger.dev@beta dev --debugger
40-
```
41-
42-
```bash pnpm
43-
pnpm dlx trigger.dev@beta dev --debugger
44-
```
45-
46-
```bash yarn
47-
yarn dlx trigger.dev@beta dev --debugger
48-
```
49-
50-
</CodeGroup>
51-
52-
### Concurrently running the terminal
53-
54-
Install the concurrently package as a dev dependency:
55-
56-
```ts
57-
concurrently --raw --kill-others npm:dev:remix npm:dev:trigger
58-
```
59-
60-
Then add something like this in your package.json scripts. This assumes you're running Next.js so swap that bit out if you're not:
61-
62-
```json
63-
"scripts": {
64-
"dev": "concurrently --raw --kill-others npm:dev:*",
65-
"dev:next": "next dev",
66-
"dev:trigger": "npx trigger.dev@beta dev",
67-
//...
68-
}
69-
```
8+
<CliDevCommands />

docs/cli-development-commands.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "CLI development commands"
3+
sidebarTitle: "Development commands"
4+
description: "Use these commands to help develop your tasks locally."
5+
---
6+
7+
import CliDevelopCommands from '/snippets/cli-commands-develop.mdx';
8+
9+
<CliDevelopCommands/>

docs/cli-init-commands.mdx

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: "CLI init command"
3+
sidebarTitle: "Init"
4+
description: "Use these options when running the CLI `init` command."
5+
---
6+
7+
Run the command like this:
8+
9+
<CodeGroup>
10+
11+
```bash npm
12+
npx trigger.dev@beta init
13+
```
14+
15+
```bash pnpm
16+
pnpm dlx trigger.dev@beta init
17+
```
18+
19+
```bash yarn
20+
yarn dlx trigger.dev@beta init
21+
```
22+
23+
</CodeGroup>
24+
25+
## Options
26+
27+
<ParamField body="Project ref" type="--project-ref | -p">
28+
The project ref to use when initializing the project.
29+
</ParamField>
30+
31+
<ParamField body="Package tag" type="--tag | -t">
32+
The version of the `@trigger.dev/sdk` package to install. Defaults to `3.0.0-beta.56`.
33+
</ParamField>
34+
35+
<ParamField body="Skip package install" type="--skip-package-install">
36+
Skip installing the `@trigger.dev/sdk` package.
37+
</ParamField>
38+
39+
<ParamField body="Override config" type="--override-config">
40+
Override the existing config file if it exists.
41+
</ParamField>
42+
43+
<ParamField body="Package arguments" type="--pkg-args">
44+
Additional arguments to pass to the package manager. Accepts CSV for multiple args.
45+
</ParamField>
46+
47+
<ParamField body="Login profile" type="--profile">
48+
The login profile to use. Defaults to "default".
49+
</ParamField>
50+
51+
<ParamField body="API URL" type="--api-url | -a">
52+
Override the default API URL. If not specified, it uses `https://api.trigger.dev`.
53+
</ParamField>
54+
55+
<ParamField body="Log level" type="--log-level | -l">
56+
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".
57+
</ParamField>
58+
59+
<ParamField body="Skip telemetry" type="--skip-telemetry">
60+
Opt-out of sending telemetry data.
61+
</ParamField>
62+
63+
## Standard options
64+
65+
<ParamField body="Help" type="--help | -h">
66+
Shows the help information for the command.
67+
</ParamField>

docs/cli-introduction.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "Introduction"
3+
description: "The Trigger.dev CLI has a number of options and commands to help you develop locally, self host, and deploy your tasks."
4+
---
5+
6+
## Standard options
7+
8+
<ParamField body="Help" type="--help | -h">
9+
Displays a list of all help commands.
10+
</ParamField>
11+
12+
<ParamField body="Version" type="--version | -v">
13+
Displays the version number.
14+
</ParamField>
15+
16+
## Commands
17+
18+
| Command | Description |
19+
| :------------------------------------------------------- | :--------------------------------------------------------------------- |
20+
| [Login](/cli-login-commands) | Login with Trigger.dev so you can perform authenticated actions. |
21+
| [Init](/cli-init-commands) | Initialize your existing project for development with Trigger.dev. |
22+
| [Dev](/cli-dev-commands) | Run your Trigger.dev tasks locally. |
23+
| [Deploy](/cli-deploy-commands) | Deploy your Trigger.dev v3 project to the cloud. |
24+
| [Whoami](/cli-whoami-commands) | Display the current logged in user and project details. |
25+
| [Logout](/cli-logout-commands) | Logout of Trigger.dev. |
26+
| [List-profiles](/cli-list-profiles-commands) | List all of your CLI profiles. |
27+
| [Update](/cli-update-commands) | Updates all `@trigger.dev/*` packages to match the CLI version. |

docs/cli-list-profiles-commands.mdx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "CLI list profiles command"
3+
sidebarTitle: "List profiles"
4+
description: "Use these options when using the `list-profiles` CLI command."
5+
---
6+
7+
Run the command like this:
8+
9+
<CodeGroup>
10+
11+
```bash npm
12+
npx trigger.dev@beta list-profiles
13+
```
14+
15+
```bash pnpm
16+
pnpm dlx trigger.dev@beta list-profiles
17+
```
18+
19+
```bash yarn
20+
yarn dlx trigger.dev@beta list-profiles
21+
```
22+
23+
</CodeGroup>
24+
25+
## Options
26+
27+
<ParamField body="Log level" type="--log-level | -l">
28+
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`.
29+
</ParamField>
30+
31+
<ParamField body="Skip telemetry" type="--skip-telemetry">
32+
Opt-out of sending telemetry data.
33+
</ParamField>
34+
35+
36+
## Standard options
37+
38+
<ParamField body="Help" type="--help | -h">
39+
Shows the help information for the command.
40+
</ParamField>

docs/cli-login-commands.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "CLI login command"
3+
sidebarTitle: "Login"
4+
description: "Use these options when logging in to Trigger.dev using the CLI."
5+
---
6+
7+
Run the command like this:
8+
9+
<CodeGroup>
10+
11+
```bash npm
12+
npx trigger.dev@beta login
13+
```
14+
15+
```bash pnpm
16+
pnpm dlx trigger.dev@beta login
17+
```
18+
19+
```bash yarn
20+
yarn dlx trigger.dev@beta login
21+
```
22+
23+
</CodeGroup>
24+
25+
## Options
26+
27+
<ParamField body="Login profile" type="--profile">
28+
Specifies the login profile to use. If not provided, it defaults to "default".
29+
</ParamField>
30+
31+
<ParamField body="API URL" type="-a | --api-url">
32+
Overrides the default API URL. If not specified, it uses `https://api.trigger.dev`.
33+
</ParamField>
34+
35+
<ParamField body="Log level" type="-l | --log-level">
36+
Sets the CLI log level. Available options are `debug`, `info`, `log`, `warn`, `error`, and `none`. This setting doesn't affect the log level of your trigger.dev tasks. The default is `log`.
37+
</ParamField>
38+
39+
<ParamField body="Skip telemetry" type="--skip-telemetry">
40+
Opts out of sending telemetry data.
41+
</ParamField>
42+
43+
## Standard options
44+
45+
<ParamField body="Version" type="--version | -v">
46+
Displays the version number of the CLI.
47+
</ParamField>
48+
49+
<ParamField body="Help" type="--help | -h">
50+
Shows the help information for the command.
51+
</ParamField>

0 commit comments

Comments
 (0)