From 21ba9e6d72ed8dfdcd86f501cf2b6e1dd27f1e0b Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Sun, 4 Jan 2026 15:22:01 +0800 Subject: [PATCH] doc: update admin CLI (#12413) ### What problem does this PR solve? `SHOW VERSION;` - Display the current RAGFlow version. `GRANT ADMIN ` - Grant administrator privileges to the specified user. `REVOKE ADMIN ` - Revoke administrator privileges from the specified user. `LIST VARS` - List all system configurations and settings. `SHOW VAR ` - Display the content of a specific system configuration/setting by its name or name prefix. `SET VAR ` - Set the value for a specified configuration item. related to: #12409 ### Type of change - [x] Documentation Update Signed-off-by: Jin Hai --- docs/guides/admin/admin_cli.md | 103 +++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/docs/guides/admin/admin_cli.md b/docs/guides/admin/admin_cli.md index 8123473a2..387e66853 100644 --- a/docs/guides/admin/admin_cli.md +++ b/docs/guides/admin/admin_cli.md @@ -103,6 +103,32 @@ Commands are case-insensitive and must be terminated with a semicolon(;). - Lists the agents associated with the specified user. - [Example](#example-list-agents-of-user) +### System info + +`SHOW VERSION;` +- Display the current RAGFlow version. +- [Example](#example-show-version) + +`GRANT ADMIN ` +- Grant administrator privileges to the specified user. +- [Example](#example-grant-admin) + +`REVOKE ADMIN ` +- Revoke administrator privileges from the specified user. +- [Example](#example-revoke-admin) + +`LIST VARS` +- List all system configurations and settings. +- [Example](#example-list-vars) + +`SHOW VAR ` +- Display the content of a specific system configuration/setting by its name or name prefix. +- [Example](#example-show-var) + +`SET VAR ` +- Set the value for a specified configuration item. +- [Example](#example-set-var) + ### Meta-Commands - \? or \help @@ -340,6 +366,83 @@ Listing all agents of user: lynn_inf@hotmail.com +-----------------+-------------+------------+-----------------+ ``` + + +- Display the current RAGFlow version. + +``` +admin> show version; +show_version ++-----------------------+ +| version | ++-----------------------+ +| v0.23.1-24-g6f60e9f9e | ++-----------------------+ +``` + + + +- Grant administrator privileges to the specified user. + +``` +admin> grant admin "anakin.skywalker@ragflow.io"; +Grant successfully! +``` + + + +- Revoke administrator privileges from the specified user. + +``` +admin> revoke admin "anakin.skywalker@ragflow.io"; +Revoke successfully! +``` + + + +- List all system configurations and settings. + +``` +admin> list vars; ++-----------+---------------------+--------------+-----------+ +| data_type | name | setting_type | value | ++-----------+---------------------+--------------+-----------+ +| string | default_role | config | user | +| bool | enable_whitelist | config | true | +| string | mail.default_sender | config | | +| string | mail.password | config | | +| integer | mail.port | config | 15 | +| string | mail.server | config | localhost | +| integer | mail.timeout | config | 10 | +| bool | mail.use_ssl | config | true | +| bool | mail.use_tls | config | false | +| string | mail.username | config | | ++-----------+---------------------+--------------+-----------+ +``` + + + +- Display the content of a specific system configuration/setting by its name or name prefix. + +``` +admin> show var mail.server; ++-----------+-------------+--------------+-----------+ +| data_type | name | setting_type | value | ++-----------+-------------+--------------+-----------+ +| string | mail.server | config | localhost | ++-----------+-------------+--------------+-----------+ +``` + + + +- Set the value for a specified configuration item. + +``` +admin> set var mail.server 127.0.0.1; +Set variable successfully +``` + + - Show help information.