Skip to content

gloat-install -- Installing Gloat

Gloat has zero dependencies - everything installs automatically on first use.

There are two main ways to get started: cloning the repository and sourcing the .rc file, or the quick install script.

For Bash, Fish or Zsh:

git clone https://github.com/gloathub/gloat
source gloat/.rc
gloat --help

The source gloat/.rc command adds the gloat command to your PATH, enables the gloat* man pages and sets up gloat tab completion.

On first run, Gloat will automatically install all required tools (Go, Glojure, YAMLScript, Babashka, etc) to .cache/local/ within the project directory. Just run gloat --help once to complete the setup.

To make Gloat available permanently, simply add this to your shell's (Bash, Zsh or Fish) rc file (~/.bashrc, ~/.config/fish/config.fish or ~/.zshrc):

source /path/to/gloat/.rc

Yes, that command and .rc file actually supports all three shells!

Quick Install

For Bash or Zsh, install gloat for the current shell session:

source <(curl -sL in-1.cc) gloat

For Fish:

curl -sL in-1.cc | source - gloat

This uses in-1, which clones itself to /tmp/in-1, installs gloat and all of its dependencies under that directory, and then adds the gloat command to your current PATH along with the gloat* man pages and gloat tab completion. Nothing else on your system changes.

Pass in-1 arguments after gloat to pin a version or choose a different directory (this works the same in Fish):

source <(curl -sL in-1.cc) gloat GLOAT-VERSION=0.1.37
source <(curl -sL in-1.cc) gloat PREFIX=~/.gloat

To keep gloat around for good, install the in-1 command (see https://in-1.cc/install/) and run:

in-1 --local gloat

That installs gloat under ~/.local/share/gloat/<version> and writes a gloat wrapper into ~/.local/bin, which works from any shell with no further setup.

Upgrading

Upgrade gloat to the latest release:

gloat --upgrade

Pin (or roll back) to a specific version:

gloat --upgrade=v1.2.3

In both cases, gloat will:

  1. Switch the local checkout to the target tag.
  2. Remove .cache/.
  3. Install the core dependencies that pair with that gloat release, including the matching GLJ version. The YAMLScript compiler is installed later if a .ys file is compiled.

If your clone has uncommitted changes, --upgrade will refuse and ask you to stash or commit them first.

If you installed via the Makefile installer, the checkout under ~/.local/share/gloat is detached-HEAD and upgrading there always works.

If you installed via the quick install, upgrade with in-1 instead, which installs the release that its Makes module currently pins, alongside the old one:

source <(curl -sL in-1.cc) -U gloat
in-1 -U --local gloat

Pass GLOAT-VERSION=x.y.z to pick a release yourself.

Resetting the Cache

If something gets stuck or you want to force a fresh dependency install without changing version:

gloat --reset

This removes .cache/ entirely (binaries, build artifacts, REPL working dirs). The next gloat invocation reinstalls everything.

Uninstalling

If you used the quick install, everything lives under /tmp/in-1 (or the PREFIX you gave), so removing that directory is all it takes:

rm -rf /tmp/in-1

For an in-1 --local gloat install, remove the versioned directory and the wrappers:

rm -rf ~/.local/share/gloat/<version> ~/.local/bin/gloat ~/.local/bin/gloat-*

If you used the Makefile installer:

make -f <(curl -sL gloathub.org/make) uninstall
make -f <(curl -sL gloathub.org/make) uninstall-glj   # if you installed glj

This removes the gloat symlink from ~/.local/bin and the cloned tree from ~/.local/share/gloat (use PREFIX=... if you installed to a custom prefix). After uninstalling, remove the source .../.rc line you added to your shell rc, or new shells will fail to start.

If you used the clone method, uninstalling is just removing the clone and the source line:

rm -rf /path/to/gloat
# Then remove the `source /path/to/gloat/.rc` line from your shell rc.