Skip to content

hythm7/Pakku

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WHAT?

Pakku - A Package Manager for Raku.

WHY?

TMTOWTDI

WHEN?

Pakku is now at version pupa and growing towards version adult. Currently Pakku can do many things like adding, removing, listing and downloading distributions.

INSTALLATION

Requires git, curl and tar be available in $PATH

git clone https://github.com/hythm7/Pakku.git

cd Pakku

# install to home directory
./tools/install-pakku.raku

# --dest=/path/to/pakku     # Install to a different directory
# --verbose=<0 1 2 3 4 5 6> # verbosity level
# --pretty                  # colors

Overview

  • Pakku is a simple package manager for Raku, with many options and customizations that can be configured in pakku.cnf file or via command line options.

  • Pakku command result is either:

    • -Ofun - Desired operation completed successfully
    • Nofun - Desired operation did not complete successfully
  • Pakku verbosity levels:

    • 0 (silent) - No output what so ever
    • 1 (trace) 🤓 - If you want to see everything
    • 2 (debug) 🐞 - To debug some issue
    • 3 (info ) 🦋 - Camelia delivers important things
    • 4 (warn ) 🔔 - Only when some warnings happen
    • 5 (error) - When errors are what you care about
    • 6 (fatal) 💀 - You probably don't like to see that when running Pakku, me neither!
  • Pakku output meaning:

🦋 PRC: 「 ... 」 → Start processing
🐞 SPC: 「 ... 」 → Spec
🐞 MTA: 「 ... 」 → Meta
🐞 FTC: 「 ... 」 → Fetch
🐞 BLD: 「 ... 」 → Building dist
🐞 TST: 「 ... 」 → Testing dist
🐞 ADD: 「 ... 」 → Adding dist
🦋 BLD: 「 ... 」 → Built dist
🦋 TST: 「 ... 」 → Tested dist
🦋 RES: 「 ... 」 → Resource
🦋 BIN: 「 ... 」 → Binary
🦋 ADD: 「 ... 」 → Added dist
🐞 PAC: 「 ... 」 → Packing rakudo and dist 
🦋 PAC: 「 ... 」 → Pack location
🐞 WAI: 「 ... 」 → Waiting
🔔 TOT: 「 ... 」 → Timed out
💀 MTA: 「 ... 」 → Meta error
💀 BLD: 「 ... 」 → Build failed
💀 TST: 「 ... 」 → Test failed
💀 CNF: 「 ... 」 → Config error
💀 CMD: 「 ... 」 → Command error
  • Pakku uses Pakku::RecMan recommendation manager to obtain distributions META info and archives.

USAGE

Add distribution

pakku add MyModule
pakku add nodeps  MyModule
pakku add notest  MyModule
pakku add exclude Dep1 MyModule
pakku add to      /opt/MyApp MyModule
pakku add force   to   home  MyModule1 MyModule2

Options: Specific to add command

deps            → add dependencies
nodeps          → no dependencies
exclude Dep1    → exclude Dep1 dependency
deps runtime    → add runtime dependencies
deps test       → add test    dependencies
deps build      → add build dependencies
deps requires   → only required dependencies
deps recommends → required and recommended dependencies as well
deps suggests   → required, recommended and suggested dependencies
deps only       → dont add the distribution, only it's dependencies
build           → build distribution
nobuild         → bypass build
test            → test distribution
notest          → bypass test
force           → force add distribution even if installed
noforce         → no force
to < repo >     → add distribution to repo < home site vendor core /path/to/MyApp >

Remove distribution

pakku remove MyModule

Options: Specific to remove command

from < repo > → remove distribution from provided repo only

List installed distributions

pakku list
pakku list MyModule
pakku list details MyModule
pakku list repo home
pakku list repo /opt/MyApp MyModule

Options: Specific to list command

details               → list details of dist
repo < name-or-path > → list dists installed in specific repo

Search distribution on RecMan

pakku Search MyModule
pakku Search details MyModule

Options: Specific to search command

count < number > → return how many dists
details          → list details of dist

Pack rakudo and distribution

pakku pack MyModule
pakku pack notest MyModule
pakku pack rakudo 2020.10 MyModule
pakku pack to     /opt/MyApp MyModule

Options: Specific to pack command

to < path > → pack to path /path/to/MyApp>
rakudo ver  → package rakudo specific version
< addopts > → add command options are available here as well

Build distribution

pakku build MyModule
pakku build .

Test distribution

pakku test MyModule
pakku test ./MyModule

Checkout (download) distribution

pakku checkout MyModule

Pakku Options

pakku dont     add MyModule
pakku nocache  add MyModule
pakku norecman add MyModule
pakku nopretty add MyModule
pakku yolo     add MyFailedModule MyModule
pakku pretty   please remove MyModule

Options: Global options control general Pakku behavior and placed before Pakku commands < add remove ... >

pretty            → colors
nopretty          → no colors
nocache           → disable cache
norecman          → disable remote recommendation manager
dont              → do everything but dont do it (dry run)
verbose < level > → verbosity < silent trace debug info warn error fatal >
please            → be nice to butterflies
yolo              → dont stop on errors, useful when need to proceed after error (e.g. Test Faliure)

Print Help

pakku
pakku add
pakku help
pakku help list
pakku help help

Feeling Rakuish Today?

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

add       → a     verbose → v     nopretty → np     silent → «S 0»
remove    → r     pretty  → p     nodeps   → nd     trace  → «T 1»
list      → l     only    → o     noforce  → nf     debug  → «D 2»
search    → s     deps    → d     notest   → nt     info   → «I 3»
build     → b     force   → f     nobuild  → nb     warn   → «W 4»
test      → t     details → d     nocache  → nc     error  → «E 5»
checkout  → c     yolo    → y     norecman → nr     fatal  → «F 6»
help      → h     exclude → x

Did I mention that the below are Pakku commands as well?

pakku 𝛒 ↓ 🔗 🔨 MyModule
pakku 👓 🦋 ↑   MyModule
pakku 🌎        MyModule
pakku ↪
pakku ❓

CONFIGURATION

  • All options can be set in command line or in the config file pakku.cnf~/.pakku/pakku.cnf」. The only needed config is <recman> source, otherwise you will be able to install local distributions only.

  • In case your terminal font does not support emojis, you can replace them by changing prefix values in the < log > section of your config file (usually ~/.pakku/pakku.cnf):

< log >
  trace prefix TRACE:
  debug prefix DEBUG:

Config file example:

### pakku Config

# < pakku >
  # pretty           # colors
  # verbose info     # < 0 1 2 3 4 5 6 >
  # dont             # dont do it (dry run)

# < add >
  # deps       # add deps as well < deps nodeps >
  # build      # build            < build nobuild >
  # test       # test             < test notest >
  # force      # force install    < force noforce >
  # to  home   # add to specific repo < home site vendor core /custom/repo/path >

# < remove >
  # from home  # remove from specific repo

# < list >
  # details # list   details of dists

## Customize log levels prefixes and colors
# < log >
  # trace prefix T:
  # debug prefix D:
  # info  prefix I:
  # warn  prefix W:
  # error prefix E:
  # fatal prefix F:

  # trace color reset
  # debug color green
  # info  color blue
  # warn  color yellow
  # error color magenta
  # fatal color red

< recman >
http://recman.pakku.org

CAVEATS

Currently Pakku runs on Linux, more operating systems will be supported in the future.

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 2019 Haytham Elganiny

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

About

Package Manager for Raku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages