Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!


Marelle ("hopscotch")

Test-driven system administration in SWI-Prolog, in the style of Babushka.

Current status

Deliciously pre-alpha.

Hopscotch for Seniors

Installing marelle

1. Get prolog

On OS X, with homebrew

# install prolog
brew install swi-prolog

On Ubuntu

# install prolog
sudo apt-get install swi-prolog

2. Clone the repo

# clone the repo
mkdir -p ~/.local
git clone ~/.local/marelle

# set up an executable
cat >~/.local/bin/marelle <<EOF
exec swipl -q -t main -s ~/.local/marelle/ "$@"
chmod a+x ~/.local/bin/marelle

Writing deps

Make a marelle-deps/ folder inside your project repo. Each package has two components, a detect/2 goal and an install/2 goal, which can be written independently.

For example, suppose I want Python installed on OS X with Homebrew. I might write a dep:

detect(python, osx) :- exists_file('/usr/local/bin/python').
install(python, osx) :- shell('brew install python').

Running deps

See what's installed

This runs every detect/2 statement that's valid for your platform.

marelle installed

Install something

This will run the install/2 clause for your package, provided a valid one exists for your current platform.

marelle install python

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.