JanssenProject / JanssenProject/jans

feature(config-cli): Improve config CLI help content structure

Open
#7,694 0 comments 0 reactions 1 assignee Claimed by @devrimyatar View on GitHub
kind-feature needs-discussion
Dominant language
Java
Stars
647
Forks
173
Avg merge
1d 18h
Merged PRs (30d)
110

Description

Can we think about organizing the content of config CLI help in a better more structured way?

Currently `/opt/jans/jans-cli/config-cli.py --help` gives out help content in the following manner.

![image](https://github.com/JanssenProject/jans/assets/343411/68babe96-9f8c-4c4e-875e-76a870302ee3)

This is very hard to read and even harder to understand.

Some of the examples of CLIs with better-structured help would be: `GitHub CLI` and `docker`. Their CLI outputs are as shown below:

- GitHub CLI:

```
root@jans-ubuntu22:~# gh
Work seamlessly with GitHub from the command line.

USAGE
gh [flags]

CORE COMMANDS
auth: Authenticate gh and git with GitHub
browse: Open the repository in the browser
codespace: Connect to and manage codespaces
gist: Manage gists
issue: Manage issues
org: Manage organizations
pr: Manage pull requests
project: Work with GitHub Projects.
release: Manage releases
repo: Manage repositories

GITHUB ACTIONS COMMANDS
cache: Manage Github Actions caches
run: View details about workflow runs
workflow: View details about GitHub Actions workflows

ALIAS COMMANDS
co: Alias for "pr checkout"

```

- Docker

```
dhaval@thinkpad:~$ docker

Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
run Create and run a new container from an image
exec Execute a command in a running container
ps List containers
build Build an image from a Dockerfile
pull Download an image from a registry
push Upload an image to a registry
images List images
login Log in to a registry
logout Log out from a registry
search Search Docker Hub for images
version Show the Docker version information
info Display system-wide information

Management Commands:
builder Manage builds
buildx* Docker Buildx (Docker Inc., v0.12.1)
compose* Docker Compose (Docker Inc., v2.24.5)
container Manage containers
context Manage contexts
image Manage images
manifest Manage Docker image manifests and manifest lists
network Manage networks
plugin Manage plugins
scan* Docker Scan (Docker Inc., v0.23.0)
system Manage Docker
trust Manage trust on Docker images
volume Manage volumes

Swarm Commands:
swarm Manage Swarm

Commands:
attach Attach local standard input, output, and error streams to a running container
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
```

Also, notice that the user doesn't have to use `--help` option. If there are no arguments specified, it shows help by default. :magic_wand:

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.