* Tidy up * Add install-shell-extensions command * Make cli tests use same version of picocli as everything else * Remove initLogging from NodeStartup, it is ran earlier by CordaCLIWrapper * Use picocli snapshot for testing * Use RunLast() parser to invoke correct subcommands * Deprecate old clear-network-map-cache parameter * Restructure NodeStartup for commands * Get rid of -c option since the flag method has been deprecated and that didn't exist in last release * Update documentation * Update backwards compatibility test * Get all subcommands working * Refactor sub commands into seperate classes * Update docs and fix some tests * Docs changes * Fix merge conflicts with master * Fix renamed parameters * Fix test failure * Fix compatibility tests * Add missing compatibility test for blob inspector * Remove blob inspector compatibility test as there are import conflicts * Assorted doc fixes * Addressing review comments * More review comments * Couple more bits * Fix broken tests * Fix compilation error * More merge conflicts * Make startup logging function a bit more sensible * Fix broken shell extensions * Make shell extensions work with subcommands * Make sure parameters for deprecated options are carried through * More review comments * Adding some s's * One last go * Fix compilation error on Windows * Revert logging changes * Revert docs back to their original imperatively moody state
3.5 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.
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.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> |