# conda-leaves Simple CLI tool that allows to pretty print all dependencies within conda environment. ## Installation `conda-leaves` doesn't require any additional libraries to be installed, but it assumes user has `conda` and `cargo` installed and available in system's path. Installation is as simple as running `cargo install conda-leaves`. ## CLI ### Commands Basic usage of CLI is as simple as: ```bash conda-leaves ``` It's returning the list of `leaves` - packages that are not dependent on any other package installed in the environment. Those are usually packages we want to include in environment/requirements file, becauce they sit at the bottom of all dependencies. This CLI is about to simplify the process of understanding dependencies in your conda environment, allowing you to manage it with ease. #### help Prints help information. ```bash conda-leaves help ``` #### package Prints tree view for the package. It helps to understand which libraries are required by the package. Flags: - `-d`, `--dependent-packages` - Prints libraries that depend on a given package. Options: - `-n`, `--name` - Name of the package that should be printed. Usage: ```bash conda-leaves package [Flags] --name ``` Examples: ```bash $ conda-leaves package -n jinja2 jinja2 (v2.11.2) ├── markupsafe (v1.1.1) └── setuptools (v49.6.0) └── certifi (v2020.6.20) ``` ```bash $ conda-leaves package -n dask -d Following packages depend on dask: - dask-ml - dask-xgboost - dask-glm ``` #### export Exports leaves to the file. Options: - `-f`, `--filename` (default: environment.yml) - Name of the output yml file. Usage: ```bash conda-leaves export [Options] ``` ## Development ### Running CLI using test data ```bash CONDA_PREFIX="./tests/data" cargo run --release -- ``` ### Running tests ```bash cargo test ``` ### Compiling documentation ```bash cargo doc ```