Skip to content

Introduction

Sa* Tasche (mitgedanken) edited this page Aug 30, 2017 · 3 revisions

paggy

paggy is a package manager.

What is a package?

Types of packages

paggy knows different types of packages. Some a used locally, only. Like frameworks. Some a used globally, only. Like development related CLI tools.

paggy copies the fetched package to a global accessable folder for the current user by default. So, you do'nt need something like paggy --global

Installing a package

By default, paggy tries to identify the package by itself. So you can use paggy fetch http://files.example.com/r/file.ext ext means any file extension like zip, tar, json, etc.

And it uses TLS (https) by default. Use paggy fetch files.example.com/r/file.extan paggy tries to use TLS. If TLS is not available on the server (file is not fetchable) paggy will try http, but return an error like package not fetchable over TLS on files.example.com/r/file.ext So you know what's going on. If you use TLS only and paggy is not allowed to try without TLS, use paggy --secure-only. Or change the defaults in paggy's config file.

fetching

Fetching a paggy package file over http/https paggy fetch --paggy http://paggy.example.com/releases/mypackage/paggy.json

Fetching a zip from http/https paggy fetch http://packages.example.com/releases/mypackage.zip

Fetching from a git repository paggy fetch git://git.example.com/releases/mypackage.git

Fetchig from a git repository over http/https paggy fetch --git http://git.example.com/releases/mypackage.zip

Fetching a composer package paggy fetch --composer http://composer.example.com/releases/

Installing locally or globally

paggy copy the fetched package to a global accessable folder for the current user by default. So, you don't need something like paggy --global, but you can use it if you want.

If you want a package installed/copied in a folder use paggy --copy-to /target/folder. This folder will be updated if you fetch an updated package.

If you don't want automatic updates for any copy use paggy --freeze --copy-to /target/filer. Or only paggy --freeze if you want to change it after copying.

If you install a package locally which exists globally paggy will copy it with auto-update by default.

Add a package to the manager

If you have downloaded a package manually and you want to add it to paggy use paggy --add-package in the package's folder. Or if you want do add a package in a different folder use ```paggy --add-package /path/to/folder``

Stay up-to-date

paggy supports self updates and package updates.

self-update

Use paggy --update selfor paggy --self-updateto update paggy.

package-update

Use paggy --updateto update the package in current folder, if not freezed. If the package is freezed an error will printed Package package-name is freezed in /package/folder

Use paggy --update package-name to update the package, where package-name is the package's name. Where the package is is not important. Any known package with given name will be updated, if not freezed.

If you want update all packages use paggy -update all.

Update freezed packages

To update a freezed package it must be unfreezed. You can unfreeze a package, update it and refreeze it with paggy --unfreeze --update --freeze.

If you want to update any freezed package use paggy --update all-freezed.

Add a dependency

Sometimes it's convinient to use the console to add a dependency. To do so use paggy --add-dependency package-name. If a specific version is required use paggy --add-dependency [email protected]. Where @ means use version and 2.9 the required version.

Version management

paggy supports wild-cards.

  • @2.* or @+2 any minor version greater than or equal to 2.0 but.

  • @* or @+ any version, but no alpha or beta.

  • @*-dev or @dev or @develop any development version.

  • @*-rc or @rc any release candidate.

  • any minor version grater-than 2.9 @>2.9.

  • any minor version greater than or equal to 2.0 @>=2.9 or @+2.

  • any minor version less-than 2.9 @<2.9.

  • any minor version less-than or equal to @<=2.9 or @-2.