Pakku

Package Manager for the Raku Programming Language

Pakku

Package Manager for the Raku Programming Language.

Installation

Usage

Pakku manages Raku distributions with commands like add, remove, update etc.

Full command consists of:

pakku [general-options] <command> [command-options] <dists>

There are two types of options:

General options:

These are the options that control the general behavior of Pakku, eg. specify the configuration file, run asynchronously or disable colors. The general options are valid for all commands, and must be placed before the command.

Command options:

These are the options that control the specified command, for example when installing a distributions one can add notest option to disable testing. these options must be placed after the command.

Pakku Commands

add

Install distributions

options:

Examples:

remove

Remove distributions

options:

Examples:

list

List installed distributions

options:

Examples:

search

Search available distributions

options:

Examples:

build

Build distributions

Examples:

test

Test distributions

options:

Examples:

update

Update distributions to latest version

options:

Examples:

state

Check the state of installed distributions

options:

Examples:

download

Download distribution source

Examples:

nuke

Nuke directories

Examples:

config

Each Pakku command like add, remove, search etc. corresponds to a config module with the same name in the config file. one can use config command to enable, disable, set, unset an option in the config file.

options:

Examples:

help

Get help on a specific command

Examples:

Pakku General Options

Options:

Examples:

Most of Pakku commands and options can be written in shorter form, for example:

The below are Pakku commands as well!

ENV Options

Options can be set via environment variables as well:

General

Add

Test

Remove

List

Search

Update

State

Pakku Output

Pakku output aims to be tidy and concise, uses emojis, colors and three letters key words to convey messages.

For example, the πŸ¦‹ emoji indicates that Pakku is starting a task, while 🧚 means Pakku successfully completed a task.

An output line like:

πŸ¦‹ BLD: ο½’Inline::Perl5:ver<0.60>:auth<cpan:NINE>:api<>ο½£

means Pakku is starting to build Inline::Perl5:ver<0.60>:auth<cpan:NINE>:api<>, and based on the result another output line could be:

🧚 BLD: rInline::Perl5:ver<0.60>:auth<cpan:NINE>:api<>」 # build success

πŸ¦— BLD: ο½’Inline::Perl5:ver<0.60>:auth<cpan:NINE>:api<>ο½£ # build failure

Below is a list of output lines that one can see and their meaning:

🧚 ADD β†’ start add command
πŸ¦‹ SPC β†’ processing Spec
πŸ¦‹ MTA β†’ processing Meta
πŸ¦‹ FTC β†’ fetching
πŸ¦‹ BLD β†’ building
πŸ¦‹ STG β†’ staging
πŸ¦‹ TST β†’ testing
🧚 BLD β†’ build success
🧚 TST β†’ test success
🧚 BIN β†’ binary added
🐞 WAI β†’ waiting
🐞 TOT β†’ timed out
πŸ¦— SPC β†’ error processing Spec
πŸ¦— MTA β†’ error processing Meta
πŸ¦— BLD β†’ build failure
πŸ¦— TST β†’ test failure
πŸ¦— CNF β†’ config error
πŸ¦— CMD β†’ command error

Pakku verbosity levels:

- 1 `ο½’ all ο½£`   🐝 β†’ All avaialble output
- 2 `ο½’debugο½£`   πŸ› β†’ Debug output
- 3 `ο½’ now ο½£`   πŸ¦‹ β†’ What is happenning now
- 4 `ο½’info ο½£`   🧚 β†’ Important things only
- 5 `ο½’warn ο½£`   🐞 β†’ Warnings only
- 6 `ο½’errorο½£`   πŸ¦— β†’ Errors only
- 0 `ο½’nothingο½£`    β†’ Nothing

[!WARNING] Pakku uses emoji and ANSI escape codes, If your terminal doesn't support them, you can disable colors, bars and spinners, (eg. pakku nopretty nobar nospinner add Foo), or disable permanently in config file. also for emojis, eg. to change the debug emoji for example, in config file replace "debug": {"prefix": "πŸ›"} with "debug": {"prefix": "D"}.

Command result:

  • -Ofun - Success

  • Nofun - Failure

Gotchas

Caching downloaded distributions

When one installs a distribution via pakku add dist, Pakku first looks in the local cache to see if there is a downloaded distribution matches dist specification, if nothing found in the cache, Pakku then searches the configured RecMan and obtain the latest version of dist (e.g. dist:ver<0.4.1>), download, cache, and install it.

After sometime when a new version dist:ver<0.4.2> is released and available in RecMan, if one try to install dist via pakku add dist, what happens is Pakku will find dist:ver<0.4.1> available in local cache and will install that version because it matches dist specification. so one will not get the latest version dist:ver<0.4.2>.

There are two ways to avoid this and get the latest version, either specify the version e.g. pakku add dist:ver<0.4.2> or disable cache lookup e.g. pakku nocache add dist (also, one can permenantly disable cache in config file).

Pakku installs to site repo by default

If the user doesn't have rw permision to site repo, one can change the default repo to home in config file using:

pakku config add set to home

or specify the repo in the command e.g. pakku add to home dist

Credits

Thanks to Panda and Zef for Pakku inspiration. also Thanks to the nice #raku community.

Motto

Light like a 🧚, Colorful like a 🧚

Author

Haytham Elganiny elganiny.haytham at gmail.com

Copyright and License

Copyright 2023 Haytham Elganiny

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Pakku vcelastrina.5

Package Manager for the Raku Programming Language

Authors

  • Haytham Elganiny

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Pakku
  • Pakku::Archive
  • Pakku::Cache
  • Pakku::Command::Add
  • Pakku::Command::Build
  • Pakku::Command::Config
  • Pakku::Command::Download
  • Pakku::Command::Help
  • Pakku::Command::List
  • Pakku::Command::Nuke
  • Pakku::Command::Remove
  • Pakku::Command::Search
  • Pakku::Command::State
  • Pakku::Command::Test
  • Pakku::Command::Update
  • Pakku::Core
  • Pakku::Grammar::Cmd
  • Pakku::HTTP
  • Pakku::Log
  • Pakku::Meta
  • Pakku::Native
  • Pakku::Recman
  • Pakku::Recman::HTTP
  • Pakku::Recman::Local
  • Pakku::Spec
  • X::Pakku

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.