Below you will find the list of available Controllers. Each controller is essentially a section of InterWorx. As you can see, they are exactly the same as the menu items in the NodeWorx web interface. Similarly for the siteworx command, the controllers listed are the same as the menu items in the SiteWorx web interface. You can select which controller you want to access by entering its menu number in the prompt.

These are what allow you to select the specific operation to perform. Say you wanted to add a new SiteWorx account - you enter ’9’ for the add action. You are then prompted for the necessary information to perform this action.

While the interactive mode of the CLI utility may be useful, ultimately you probably want to use the CLI utility in scripts, which you can’t do in interactive mode. In order to do this, you first need to figure out what the proper arguments are, and this is where the -h usage option becomes a great resource because it documents all the controllers, actions, and arguments you need to use to perform InterWorx tasks.

Let’s say for example we want to learn how to add an FTP account to a SiteWorx account non-interactively. In order to do this, we need to authenticate just like we did above, but also add the -h option to the command line, like so:

Notice the bottom has ALL of the SiteWorx controllers listed. So, we specify the controller we want with -c Ftp, as you can see from the usage text. Yet, we still don’t know what action we want to use. The great thing about the CLI utility is with the -h option and the -c controller option, the CLI utility will change the usage text to show you what actions are available:

Notice that now after the list of controller options, the list of actions you can do with the FTP controller is listed. If you specify the ’add’ action, the -h option again will change to show you what arguments you need to add an FTP account.

Now the controller and action documentation has been replaced with the arguments you pass to the action (--user, --password, --confirm_password, --homedir) at the bottom. To construct the final command which will add the FTP account, we need to remove the -h option because we don’t need documentation anymore and we add the -n non-interactive option to make the CLI utility not prompt us for anything.

This will silently, non-interactively, add a SiteWorx FTP account. Notice that for --password arguments, you need the --confirm_password argument too. If you want to see the result of your non-interactive command, you can optionally add a -v which enables verbose mode. You can follow this procedure to figure out the proper controller/action/arguments combination to perform any InterWorx task you desire.