mirror of
https://github.com/corda/corda.git
synced 2024-12-30 09:48:59 +00:00
0ab644783e
* 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
77 lines
3.5 KiB
ReStructuredText
77 lines
3.5 KiB
ReStructuredText
Shell extensions for CLI Applications
|
|
=====================================
|
|
|
|
.. _installing-shell-extensions:
|
|
|
|
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:
|
|
|
|
.. code-block:: shell
|
|
|
|
java -jar <name-of-JAR>.jar install-shell-extensions
|
|
|
|
Then, either restart your shell, or for ``bash`` users run:
|
|
|
|
.. code-block:: shell
|
|
|
|
. ~/.bashrc
|
|
|
|
Or, for ``zsh`` run:
|
|
|
|
.. code-block:: shell
|
|
|
|
. ~/.zshrc
|
|
|
|
You will now be able to run the command line application from anywhere by running the following:
|
|
|
|
.. code-block:: shell
|
|
|
|
<alias> --<option>
|
|
|
|
For example, for the Corda node, install the shell extensions using
|
|
|
|
.. code-block:: shell
|
|
|
|
java -jar corda-<version>.jar install-shell-extensions
|
|
|
|
And then run the node by running:
|
|
|
|
.. code-block:: shell
|
|
|
|
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 :ref:`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:
|
|
|
|
.. code-block:: shell
|
|
|
|
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 :ref:`above<installing-shell-extensions>` for instructions on making the changes take effect immediately.
|
|
|
|
List of existing CLI applications
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
+----------------------------------------------------------------+--------------------------------------------------------------+--------------------------------+
|
|
| Description | JAR name | Alias |
|
|
+----------------------------------------------------------------+--------------------------------------------------------------+--------------------------------+
|
|
| :ref:`Corda node<starting-an-individual-corda-node>` | ``corda-<version>.jar`` | ``corda --<option>`` |
|
|
+----------------------------------------------------------------+--------------------------------------------------------------+--------------------------------+
|
|
| :doc:`Network bootstrapper<network-bootstrapper>` | ``corda-tools-network-bootstrapper-<version>.jar`` | ``bootstrapper --<option>`` |
|
|
+----------------------------------------------------------------+--------------------------------------------------------------+--------------------------------+
|
|
| :ref:`Standalone shell<standalone-shell>` | ``corda-tools-shell-cli-<version>.jar`` | ``corda-shell --<option>`` |
|
|
+----------------------------------------------------------------+--------------------------------------------------------------+--------------------------------+
|
|
| :doc:`Blob inspector<blob-inspector>` | ``corda-tools-blob-inspector-<version>.jar`` | ``blob-inspector --<option>`` |
|
|
+----------------------------------------------------------------+--------------------------------------------------------------+--------------------------------+
|
|
|