|
| 1 | +:tocdepth: -1 |
| 2 | + |
| 3 | +.. index:: cli-commands |
| 4 | + |
| 5 | +.. _cli-commands: |
| 6 | + |
| 7 | +CMI Command-Line Interface (CLI) |
| 8 | +-------------------------------- |
| 9 | + |
| 10 | +The ``cmi`` command provides access to ``diffpy.cmi``. |
| 11 | +It allows users to explore, install, and run **packs**, **profiles**, and **example workflows**. |
| 12 | + |
| 13 | +============ |
| 14 | +Getting Help |
| 15 | +============ |
| 16 | + |
| 17 | +The ``-h`` flag is available for **all** cmi commands and subcommands. |
| 18 | +It's highly recommended to use it wherever necessary. |
| 19 | + |
| 20 | +To display help for the main CLI, type |
| 21 | + |
| 22 | +.. code-block:: bash |
| 23 | +
|
| 24 | + cmi -h |
| 25 | + cmi --help |
| 26 | +
|
| 27 | +Display help for a specific subcommand with, |
| 28 | + |
| 29 | +.. code-block:: bash |
| 30 | +
|
| 31 | + cmi <subcommand> -h |
| 32 | +
|
| 33 | +Open the full online manual in a web browser by typing, |
| 34 | + |
| 35 | +.. code-block:: bash |
| 36 | +
|
| 37 | + cmi --manual |
| 38 | +
|
| 39 | +==================== |
| 40 | +``cmi info`` command |
| 41 | +==================== |
| 42 | + |
| 43 | +To print information about available and installed packs, profiles, and examples, type, |
| 44 | + |
| 45 | +.. code-block:: bash |
| 46 | +
|
| 47 | + cmi info |
| 48 | +
|
| 49 | +To print information about packs, profiles, or examples, type |
| 50 | + |
| 51 | +.. code-block:: bash |
| 52 | +
|
| 53 | + cmi info packs |
| 54 | + cmi info profiles |
| 55 | + cmi info examples |
| 56 | +
|
| 57 | +======================= |
| 58 | +``cmi install`` command |
| 59 | +======================= |
| 60 | + |
| 61 | +To install packs or profiles into your environment, type |
| 62 | + |
| 63 | +.. code-block:: bash |
| 64 | +
|
| 65 | + cmi install <pack-name> |
| 66 | + cmi install <profile-name> |
| 67 | +
|
| 68 | +Installation of multiple packs or profiles is also supported, e.g., |
| 69 | + |
| 70 | +.. code-block:: bash |
| 71 | +
|
| 72 | + cmi install <pack-name> <profile-name> |
| 73 | +
|
| 74 | +==================== |
| 75 | +``cmi copy`` command |
| 76 | +==================== |
| 77 | + |
| 78 | +To view all examples available to copy, type |
| 79 | + |
| 80 | +.. code-block:: bash |
| 81 | +
|
| 82 | + cmi info examples |
| 83 | +
|
| 84 | +To copy an example or list of examples to cwd, type |
| 85 | + |
| 86 | +.. code-block:: bash |
| 87 | +
|
| 88 | + cmi copy <example-name> |
| 89 | + cmi copy <example-name1> <example-name2> |
| 90 | +
|
| 91 | +To copy all examples from a pack or list of packs to cwd, type |
| 92 | + |
| 93 | +.. code-block:: bash |
| 94 | +
|
| 95 | + cmi copy <pack-name> |
| 96 | + cmi copy <pack-name1> <pack-name2> |
| 97 | +
|
| 98 | +To copy all examples to cwd, type |
| 99 | + |
| 100 | +.. code-block:: bash |
| 101 | +
|
| 102 | + cmi copy all |
| 103 | +
|
| 104 | +To copy an example to a target directory, type |
| 105 | + |
| 106 | +.. code-block:: bash |
| 107 | +
|
| 108 | + cmi copy <example-name> -t <target-directory> |
| 109 | +
|
| 110 | +To force overwrite a preexisting example directory, type |
| 111 | + |
| 112 | +.. code-block:: bash |
| 113 | +
|
| 114 | + cmi copy <example-name> -f |
| 115 | +
|
| 116 | +==================== |
| 117 | +``cmi env`` command |
| 118 | +==================== |
| 119 | + |
| 120 | +To show basic information about your current conda environment, type |
| 121 | + |
| 122 | +.. code-block:: bash |
| 123 | +
|
| 124 | + cmi env |
0 commit comments