Home

Awesome

license-badge PRs Welcome Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Table of Contents

Description

Pharo Install - A command-line tool for installing Pharo Smalltalk packages.

PI is a MIT-pip-like application installer for Pharo Smalltalk. Copy & pasting Pharo install scripts found in forums or the web is an easy method, but it’s also time consuming because of the manual interaction, and hard to make the process reproducible.

PI turns copy & paste Metacello install scripts into shell one-liners which works on Unix/Linux, MacOS and Windows (MinGW64/MSYS).

PI automatically retrieves and parses Pharo GitHub repository information, and also downloads the latest stable Pharo image and virtual machine if none is found in the current directory. It also supports installing multiple packages at once.

Demo

pi-session

Requirements

Installation

Common steps

The first step is to download the package from a command line terminal:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/hernanmd/pi/master/install.sh)"

The next step is to configure your PATH variable to find the pi command. To find which shell you are using now, type:

echo $0

bash users

To persist usage between multiple shell sessions:

echo "export PATH=$HOME/.pi/pi/bin:$PATH" >> ~/.bash_profile 
source ~/.bash_profile

zsh users

To persist usage between multiple shell sessions:

echo -n 'export PATH=$HOME/.pi/pi/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

Features

Usage examples

Installable packages must contain:

If the current directory already contains a Pharo image, PI will use that image, otherwise it will download a new stable image.

Installing

Installing a stable Pharo image in the current directory:

pi image

Install and run the latest Pharo image in a new timestamped directory:

pi nlrun

Installing NeoCSV package:

pi install NeoCSV

Installing multiple packages:

pi install Diacritics ISO3166 StringExtensions

Listing

List packages from GitHub

pi list

Searching

Search in GitHub repositories:

pi search microdown

Output may contain multiple repositories

pi search magritte
GitHub: peteruhnak/xml-magritte-generator
GitHub: philippeback/Magritte3Doc
GitHub: grype/Magritte-Swift
GitHub: hernanmd/Seaside-Magritte-Voyage
GitHub: hernanmd/Seaside-Bootstrap-Magritte-Voyage
GitHub: udoschneider/BootstrapMagritte

in that case, disambiguate specifying <owner>/<repository_name>, ex:

pi install grype/Magritte-Swift

Troubleshooting

If you experiment problems with pi, please run the collect environment script:

./runPiCollectEnv

And open an issue with the output in the Issue Tracker).

You can obtain the pi version with:

pi version

Contribute

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.

If you'd like to make some changes yourself, see the following:

Develop

To add tests

To deploy a new release