Skip to content
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

[Feature] CLI Documentation FORMAT #4215

Open
xeruf opened this issue Dec 27, 2023 · 6 comments
Open

[Feature] CLI Documentation FORMAT #4215

xeruf opened this issue Dec 27, 2023 · 6 comments
Labels
feature New feature or request

Comments

@xeruf
Copy link
Contributor

xeruf commented Dec 27, 2023

Describe the feature or change in detail

Many CLI commands have an optional [FORMAT] parameter, but I could never find out how to use that. Some general usage instructions would be highly appreciated.

Would you like to sponsor this feature to have it implemented?

No

@xeruf xeruf added the feature New feature or request label Dec 27, 2023
@Skamasle
Copy link
Contributor

Skamasle commented Dec 28, 2023

Format is that, just a format of output, as I rember this only can be in normal output, plain, json and csv

for test user:

v-list-user test csv
v-list-user test json
v-list-user test plain
v-list-user test

v-list-user test
USERNAME: test
FULL NAME:
EMAIL: test@test.com
LANGUAGE:
THEME:
SUSPENDED: no
PACKAGE: default
SHELL: nologin
WEB DOMAINS: 0/unlimited
WEB ALIASES: 0/unlimited
DNS DOMAINS: 0/unlimited
DNS RECORDS: 0/unlimited
MAIL DOMAINS: 0/unlimited
MAIL ACCOUNTS: 0/unlimited
BACKUPS: 0/1
DATABASES: 0/unlimited
CRON_JOBS: 0/unlimited
DISK: 0/unlimited
BANDWIDTH: 0/unlimited
IP ADDRESSES 1/0
TIME: 15:33:33
DATE: 2023-12-28`

v-list-user test json
{
"test": {
"NAME": "",
"PACKAGE": "default",
"WEB_TEMPLATE": "default",
"BACKEND_TEMPLATE": "default",
"PROXY_TEMPLATE": "default",
"DNS_TEMPLATE": "default",
"WEB_DOMAINS": "unlimited",
"WEB_ALIASES": "unlimited",
"DNS_DOMAINS": "unlimited",
"DNS_RECORDS": "unlimited",
"MAIL_DOMAINS": "unlimited",
"MAIL_ACCOUNTS": "unlimited",
"DATABASES": "unlimited",
"CRON_JOBS": "unlimited",
"DISK_QUOTA": "unlimited",
"BANDWIDTH": "unlimited",
"HOME": "/home/test",
"NS": "ns1.test.com,ns2.test.com",
"SHELL": "nologin",
"BACKUPS": "1",
"CONTACT": "test@test.com",
"CRON_REPORTS": "yes",
"RKEY": "RktINCxso9lyjn86",
"TWOFA": "",
"QRCODE": "",
"ROLE": "user",
"SUSPENDED": "no",
"SUSPENDED_USERS": "0",
"SUSPENDED_WEB": "0",
"SUSPENDED_DNS": "0",
"SUSPENDED_MAIL": "0",
"SUSPENDED_DB": "0",
"SUSPENDED_CRON": "0",
"IP_AVAIL": "1",
"IP_OWNED": "0",
"U_USERS": "5",
"U_DISK": "0",
"U_DISK_DIRS": "0",
"U_DISK_WEB": "0",
"U_DISK_MAIL": "0",
"U_DISK_DB": "0",
"U_BANDWIDTH": "0",
"U_WEB_DOMAINS": "0",
"U_WEB_SSL": "0",
"U_WEB_ALIASES": "0",
"U_DNS_DOMAINS": "0",
"U_DNS_RECORDS": "0",
"U_MAIL_DOMAINS": "0",
"U_MAIL_DKIM": "0",
"U_MAIL_ACCOUNTS": "0",
"U_DATABASES": "0",
"U_CRON_JOBS": "0",
"U_BACKUPS": "0",
"LANGUAGE": "",
"THEME": "",
"NOTIFICATIONS": "no",
"PREF_UI_SORT": "name",
"LOGIN_DISABLED": "no",
"LOGIN_USE_IPLIST": "no",
"LOGIN_ALLOW_IPS": "",
"PHPCLI": "",
"TIME": "15:33:33",
"DATE": "2023-12-28"
}
}

v-list-user test plain
test default default default default default unlimited unlimited unlimited unlimited unlimited unlimited unlimited unlimited unlimited unlimited ns1.test.com,ns2.test.com /home/test nologin 1 test@test.com yes RktINCxso9lyjn86 no 0 0 0 0 0 0 1 0 5 0 000 0 0 0 0 0 0 0 0 0 0 0 0 0 15:33:33 2023-12-28

@jaapmarcus
Copy link
Member

There are a few changes / exceptions ....

v-list-users also accept "list" as option that return a list o all the users

And some functions don't have support for csv ...

@Aartsie
Copy link
Contributor

Aartsie commented Jan 5, 2024

I agree with @xeruf that it would be helpful and easier when the format options are shown/listed in the docs.

This weekend I have some spare time and can start to add them.

@xeruf
Copy link
Contributor Author

xeruf commented Jan 7, 2024

Thanks, this general overview already helped a lot - I thought it was something like printf where I could specify which fields to return.

@ev0net
Copy link
Contributor

ev0net commented Jan 26, 2024

I have a stalled out pull request from 3 months about improving the cli docs here: ongoing doc updates
#4110 including documentation about FORMAT

Hoping to eventually get @jaapmarcus on board with an easy, regular workflow of document improvements. I'm not putting any more work into it until that gets established. If @xeruf @Aartsie @Skamasle would like to collaborate, that would be much better than me trying to do this myself. The branch is here:

https://github.com/ev0net/hestiacp/tree/doc/evonet-ongoing-doc-updates

@xeruf
Copy link
Contributor Author

xeruf commented Feb 16, 2024

I have no problem contributing to docs from time to time as I figure stuff out myself as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants