diff --git a/src/pages/gen2/reference/cli-commands/index.mdx b/src/pages/gen2/reference/cli-commands/index.mdx index 39b12ee57f5..d6ef6676ba1 100644 --- a/src/pages/gen2/reference/cli-commands/index.mdx +++ b/src/pages/gen2/reference/cli-commands/index.mdx @@ -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. @@ -43,7 +43,7 @@ Sandbox enables you to develop your backend alongside your frontend's developmen Usage ```bash -amplify sandbox +npx amplify sandbox ``` #### Use with an alternate profile @@ -51,7 +51,7 @@ amplify sandbox 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: @@ -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`. @@ -100,10 +100,10 @@ Delete your personal cloud sandbox. This should only be used if you have an acti Usage ```bash -amplify sandbox delete +npx amplify sandbox delete ``` -## amplify sandbox secret +## npx amplify sandbox secret Manage backend secrets used with your personal cloud sandbox. @@ -114,7 +114,7 @@ Manage backend secrets used with your personal cloud sandbox. Usage ```bash -amplify sandbox secret +npx amplify sandbox secret ``` #### Using with an alternate AWS profile @@ -122,7 +122,7 @@ amplify sandbox secret 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: @@ -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()`. @@ -146,7 +146,7 @@ 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 @@ -154,7 +154,7 @@ amplify sandbox secret remove LOGINWITHAMAZON_CLIENT_ID 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 @@ -169,7 +169,7 @@ 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. @@ -177,15 +177,15 @@ Each of the following `generate` subcommands require either a CloudFormation sta ```bash # with CloudFormation stack name -amplify generate --stack +npx amplify generate --stack ``` ```bash # with Amplify App ID and git branch -amplify generate --app-id --branch +npx amplify generate --app-id --branch ``` -## 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. @@ -202,7 +202,7 @@ 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 @@ -210,16 +210,16 @@ amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b 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.