Installing Packages

Soar provides several flexible ways to install packages. This guide covers all installation methods and options.

Basic Installation

To install a package, use either the install command or its aliases:

# Using install command
soar install <package>

# Using shorter alias
soar i <package>

# Using add alias
soar add <package>

Example: Install the soar package

soar add soar

Installing from Specific pkg_id

Packages can be organized into pkg_id (like family). To install a package from a specific pkg_id:

soar add <package>#<pkg_id>

Example: Install the cat package from the git.busybox.net.busybox.standalone.glibc pkg_id. Yep, a really long pkg_id.

soar add cat#git.busybox.net.busybox.standalone.glibc

Installing from Specific Repository

To install a package from a specific repository:

soar add <package>:<repository_name>

Example: Install the 7z package from the bincache repository

soar add 7z:bincache

Installing Multiple Packages

To install multiple packages, list them after the command:

soar add <package1> <package2> <package3>

Example: Install the bat and 7z packages

soar add bat 7z

Pin package to specific version

To pin package at specific version:

soar add <package>@<version>

Example: Install the soar package and pin at version 0.5.2.

soar add [email protected]
Currently there is no way to unpin the package. This will be introduced gradually.

Installing All Packages provided by a pkg_id

To install all the packages provided by a pkg_id git.busybox.net.busybox.standalone.glibc:

soar add '#git.busybox.net.busybox.standalone.glibc'

OR, if you don't know full pkg_id but know cat is in it. This will search for all pkg_ids cat is in and prompt you to choose one:

soar add 'cat#all'

Force Installation

To force installation even if the package already exists, use the --force flag:

soar add <package> --force

Example: Install the bat package even if it already exists

soar add bat --force

Non-Interactive Installation

By default, Soar prompts for confirmation before installing packages if multiple packages are found for the given query. To skip this prompt, use the --yes flag:

soar add <package> --yes

Example: Install the cat package without confirmation

soar add cat --yes
Note: The `--yes` flag is useful for non-interactive installations, but it's generally recommended to use it with caution. It will install the first package if multiple packages are found.