Pakku Through Images
Tags: rakulang
Published: 2023-10-02 05:01:16

[Pakku](https://github.com/hythm7/Pakku) is a package manager for the [Raku Programming Language](https://raku.org/). Latest releases of Pakku are part of Pakku `Celastrina` version family. `Celastrina` name means elegant and beutiful, So I will take the opportunity to introduce how elegant IMO Pakku handles Raku distributions.

**NOTE**
Pakku uses unicode, emojis and colors quite a lot, This might not be everyone's cup of tea, or may be the terminal doesn't support them, so at the end of the post I will show how to disable or customize these features through configurations.

### Install Pakku
After clonning Pakku repository, one can run `raku -I. bin/pakku add .` within the cloned repository to install Pakku:

![add pakku](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfinco3829g89xylm9qb.gif)

As shown Pakku installed successfully, and the default verbosity level `info` was used, which shows the important information for installation steps:

* Staging the distribution.
* Testing the distribution.
* List binaries installed to the system.

If more information during installation is needed, one can raise the verbosity level.

### Install Raku Distribution

To install Raku distribution one can run `pakku add MyDist`

![add dist](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4loxjvlu5gpay2udazv.gif)

Raising the verbosity to level `now` makes Pakku output what it is doing at the moment. As shown in the above image, Pakku keeps the user informed when Fetching the distribution, Compiling the distribution modules, also when running the individual tests. and the information flows seamlessly with the progress bar.

More information can be viewed by setting the verbosity level to `debug`.

There is also  `all` verbosity level, which shows all possible information, including the tests output and much more informations.

[here](https://github.com/hythm7/Pakku/actions/runs/6374897751/job/17300064088#step:5:1) is an example of how it might look when run Pakku with `all` verbosity level. That might look like a lot of information, but once get used to it, it looks familiar.

Please disregard the `dont` option in the above image, it basically means do all steps but don't commit any changes to the installation repositories. (equivalent to `dry-run` in other programs).

### Search Raku Distribution

To search Raku distributions one can run `pakku search MyDist`

![search dist](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9pdkyva09nipkdi2vkr.gif)

The search is relaxed by default, so many dists can be returned (search modules of dist as well), one can pass `norelaxed` option to narrow the search.

Also if one is interested in latest version only, `latest` option can be passed to the `search` command:

![search latest dist](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbqkm43cnxy3qpmg029p.gif)

### Pakku Configurations

The configuration modules consist of:

* Pakku general config module.
* A module for each Pakku command (eg. `add`, `remove`, `search` etc.).
* Log module.
* Recommendation manager module.

To view the configs of a module, for instance pakku general configs module:

![config view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/orcom34c73kwk1podx4k.png)

To disbale colors, bar and spinner, one can run:

`pakku config pakku disable pretty bar spinner`

Changing colors or replacing emojis with ascii characters can be done via the `config` command as well, however I will make these changes directly in the config file as below:

![config change](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8ldgoyv7v9xfsoxecjd.gif)

And here is how it looks after customization:

![pakku customized](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2btj29nkihyyx4aeiobv.gif)

To reset configuration:
`pakku config reset`

To create a new config file:
`pakku config new`

That's it for now, Thanks for viewing!