[improve][CLI] show environment variables in CLI and optimize them to `--config-file` argument
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Motivation
I've separated the code improvements from https://github.com/apache/pulsar/issues/19492 (created by @visortelle) and discussed them with @codelipenghui as below.
### 1. Show `enviroment variables` for `pulsar-admin` and `pulsar-client` on CLI
Contexts:
I've double-checked the current behavior:
- `pulsar-perf -help` shows `environment variables`

- while `pulsar-admin -help` and `pulsar-client` do not show `environment variables`


To give users complete info,`environment variables` should be shown on `pulsar-admin` and `pulsar-client` CLI as well.
### 2. Implement `--config-file CLI` argument instead of `environment variables`.
@visortelle has explained it in https://github.com/apache/pulsar/issues/19492
### Solution
_No response_
### Alternatives
_No response_
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by comparing the help output of the mentioned pulsar-perf, pulsar-admin, and pulsar-client CLI entry points, and read the referenced issue 19492 for the config-file requirements. Done means pulsar-admin and pulsar-client show their environment variables and support the requested --config-file argument.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100