1bbd7e6dc3
* Initial CLI commit * Hooked up the CLI so it actually shows stuff… * Totally reworked the v3 CLI to be based on our existing CLI (Commander) * WIP on PersonalAccessTokens and AuthorizationCodes * WIP creating a Personal Access Tokens page. Created a new sidenav for account pages * Creating tokens is working but the form is broken * Tokens are created in the UI * Creating and revoking access tokens from the UI is working * Improved the create form and copy * Tokens are a bit shorter and only lowercase * API endpoint for creating AuthorizationCodes and the web page users hit to create PATs from them * V3_ENABLED env var and hook that can be used in the UI to show/hide things * API route to get a PAT (within 10 mins of creating an auth code). Moved some code to core * Start to build the login command * Nicer banner when starting the CLI * Nicer update checking * Update command style improved * Removed the template step * Login command options are now working * The new CLI is logging in using the Personal Access TOken. But I need to save it still * Logging in and saving the token is working * Deal with already being logged in * Who Am I working with PAT * Deleted old account side menu header * Improved the copy on the Auth code page * Added docs for the login and whoami commands * Added readme instructions for the update command * Removed some unused things * Remove fetchUseProxy for now
52 lines
1.8 KiB
Markdown
52 lines
1.8 KiB
Markdown
# Trigger.dev CLI
|
|
|
|
A CLI that allows you to create, run locally and deploy Trigger.dev background tasks.
|
|
|
|
Note: this only works with Trigger.dev v3 projects and later. For older projects use the [@trigger.dev/cli](https://www.npmjs.com/package/@trigger.dev/cli) package.
|
|
|
|
Trigger.dev is an open source platform that makes it easy to create event-driven background tasks directly in your existing project.
|
|
|
|
## Usage
|
|
|
|
### Login
|
|
|
|
Logs that machine into Trigger.dev by creating a new Personal Access Token and storing it on the local machine. Once you're logged in you can perform the other actions below.
|
|
|
|
```sh
|
|
npx trigger.dev@latest login
|
|
```
|
|
|
|
| Option | Short option | Description |
|
|
| ----------- | ------------ | -------------------------------------------------------------------- |
|
|
| `--api-url` | `-a` | Set the API URL for Trigger.dev, defaults to https://api.trigger.dev |
|
|
|
|
### Update
|
|
|
|
Will update all of your @trigger.dev packages in your package.json to the latest version.
|
|
|
|
```sh
|
|
npx trigger.dev@latest update
|
|
```
|
|
|
|
You can pass the path to the folder that your package.json file lives in:
|
|
|
|
```sh
|
|
npx trigger.dev@latest update ./myapp
|
|
```
|
|
|
|
| Option | Short option | Description |
|
|
| ------ | ------------ | ---------------------------------------------------------- |
|
|
| `--to` | `-t` | The version to update to (ex: 2.1.4), defaults to "latest" |
|
|
|
|
### Who Am I?
|
|
|
|
Shows the current user that is logged in.
|
|
|
|
```sh
|
|
npx trigger.dev@latest whoami
|
|
```
|
|
|
|
| Option | Short option | Description |
|
|
| ----------- | ------------ | -------------------------------------------------------------------- |
|
|
| `--api-url` | `-a` | Set the API URL for Trigger.dev, defaults to https://api.trigger.dev |
|