Command Line Interface¶
Use the Emakin agent command-line interface when you need to install services, set protected configuration values, start selected modules manually, or run diagnostic and maintenance commands. By default, the agent is usually configured to run as a Windows service or daemon, but it can also be started in CLI mode.
When to Use CLI Mode¶
CLI mode is mainly useful for:
- initial installation and service registration
- protected configuration updates
- targeted startup for web, agent, SMTP, or full-text modules
- maintenance and diagnostics
Note: Some commands are operating-system specific and may not be available on every deployment target.
Command Groups¶
Commands¶
help¶
Print the available list of commands. Some options depend on the operating system and are only shown when supported.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
Installation Commands¶
install¶
Installs the agent as a Windows service. Only available on Windows.
1 | |
uninstall¶
Uninstalls the Windows service. Only available on Windows.
1 | |
basex¶
Installs the BaseX service as a Windows service. Only available on Windows.
1 | |
ubasex¶
Uninstalls the BaseX Windows service. Only available on Windows.
1 | |
redis¶
Installs Redis as a Windows service. Only available on Windows.
1 | |
uredis¶
Uninstalls the Redis Windows service. Only available on Windows.
1 | |
Configuration Commands¶
setconfig¶
Sets a configuration setting in encrypted form.
1 | |
By default, configuration parameters are stored in plain-text JSON files, but sensitive settings such as database connection strings can be encrypted. Encrypted settings are stored in the following path and override earlier configuration layers:
<installdir>/Configuration/Data/protectedsettings.json
Warning
Encrypted configuration settings can be written but cannot be read back. If this file is lost, the stored values cannot be recovered from it.
For example, the database connection string can be set with;
1 | |
After this command runs, a new protectedsettings.json file is created in Configuration/Data and stores the encrypted connection string.
1 2 3 | |
Any configuration value from <installdir>/appsettings.json can be set with setconfig, and child sections can be addressed with the : separator.
1 | |
registerstore¶
Registers a new data store to be shared across all tenants.
1 | |
applicationName specifies the host application and storeName specifies the new store name. The shared data store name must begin with the PS_ prefix.
1 | |
If you also provide a process definition path, all tables defined in that process are created in the new store. If the path is omitted, a blank data store is created.
1 | |
Agent Commands¶
start¶
Starts the agent in console mode with all modules active.
1 | |
web¶
Starts only the web server components. Other services such as background jobs or SMTP are not started.
1 | |
agent¶
Starts only the agent components. The web server and SMTP services are not started.
1 | |
smtp¶
Starts only the SMTP service mode.
1 | |
fulltext¶
Starts only the full-text service mode.
1 | |
Maintenance Commands¶
cleanup¶
Executes the cleanup tasks.
1 | |
Warning
This is a destructive command and cleanup actions cannot be reverted. Use it with caution.
The cleanup action performs the following tasks:
- Deletes orphan records in domain membership tables:
- orphan group members
- orphan organisation unit positions
- orphan organisation unit position members
- orphan user logins
- Optimises all tenant full-text databases.
- Optimises the application's full-text database.
- Backs up orphan XML databases and removes them from the database.
- Deletes orphan form data.
fslist¶
Exports file paths from a configured file repository into a CSV file.
1 | |
applicationName specifies the host application and repositoryName specifies one of the configured FileRepositories for that application.
The exported CSV file always contains the following header:
1 | |
FullPath contains the full storage path, Size contains the file size, and DestinationFullPath is left blank so the file can be reused later with fsmove.
When path is omitted, the command lists the repository from the root path. recursive is optional and defaults to false. Values such as true, yes, and 1 enable recursive listing.
1 | |
1 | |
Note
This command depends on the selected file repository provider supporting path-based listing. Providers that do not implement this feature return a not supported error.
fsmove¶
Moves file paths in a configured file repository by reading a CSV file.
1 | |
Before running the command, populate the DestinationFullPath column in a CSV file created by fslist.
1 2 3 | |
Rows with identical source and destination paths are skipped. If one or more rows fail, processing continues for the remaining rows and the command finishes with an error after printing a summary.
1 | |
Warning
This is a destructive command. After a successful move, the original source path is deleted from the repository.
fulltextmerge¶
Executes the full-text merge operation on the active full-text service to optimise the database.
1 | |
This command can take a long time depending on the number of records and may cause performance degradation during live use.
fulltextlist¶
Lists the currently defined full-text catalog database names.
1 | |
Database names are listed as plain text.
1 2 3 4 | |
fulltextdump¶
Executes a full-text search and dumps the result to the console for diagnostics.
1 | |
This command is used to inspect full-text database records and prints each matching record as a document.
The domain name parameter is optional, if not specified the search is executed in the application database.
1 2 3 4 5 6 7 8 9 10 11 12 | |
When the domain name parameter is specified, the search runs against the domain database.
1 2 3 4 5 6 7 8 | |
fulltextreset¶
Resets the full-text database content and initiates the re-indexing process.
1 | |
Since this operation empties the contents of the database, users may see empty lists in the interface until indexing is completed. It is therefore not recommended during active usage hours.
fulltextindex¶
Re-index one or more items in the full-text catalog.
1 | |
This operation can include more than one record. Record numbers can be separated by , or ;.
1 | |
1 | |
ssltest¶
Performs an SSL connection test against the target host.
1 | |
This command checks SSL connectivity to the specified host and prints the result for common SSL/TLS protocol versions.
The port parameter is optional. If omitted, port 443 is used.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |