DICE Command Line Interface (CLI)
Installation
The best way to install dice-cli is via pipx. This will setup a separate
virtualenv for dice-cli preventing interference with your normal Python
setup.
pipx install dice-cli
For tab-completion of the DICE CLI, you can run
dice --install-completion
which will install the completion for your shell.
Should you be using a "non-standard" shell, you can check what will be installed through
dice --show-completion
Development
Development cycle
dice-cli has a direct, tight dependency on
dice-lib. New features are usually
developed within dice-cli first, and then common functionality is moved to
dice-lib.
Code layout
CLI commands are currently grouped into two categories: admin and user. All
categories, except for user need to be placed in their respective folders.
Each category should use its own logging and error handling to allow for
individual tuning.
Main commands are implemented directly into <category>/__init__.py, e.g.
dice admin scan_groups_and_users, while subcommands should be placed in
<category>/<command>/__init__.py, e.g. dice job why_is_my_job_not_running.
Should a command require extensive logic, it should be placed in its own file ,
e.g. admin/_print_used_id_ranges.py. This will be the main point of change
when things move to dice-lib.
Snapshot (2022.02.17):
src/dice_cli/
├── __init__.py
├── _io
│ ├── __init__.py
│ └── _csv.py
├── admin # `dice admin` category
│ ├── __init__.py
│ ├── _print_unused_id_ranges.py # main command functionality for `dice admin print_unused_id_ranges`
│ ├── _print_used_id_ranges.py
│ ├── _scan_groups_and_users.py
│ └── report # all `dice admin report` commands
│ ├── __init__.py
│ ├── __pycache__
│ ├── _consistency_check_grid.py
│ ├── _inventory.py
│ ├── _network.py
│ └── _storage.py
├── benchmark
│ ├── __init__.py
├── docs
│ ├── __init__.py
├── fs # user command example: `dice fs`
│ ├── __init__.py
│ └── _copy_from_local.py
├── info
│ ├── __init__.py
├── job
│ ├── __init__.py
├── logger.py
├── main.py
└── py.typed
Local installation
conda create -n dice python=3.8
conda activate dice
# make sure to have the latst pip
pip install -U pip
# install dice-cli
pip install -e .
Metadata
Release files for dice_cli 2025.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dice_cli-2025.3.1.tar.gz | 25.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dice_cli-2025.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.7 kB
Release files / dice_cli-2025.3.1.tar.gz
| Download URL | dice_cli-2025.3.1.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59b63e77e49b5102d460b558a53506cf2f44d8a604599a02850e0a4fe871c1b6
|
|
BLAKE2b-256 checksum How to use checksums |
d034953cec4bebe8a4b7a8629f323d6128466f4d7aa5779193b83f36a21b12f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Release files / dice_cli-2025.3.1-py3-none-any.whl
| Download URL | dice_cli-2025.3.1-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7be611bec36e1b24404a0d590715fdd9547d1c69135d443d00f9e2de29b94b4c
|
|
BLAKE2b-256 checksum How to use checksums |
5e6f31a2a759d2166239c3e58f8223860d6b102daa02f0e1538dde2148ef24f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|