Command line
Learn which command-line options Gruxi supports.
To get the command-line options currently supported by Gruxi, you can use:
gruxi --helpGet the current version:
gruxi --versionCommand line arguments
Gruxi supports various command-line arguments to control its behavior and configuration.
Controlling operation mode
Gruxi operation mode controls the level of logging and debugging information generated at runtime. Different modes can be set to optimize for development or production environments. Production mode is the default, and the selected mode is stored in the database. Operation mode can be changed in two ways: from the admin portal menu or by using a command-line option.
Available operation modes:
ULTIMATE: Ultimate mode with no request/response logging for optimal performance.PRODUCTION: Production mode with minimal logging for high performance.DEBUG: Development mode with debug logging for debugging purposes.DEV: Development mode with trace level logging for development purposes.
You can set the operation mode directly from the command line when starting Gruxi, by using the -o or --opmode argument followed by the desired mode.
Examples:
gruxi -o PRODUCTIONgruxi --opmode DEVThis will start Gruxi in the specified operation mode, overriding the mode set in the database for that session. It can still be changed from the admin portal when running, even after being set on the command line.
Exporting the current configuration
You can use the command line to export the current configuration to a file for backup or transfer purposes. The configuration is exported to the specified file path in JSON format.
Examples:
gruxi -e my_config.jsongruxi --export-conf ./config/my_config.jsonImporting a configuration
You can use the command line to import a configuration from a file. This is useful for restoring a backup or transferring settings from another Gruxi instance.
Examples:
gruxi -i my_config.jsongruxi --import-conf ./config/my_config.jsonValidating a configuration
Before importing a configuration, you can validate it to ensure it is correctly formatted and contains no errors. This helps prevent issues when applying the configuration to Gruxi.
Examples:
gruxi --validate-conf my_config.jsonReset admin password
The password for user admin can be reset using the command line if it was forgotten or needs to be changed. The new password will be displayed in the console output after running the command.
Examples:
gruxi --reset-admin-passwordDisable admin portal
You can disable the admin portal using the command line for security or other reasons. This prevents access to the admin interface. To enable it again, restart the Gruxi service without the --disable-admin-portal option.
Examples:
gruxi --disable-admin-portal