Skip to main content

Quick Start

aqua is a CLI tool to install CLI tools with declarative YAML configuration. In this quick start, let's install aqua and install tools with aqua.

Demo

Please see Demo.

Quick Start with Katacoda

You can do the Quick Start with Katacoda. You don't have to install anything in your laptop. The content is same as this document.

https://www.katacoda.com/szksh/scenarios/aqua-quick-start

ref. Source code of the scenario

Install aqua

Homebrew

$ brew install aquaproj/aqua/aqua

Install script (aqua-installer)

$ curl -sSfL \
https://raw.githubusercontent.com/aquaproj/aqua-installer/v1.0.0/aqua-installer |
bash
# You can change the install path.
# bash -s -- -i ~/bin/aqua

Add ${AQUA_ROOT_DIR}/bin to the environmenet variable PATH.

$ export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"

Confirm if aqua is installed correctly.

$ aqua -v

If you want to try this tutorial in the clean environment, container is useful.

$ docker run --rm -ti alpine:3.15.0 sh
# apk add curl
# curl -sSfL \
https://raw.githubusercontent.com/aquaproj/aqua-installer/v1.0.0/aqua-installer |
sh
# adduser -D foo
# su foo
$ mkdir ~/workspace
$ cd ~/workspace
$ export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"

Create a configuration file

Create a configuration file by aqua init command.

$ aqua init # aqua.yaml is created
$ cat aqua.yaml
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
registries:
- type: standard
ref: v2.5.0 # renovate: depName=aquaproj/aqua-registry

packages:

packages is still empty, so let's add packages to install them.

Install tools with aqua

Let's install GitHub Official CLI and fzf with aqua.

Add packages to aqua.yaml.

---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
registries:
- type: standard
ref: v2.5.0 # renovate: depName=aquaproj/aqua-registry

packages:
- name: cli/cli@v2.2.0
- name: junegunn/fzf@0.28.0

Then run aqua i.

$ aqua i 
INFO[0000] download and unarchive the package aqua_version=1.3.0 package_name=aqua-proxy package_version=v0.2.1 program=aqua registry=
INFO[0001] create a symbolic link aqua_version=1.3.0 link_file=/home/foo/.local/share/aquaproj-aqua/bin/aqua-proxy new=../pkgs/github_release/github.com
/aquaproj/aqua-proxy/v0.2.1/aqua-proxy_linux_amd64.tar.gz/aqua-proxy program=aqua
INFO[0001] create a symbolic link aqua_version=1.3.0 link_file=/home/foo/.local/share/aquaproj-aqua/bin/gh new=aqua-proxy program=aqua
INFO[0001] create a symbolic link aqua_version=1.3.0 link_file=/home/foo/.local/share/aquaproj-aqua/bin/fzf new=aqua-proxy program=aqua
INFO[0001] download and unarchive the package aqua_version=1.3.0 package_name=cli/cli package_version=v2.2.0 program=aqua registry=standard
INFO[0001] download and unarchive the package aqua_version=1.3.0 package_name=junegunn/fzf package_version=0.28.0 program=aqua registry=standard

Congratulation! Tools are installed correctly.

$ command -v gh
/home/foo/.local/share/aquaproj-aqua/bin/gh

$ gh version
gh version 2.2.0 (2021-10-25)
https://github.com/cli/cli/releases/tag/v2.2.0

$ command -v fzf
/home/foo/.local/share/aquaproj-aqua/bin/fzf

$ fzf --version
0.28.0 (e4c3ecc)

aqua installs tools in ${AQUA_ROOT_DIR}.