- Description
- Demo
- Requirements
- Installation
- Features
- Usage Examples
- Troubleshooting
- Contribute
- Change Log
- Develop
- License
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.
- bash or zsh
- curl
- unzip
- jq (a command line JSON processor)
- Install for MSYS users:
pacman -Suy jq - Install for Linux users (needs root):
apt install jqoryum install jqordnf install jqetc. - Install for macOS users:
brew install jq
- Install for MSYS users:
- gsed
- Install for MSYS users:
ln /usr/bin/sed.exe /usr/local/bin/gsed - Install for Linux users (needs root):
ln /usr/bin/sed /usr/local/bin/gsed - Install for macOS users:
brew install gsed
- Install for MSYS users:
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 $0To persist usage between multiple shell sessions:
echo "export PATH=$HOME/.pi/pi/bin:$PATH" >> ~/.bash_profile
source ~/.bash_profileTo persist usage between multiple shell sessions:
echo -n 'export PATH=$HOME/.pi/pi/bin:$PATH' >> ~/.zshrc
source ~/.zshrc- PI can install and list packages from GitHub repositories.
- If the Github repository has "pharo" as topic, it will be listed.
- Supports case-insensitive searching for package names or developer user name.
- The "image" option download the current Pharo "stable" version to the current working directory.
Installable packages must contain:
- A Github README.md file
- "pharo" specified as topic.
- A Metacello installation script delimited with smalltalk backticks and ending with a dot ".".
If the current directory already contains a Pharo image, PI will use that image, otherwise it will download a new stable image.
Download the latest Pharo version in the current directory and open the Image:
pi irunCreate a timestamped subdirectory with the latest Pharo version and open the Image:
pi nlrunCreate a timestamped subdirectory with a specific Pharo version (example: version 12) and open the Image:
pi nlrun 12Download a stable Pharo image and VM in the current directory (do not run):
pi imageDownload a specific Pharo image (example: version 12) and VM in the current directory (do not run):
pi image 12Installing NeoCSV package:
pi install NeoCSVInstalling multiple packages:
pi install Diacritics ISO3166 StringExtensionsList packages from GitHub
pi listSearch in GitHub repositories:
pi search microdownOutput 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/BootstrapMagrittein that case, disambiguate specifying /<repository_name>, ex:
pi install grype/Magritte-SwiftIf you experiment problems with pi, please run the collect environment script:
./runPiCollectEnvAnd open an issue with the output in the Issue Tracker).
You can obtain the pi version with:
pi versionWorking 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:
- Fork this repository to your own GitHub account and then clone it to your local device
- Edit the pi file with your favorite text editor.
- Test PI.
- Add to add yourself as author below.
- Finally, submit a pull request with your changes!
- This project follows the all-contributors specification. Contributions of any kind are welcome!
- Have a look at bats.
- Check the .bats files in the tests directory
- Install release-it
- As global
- brew:
brew install release-it - npm:
npm install -g release-it
- brew:
- As global
- Copy or setup a GitHub token
- Evaluate
export GITHUB_TOKEN=...with the coped token as value. Alternatively, log-in to your GitHub account with your web browser and release-it will authenticate. - Ensure NVM is installed and accessible running:
source ~/.nvm/nvm.sh - To interactively deploy run
./deploy.sh
