Skip to content

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
.\AltiKare.Workflow.Agent.exe help

Usage:
help           Show help                                          help
 install        install as service                                 install
 uninstall      uninstall service                                  uninstall
 basex          install basex service                              basex
 ubasex         uninstall basex service                            ubasex
 redis          install redis service                              redis
 uredis         uninstall redis service                            uredis
 setconfig      Sets a configuration value in protected.json       setconfig <key> <value>
 start          start all services                                 start
 web            start web services                                 web
 agent          start agent                                        agent
 smtp           start smtp                                         smtp
 fulltext       start fulltext                                     fulltext
 registerstore  register data store                                registerstore <applicationName> <storeName> [processPath]
 cleanup        execute maintenance cleanup                        cleanup
 fslist         list file service paths to csv                     fslist <applicationName> <repositoryName> <csvPath> [path] [recursive]
 fsmove         move file service paths from csv                   fsmove <applicationName> <repositoryName> <csvPath>
 fulltextmerge  execute full text merge [collection]               fulltextmerge
 fulltextlist   list all full text collections                     fulltextlist
 fulltextdump   execute full text search and dump results          fulltextdump  <query> [collection] [local]
 fulltextreset  Reset the full text index                          fulltextreset
 fulltextindex  Re-index given items                               fulltextindex items
 ssltest        execute ssl connection test                        ssltest  hostname [port]

Installation Commands

install

Installs the agent as a Windows service. Only available on Windows.

1
.\AltiKare.Workflow.Agent.exe install

uninstall

Uninstalls the Windows service. Only available on Windows.

1
.\AltiKare.Workflow.Agent.exe uninstall

basex

Installs the BaseX service as a Windows service. Only available on Windows.

1
.\AltiKare.Workflow.Agent.exe basex

ubasex

Uninstalls the BaseX Windows service. Only available on Windows.

1
.\AltiKare.Workflow.Agent.exe ubasex

redis

Installs Redis as a Windows service. Only available on Windows.

1
.\AltiKare.Workflow.Agent.exe redis

uredis

Uninstalls the Redis Windows service. Only available on Windows.

1
.\AltiKare.Workflow.Agent.exe uredis

Configuration Commands

setconfig

Sets a configuration setting in encrypted form.

1
.\AltiKare.Workflow.Agent.exe setconfig <key> <value>

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
.\AltiKare.Workflow.Agent.exe setconfig DbConnStr 'Host=myserver;Database=emakin;Username=emakin;Password=mypassword;'

After this command runs, a new protectedsettings.json file is created in Configuration/Data and stores the encrypted connection string.

1
2
3
{
  "DbConnStr": "CfDJ8L..........6PT0Kw="
}

Any configuration value from <installdir>/appsettings.json can be set with setconfig, and child sections can be addressed with the : separator.

1
.\AltiKare.Workflow.Agent.exe setconfig Section:SubSection:Key Value

registerstore

Registers a new data store to be shared across all tenants.

1
.\AltiKare.Workflow.Agent.exe registerstore <applicationName> <storeName> [processPath]

applicationName specifies the host application and storeName specifies the new store name. The shared data store name must begin with the PS_ prefix.

1
.\AltiKare.Workflow.Agent.exe registerstore myemakin.com PS_MyStore

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
.\AltiKare.Workflow.Agent.exe registerstore myemakin.com PS_MyStore c:/files/sampleprocess.xml

Agent Commands

start

Starts the agent in console mode with all modules active.

1
.\AltiKare.Workflow.Agent.exe start

web

Starts only the web server components. Other services such as background jobs or SMTP are not started.

1
.\AltiKare.Workflow.Agent.exe web

agent

Starts only the agent components. The web server and SMTP services are not started.

1
.\AltiKare.Workflow.Agent.exe agent

smtp

Starts only the SMTP service mode.

1
.\AltiKare.Workflow.Agent.exe smtp

fulltext

Starts only the full-text service mode.

1
.\AltiKare.Workflow.Agent.exe fulltext

Maintenance Commands

cleanup

Executes the cleanup tasks.

1
.\AltiKare.Workflow.Agent.exe cleanup

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
.\AltiKare.Workflow.Agent.exe fslist <applicationName> <repositoryName> <csvPath> [path] [recursive]

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,Size,DestinationFullPath

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
.\AltiKare.Workflow.Agent.exe fslist myemakin.com Repo1 repo-files.csv
1
.\AltiKare.Workflow.Agent.exe fslist myemakin.com Repo1 published-files.csv published/ true

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
.\AltiKare.Workflow.Agent.exe fsmove <applicationName> <repositoryName> <csvPath>

Before running the command, populate the DestinationFullPath column in a CSV file created by fslist.

1
2
3
FullPath,Size,DestinationFullPath
published/a/file1.pdf,1024,archive/a/file1.pdf
published/a/file2.pdf,2048,archive/a/file2.pdf

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
.\AltiKare.Workflow.Agent.exe fsmove myemakin.com Repo1 published-files.csv

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
.\AltiKare.Workflow.Agent.exe fulltextmerge

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
.\AltiKare.Workflow.Agent.exe fulltextlist

Database names are listed as plain text.

1
2
3
4
.\AltiKare.Workflow.Agent.exe fulltextlist

emakin.com-c75ca4bd244e43b4a0342a69fad19be2
mydomain-41aedbcf01a445178a2e4c669d432652

fulltextdump

Executes a full-text search and dumps the result to the console for diagnostics.

1
.\AltiKare.Workflow.Agent.exe fulltextdump <query> [domain]

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
.\AltiKare.Workflow.Agent.exe fulltextdump "123***789"

Found document (7951).
_assignedtoid(I)(S)(S)="NULL"
_channelid(I)(S)(S)="c5f3e959-0098-40c3-b52f-86cc4efb34cc"
_content(I)(S)(S)="<longtext>"
.....
number(I)(S)(S)="000000000000000026186"
priority(I)(S)(S)="000000000000000000002"
subject(I)(S)(S)="<longtext>"
totaltimespent(I)(S)(S)="-00000000000000000000"
updatedat(I)(S)(S)="202210040637"

When the domain name parameter is specified, the search runs against the domain database.

1
2
3
4
5
6
7
8
.\AltiKare.Workflow.Agent.exe fulltextdump "123***789" myDomain

Found document (7951).
_assignedtoid(I)(S)(S)="NULL"
.....
subject(I)(S)(S)="<longtext>"
totaltimespent(I)(S)(S)="-00000000000000000000"
updatedat(I)(S)(S)="202210040637"

fulltextreset

Resets the full-text database content and initiates the re-indexing process.

1
.\AltiKare.Workflow.Agent.exe fulltextreset

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
.\AltiKare.Workflow.Agent.exe fulltextindex <item1>;<item2>

This operation can include more than one record. Record numbers can be separated by , or ;.

1
.\AltiKare.Workflow.Agent.exe fulltextindex 91212902-c218-4d99-9b41-c736a3fc362c
1
.\AltiKare.Workflow.Agent.exe fulltextindex 91212902-c218-4d99-9b41-c736a3fc362c;b0ea5b37-958c-4b2c-a178-932751794672

ssltest

Performs an SSL connection test against the target host.

1
.\AltiKare.Workflow.Agent.exe ssltest <host> [port]

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
.\AltiKare.Workflow.Agent.exe ssltest mydomain.emakin.com

Protocol:Ssl2       Success:False
System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
 ---> Interop+AppleCrypto+SslException: illegal parameter
   at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port)
********************************************************************************
Protocol:Ssl3       Success:False
System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
 ---> Interop+AppleCrypto+SslException: handshake failure
   at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port)
********************************************************************************
Protocol:Tls        Success:False
System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
 ---> Interop+AppleCrypto+SslException: bad protocol version
   at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port)
********************************************************************************
Protocol:Tls11      Success:False
System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
 ---> Interop+AppleCrypto+SslException: bad protocol version
   at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port)
********************************************************************************
Protocol:Tls12      Success:True
CipherAlgorithm:Aes128 CipherSuite:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
********************************************************************************