-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Headless" mode of Amplify CLI is not an idiomatic developer experience #6258
Comments
@jamesonwilliams Understand the concern here, but having |
Thanks @kaustavghosh06 for the very speedy reply.
I don't think there are this many, in practice. Definitely not this many required inputs. Even so, most robust Linux utilities absolutely have scores of options. Look at For this init workflow, the interactive mode collects 6 pieces of information from me. However, the CLI can already detect reasonable defaults for almost all of them: ? Enter a name for the project HostedUITesting
? Enter a name for the environment mymacbook
? Choose your default editor: Vim (via Terminal, Mac OS only)
? Choose the type of app that you're building android
Please tell us about your project
? Where is your Res directory: app/src/main/res So, I would expect the non-interactive mode to use those defaults, and give me the option to override them. In other words, if I run this command in an Android project, the CLI should apply the defaults above, that I just clicked through anyway. amplify init --yes . To override these options, I should be able to do like: amplify init --yes \
--project-name 'HostedUITesting' \
--environment-name 'dev' \
--default-editor "$(which vim)" \
--app-type 'android' \
--android-res-dir 'app/src/main/res' ^ ( A user would be able to mix and match these optional flags in most any combination, applying some, none, or all. |
Are there any updates on this? I'm trying to sort out a build script that pulls the latest environment changes but I'm having trouble working out the Android params I've had a look through https://docs.amplify.aws/cli/usage/headless/#amplify-pull-parameters and have been able to pull the right environment but it is generating the javascript models, not android, and the documentation isn't clear enough. The documentation needs to at least display what the options are for each parameter EDIT: I've managed to do it now by running amplify pull, going through the menu and then building the script from the amplify/.config files. Just leaving this here in case anyone else gets stuck making a headless script for anything but react in vs code. |
This software is truly just such a remarkable spectacle, lol. Closing some old tickets. You guys are fun. |
I totally agree. |
Today I recalled that some work had gone in to support a non-interactive mode in the Amplify CLI. I went about trying to use it.
I was expecting a DX like:
Or, at worst:
However, as seen in this doc, the option arguments take JSON blobs. Here's a snapshot, for reference:
I've never seen a single command line tool like this.
Having the support above does achieve a ground floor functionality to enable automated invocations of the Amplify CLI from a shell script file.
However, it's a counter-intuitive and non-idiomatic developer experience, that is very brittle to use as a human, as a command-line-only interface.
The text was updated successfully, but these errors were encountered: