Skip to content

Commit

Permalink
changed the docs to use npx prefix (#6812)
Browse files Browse the repository at this point in the history
  • Loading branch information
renebrandel authored Jan 24, 2024
1 parent edbcf70 commit d9bf316
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/pages/gen2/reference/cli-commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This page serves as a reference for commands found in the [`@aws-amplify/backend

All commands can be prefixed with [AWS CLI environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html#envvars-list) to change the AWS account behavior with Amplify (Gen 2) commands.

## amplify sandbox
## npx amplify sandbox

Sandbox enables you to develop your backend alongside your frontend's development server. This command will automatically watch for changes in `amplify/`, and redeploy each time you save a file. Run `npx amplify sandbox` to deploy to your personal cloud sandbox.

Expand All @@ -43,15 +43,15 @@ Sandbox enables you to develop your backend alongside your frontend's developmen
<SubCommandHeading parentCommand="amplify-sandbox">Usage</SubCommandHeading>

```bash
amplify sandbox
npx amplify sandbox
```

#### Use with an alternate profile

You can use the `--profile` flag to run sandbox with an AWS profile other than `default`:

```bash
amplify sandbox --profile my-other-profile
npx amplify sandbox --profile my-other-profile
```

Additionally, you can use AWS CLI environment variables to specify a different profile:
Expand Down Expand Up @@ -87,7 +87,7 @@ amplify sandbox --config-format json-mobile
amplify sandbox --config-format dart --config-out-dir lib
```

## amplify sandbox delete
## npx amplify sandbox delete

Delete your personal cloud sandbox. This should only be used if you have an active cloud sandbox that you opted to _not_ delete when exiting `npx amplify sandbox`.

Expand All @@ -100,10 +100,10 @@ Delete your personal cloud sandbox. This should only be used if you have an acti
<SubCommandHeading parentCommand="amplify-sandbox-delete">Usage</SubCommandHeading>

```bash
amplify sandbox delete
npx amplify sandbox delete
```

## amplify sandbox secret
## npx amplify sandbox secret

Manage backend secrets used with your personal cloud sandbox.

Expand All @@ -114,15 +114,15 @@ Manage backend secrets used with your personal cloud sandbox.
<SubCommandHeading parentCommand="amplify-sandbox-secret">Usage</SubCommandHeading>

```bash
amplify sandbox secret
npx amplify sandbox secret
```

#### Using with an alternate AWS profile

You can use the `--profile` flag to run sandbox with an AWS profile other than `default`:

```bash
amplify sandbox secret list --profile my-other-profile
npx amplify sandbox secret list --profile my-other-profile
```

Additionally, you can use AWS environment variables to specify a different profile:
Expand All @@ -136,7 +136,7 @@ AWS_PROFILE=my-other-profile amplify sandbox secret list
Create secrets for use with your personal cloud sandbox by using `sandbox secret set`:

```bash
amplify sandbox secret set LOGINWITHAMAZON_CLIENT_ID
npx amplify sandbox secret set LOGINWITHAMAZON_CLIENT_ID
```

This is how you configure secrets to be retrieved and used within your backend using `secret()`.
Expand All @@ -146,15 +146,15 @@ This is how you configure secrets to be retrieved and used within your backend u
If you want to remove a secret you previously set, use `sandbox secret remove`:

```bash
amplify sandbox secret remove LOGINWITHAMAZON_CLIENT_ID
npx amplify sandbox secret remove LOGINWITHAMAZON_CLIENT_ID
```

#### Listing secrets

List all available secrets for your personal sandbox in the default AWS profile and Region:

```bash
amplify sandbox secret list
npx amplify sandbox secret list
```

#### Get a secret and view its details
Expand All @@ -169,23 +169,23 @@ amplify sandbox secret get LOGINWITHAMAZON_CLIENT_ID
lastUpdated: Fri Nov 17 2023 12:00:00 GMT-0800 (Pacific Standard Time)
```

## amplify generate
## npx amplify generate

Generate is not intended to be used standalone; however, it does offer a few subcommands to generate information or code that is supplemental to your frontend development.

Each of the following `generate` subcommands require either a CloudFormation stack name or an existing Amplify App ID and corresponding git branch:

```bash
# with CloudFormation stack name
amplify generate <subcommand> --stack <cloudformation-stack-name>
npx amplify generate <subcommand> --stack <cloudformation-stack-name>
```

```bash
# with Amplify App ID and git branch
amplify generate <subcommand> --app-id <app-id> --branch <git-branch-name>
npx amplify generate <subcommand> --app-id <app-id> --branch <git-branch-name>
```

## amplify generate config
## npx amplify generate config

Generate the client configuration file (such as `amplifyconfiguration.json`) for your frontend application to consume. This is intended to be used to manually generate a configuration file for an environment other than your personal cloud sandbox. For example, you might use it if you would like to verify something your coworker is seeing in their cloud sandbox, or to demonstrate frontend changes locally using a pre-existing "staging" branch.

Expand All @@ -202,24 +202,24 @@ In addition to the required options noted in [`amplify generate`](#amplify-gener
As mentioned above, you can specify a team member's cloud sandbox CloudFormation stack:

```bash
amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b
npx amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b
```

#### Use with mobile applications

Similar to `sandbox`, you can specify an alternate configuration file format by using `--format`:

```bash
amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b --format json-mobile
npx amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b --format json-mobile
```

## amplify generate graphql-client-code
## npx amplify generate graphql-client-code

Generate GraphQL statements for your frontend application to consume.

{/* @TODO */}

## amplify generate forms
## npx amplify generate forms

Generate React form components derived from your backend data models for your frontend application to consume.

Expand Down

0 comments on commit d9bf316

Please sign in to comment.