aws-amplify / aws-amplify/amplify-cli

[DX issue] Command Flags or Configuration Files for Amplify Init and Skip Wizard Hell 🧙🔥

Open
#11,775 6 comments 1 reaction 1 assignee Claimed by @josefaidt View on GitHub
documentation p3 platform
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Amplify CLI Version

10.6.1

### Question

Can I just skip the wizard hell by supplying command flags and either a configuration file?

## What is Wizard Hell?

Wizard hell is where your only option for configuration is through a CLI Wizard
If you mess up, you have to start over again, doing multiple passes through the wizard.

## How to escape Wizard Hell?

Provide alternative options to input configuration such as command flags

```sh
amplify init \
--project-name="myproject"
--environment="development"
--default-editor="dev"
--javascript-framework="react"
--aws-profile="cruddur"
...
```

Provide the option to supply a configuration file such as a json or yaml file:
```sh
amplify init --json-file init.yml
```

## Counter-Argument "But if you supply a configuration file, why not just write the configuration file the CLI is going to output"

Well, to be honest, I don't know what the CLI commands generate out, if this was better documented in the Amplify CLI command reference pages.

## Discovering the Amplify CLI commands page

The main readme of the repo shows a summary of Amplify CLI commands; it would be great if these linked to their respective page/anchor in the docs that full expand on the documentation:
Screen Shot 2023-01-13 at 11 09 22 AM

## Amplify CLI not well documented

Take a look at the Amplify Init command in the website documentation, it doesn't tell you what its generating but I can see four files being created:
- amplify/cli.json
- amplify/team-provider-info.json
- amplify/project-config.json
- amplify/backend-config.json

https://docs.amplify.aws/cli/start/workflows/#amplify-init

Screen Shot 2023-01-13 at 11 15 29 AM

## Considerations

While I'm talking about the Amplify Init command, I think this could be applied to all the CLI commands.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.