corda/docs/source/cli-application-shell-extensions.rst
Anthony Keenan b07cd38186
ENT-2534: Seperate database manager into commands (#1527)
* Seperate database manager into commands

* Documentation update

* Slightly better naming

* Address review comments

* Review comments

* Address review comments
2018-11-05 14:32:51 +00:00

4.8 KiB

Shell extensions for CLI Applications

Installing shell extensions

Users of bash or zsh can install an alias and auto-completion for Corda applications that contain a command line interface. Run:

java -jar <name-of-JAR>.jar install-shell-extensions

Then, either restart your shell, or for bash users run:

. ~/.bashrc

Or, for zsh run:

. ~/.zshrc

You will now be able to run the command line application from anywhere by running the following:

<alias> --<option>

For example, for the Corda node, install the shell extensions using

java -jar corda-<version>.jar install-shell-extensions

And then run the node by running:

corda --<option>

Upgrading shell extensions

Once the shell extensions have been installed, you can upgrade them in one of two ways.

  1. Overwrite the existing JAR with the newer version. The next time you run the application, it will automatically update the completion file. Either restart the shell or see above<installing-shell-extensions> for instructions on making the changes take effect immediately.

  2. If you wish to use a new JAR from a different directory, navigate to that directory and run:

    java -jar <name-of-JAR>

    Which will update the alias to point to the new location, and update command line completion functionality. Either restart the shell or see above<installing-shell-extensions> for instructions on making the changes take effect immediately.

List of existing CLI applications

Description JAR name Alias
Corda node<starting-an-individual-corda-node> corda-<version>.jar corda --<option>
Network bootstrapper<network-bootstrapper> corda-tools-network-bootstrapper-<version>.jar bootstrapper --<option>
Standalone shell<standalone-shell> corda-tools-shell-cli-<version>.jar corda-shell --<option>
Blob inspector<blob-inspector> corda-tools-blob-inspector-<version>.jar blob-inspector --<option>

List of existing Enterprise CLI applications

Description JAR name Alias
Database Manager<database-management> corda-tools-database-manager-<version>.jar database-manager --<option>
Corda Firewall<firewall-configuration-file> corda-firewall-<version>.jar corda-firewall --<option>