aws-amplify / aws-amplify/amplify-cli
add new command `info` to capture environment details for local debugging
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Is this related to a new or existing Amplify category?
New category
### Is this related to another service?
_No response_
### Describe the feature you'd like to request
Request for new command, `info`, to be added which will capture customer's environment details with a single command. It would be useful to capture everything relevant to CLI and JS, such as the following:
- OS info and version
- Amplify CLI Version
- how Amplify CLI was installed (curl, npm, yarn, pnpm, etc)
- Node.js version & installation path (path is helpful for determining installation issues)
- Java version (only required for Mock-related issues)
- Python version
- globally installed npm packages (Amplify-related, with packaged CLI this may no longer be necessary)
- current resource categories added to Amplify project (e.g. GraphQL API, Authentication, Lambda)
- history of Amplify CLI command execution
Currently the amplify-js team uses the following command to capture some of these details:
```sh
npx envinfo --system --binaries --browsers --npmPackages --duplicates --npmGlobalPackages
```
For inspiration and reference, Gatsbyjs [has an `info` command](https://www.gatsbyjs.com/docs/reference/gatsby-cli/#info) that captures relevant information for reporting bugs.
Sample `npx gatsby info` output:
```sh
System:
OS: macOS 11.3
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Shell: 3.2.2 - /usr/local/bin/fish
Binaries:
Node: 16.4.1 - ~/.nvm/versions/node/v16.4.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.19.1 - ~/.nvm/versions/node/v16.4.1/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 90.0.4430.93
Edge: 91.0.864.64
Firefox: 89.0
Safari: 14.1
```
### Describe the solution you'd like
New command to output relevant environment information
```
amplify info
```
Perhaps with an optional `--clipboard` flag to copy to clipboard, similar to the analogous Gatsbyjs command
### Describe alternatives you've considered
n/a
### Additional context
This command can act as a "one-stop-shop" for capturing relevant information of the customer's environment to ultimately reduce Q&A during triage, reduce size of bug template (can be reduced to "paste the output of this command..."), and streamline capturing details for Discord communications.
### Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change
Contributor guide
Assessment
This issue has not been assessed yet.