Skip to content

Commit

Permalink
ref: Add --project and --org args to help message and update read…
Browse files Browse the repository at this point in the history
…me (#679)

Add the `project` and `org` CLI args to the `--help` message.
update the outdated readme with all current CLI args and reformats the previous CLI output into a table
  • Loading branch information
Lms24 authored Sep 27, 2024
1 parent 7ed2c93 commit 31afbfc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- feat: Add `--saas` CLI arg to skip self-hosted or SaaS selection step (#678)
- ref: Add `--project` and `--org` args to help message and update readme (#679)

## 3.31.0

Expand Down
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,24 @@ At the current moment, the wizard is meant to be used for React Native, Cordova,

# Options

```
Options:
--help Show help [boolean]
--version Show version number [boolean]
--debug Enable verbose logging
env: SENTRY_WIZARD_DEBUG [boolean]
--uninstall Revert project set up process
env: SENTRY_WIZARD_UNINSTALL [boolean]
--skip-connect Skips the connection to the server
env: SENTRY_WIZARD_SKIP_CONNECT [boolean]
--quiet Do not fallback to prompting user asking questions
env: SENTRY_WIZARD_QUIET [boolean]
-i, --integration Choose the integration to set up
env: SENTRY_WIZARD_INTEGRATION
[choices: "reactNative", "cordova", "electron", "nextjs"]
-p, --platform Choose platform(s)
env: SENTRY_WIZARD_PLATFORM
[array] [choices: "ios", "android"]
-u, --url The url to your Sentry installation
env: SENTRY_WIZARD_URL [default: "https://sentry.io/"]
-s, --signup Redirect to signup page if not logged in
Use if don't have a Sentry account [boolean]
```
The following CLI arguments are available:

| Option | Description | Type | Default | Choices | Environment Variable |
| --------------------- | ----------------------------------------------------------------- | ------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------- |
| `--help` | Show help | boolean | | | |
| `--version` | Show version number | boolean | | | |
| `--debug` | Enable verbose logging | boolean | `false` | | `SENTRY_WIZARD_DEBUG` |
| `--uninstall` | Revert project setup process. Not available for all integrations. | boolean | `false` | | `SENTRY_WIZARD_UNINSTALL` |
| `--skip-connect` | Skips the connection to the server | boolean | `false` | | `SENTRY_WIZARD_SKIP_CONNECT` |
| `--quiet` | Do not fallback to prompting user asking questions | boolean | `false` | | `SENTRY_WIZARD_QUIET` |
| `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "ios", "android", "cordova", "electron", "nextjs", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
| `-p, --platform` | Choose platform(s) | array | Select platform(s) during setup | "ios", "android" | `SENTRY_WIZARD_PLATFORM` |
| `-u, --url` | The URL to your Sentry installation | string | `https://sentry.io` | | `SENTRY_WIZARD_URL` |
| `--project` | The Sentry project slug to use | string | Select project during setup | | |
| `--org` | The Sentry org slug to use | string | Select org during setup | | |
| `--saas` | Skip the self-hosted or SaaS URL selection process | boolean | Select self-hosted or SaaS during setup | | |
| `-s, --signup` | Redirect to signup page if not logged in | boolean | `false` | | |
| `--disable-telemetry` | Don't send telemetry data to Sentry | boolean | `false` | | |

## Resources

Expand Down
15 changes: 14 additions & 1 deletion bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,22 @@ const argv = yargs(hideBin(process.argv))
alias: 'url',
describe: 'The url to your Sentry installation\nenv: SENTRY_WIZARD_URL',
})
.option('project', {
type: 'string',
describe: 'The Sentry project slug to use',
defaultDescription: 'Select project during setup',
default: undefined,
})
.option('org', {
type: 'string',
describe: 'The Sentry org slug to use',
defaultDescription: 'Select org during setup',
default: undefined,
})
.option('saas', {
default: false,
describe: 'If set, skip the self-hosted or SaaS URL selection process',
describe: 'Skip the self-hosted or SaaS URL selection process',
defaultDescription: 'Select self-hosted or SaaS during setup',
type: 'boolean',
})
.option('s', {
Expand Down

0 comments on commit 31afbfc

Please sign in to comment.