# 16.Provides

{% code overflow="wrap" %}

```yaml
#Example ONLY
# $pkg itself will always be a default value, so not needed if contains only 1 program and that 1 program is $pkg itself
provides:
  - "prog-a"
  - "prog-b"
```

{% endcode %}

* [x] This is Optional & can be left empty or removed completely (**TYPE**: <mark style="color:green;">**`RECOMMENDED`**</mark>)
* [x] This lists all programs that are fetched/built during the <mark style="color:purple;">**`x_exec.run`**</mark> part.
* [x] If this field is empty or doesn't exist, the interpreter will use <mark style="color:purple;">**`$pkg`**</mark> as the only value of <mark style="color:purple;">**`provides`**</mark> by default.
* [x] If this field exists, soar will treat it as a <mark style="color:purple;">**`$pkg`**</mark> family containing all programs from <mark style="color:purple;">**`provides`**</mark>
* [x] <mark style="color:orange;">**`soar install`**</mark> <mark style="color:purple;">**`$pkg`**</mark> by default, will install all programs from <mark style="color:purple;">**`provides`**</mark>. This is the same as `$pkg` when `provides` is empty/nonexistent.
* [x] <mark style="color:orange;">**`soar install`**</mark> <mark style="color:purple;">**`$pkg/$prog`**</mark> will only install <mark style="color:purple;">**`$prog`**</mark> from the <mark style="color:purple;">**`$pkg`**</mark>'s <mark style="color:orange;">**`.SBUILD`**</mark>
* [x] Can have single or multiple entries

***

### alias

{% hint style="info" %}
It is possible to specify <mark style="color:blue;">**aliases**</mark> with <mark style="color:purple;">**`:`**</mark> as a separator, **provided that the original $prog is the first value** (Only used for <mark style="color:blue;">**METADATA**</mark>)

{% code overflow="wrap" %}

```yaml
#Example ONLY
# $pkg itself will always be a default value, so not needed if contains only 1 program and that 1 program is $pkg itself, however we can name it explictly if the prog is also known by another name with :
provides:
  - "prog-original:prog-alias"
  #Example:
  # - "chaos:chaos-cli" --> Chaos is same as `.pkg`, but since `chaos-cli` is also defined, searching for either chaos:chaos-cli will return the same result
  
#If a $pkg has multiple aliases, it can be specified by using : before each alias
provides:
  - "prog-original:prog-alias-1:prog-alias-2:prog-alias-3"
```

{% endcode %}
{% endhint %}

***

### symlink

{% hint style="info" %}
It is possible to specify <mark style="color:blue;">**symlinks**</mark> with <mark style="color:purple;">**`==`**</mark> as a separator, **provided that the original $prog is the first value** ([<mark style="color:orange;">**`INSTALL_ONLY`**</mark>](#user-content-fn-1)[^1])

{% code overflow="wrap" %}

```yaml
#Example ONLY
# $pkg itself will always be a default value, so not needed if contains only 1 program and that 1 program is $pkg itself, however we can name it explictly if the prog is also meant to be Symlinked with known by another name with ==
provides:
  - "prog-original==prog-symlink"
  #Example:
  # - "busybox==whoami" --> busybox is the main program , but since `whoami` is also defined, soar will create a whoami symlink that points to buysbox
  
#If a $pkg has multiple symlinks, it can be specified in this way
provides:
  - "prog-original==prog-symlink-1"
  - "prog-original==prog-symlink-2"
  - "prog-original==prog-symlink-3"
```

{% endcode %}
{% endhint %}

#### symlink-only

{% hint style="warning" %}
It is possible to specify a symlink-only[^2] operation with <mark style="color:purple;">**`=>`**</mark> as a separator, **provided that the original $prog is the first value** ([<mark style="color:orange;">**`INSTALL_ONLY`**</mark>](#user-content-fn-3)[^3])

**This also means, Only the&#x20;**<mark style="color:orange;">**SYMLINK**</mark>**&#x20;would be available in&#x20;**<mark style="color:orange;">**$PATH**</mark>

{% code overflow="wrap" %}

```yaml
provides:
  - "prog-original=>prog-new" # prog-original would get symlinked as prog-new
 #Example:
  # - "ripgrep=>rg" --> ripgrep is the main program , but since `rg` is also defined with =>, soar will symlink the ripgrep package as rg in BINDIR
  #Only renames the symlink, the original name will still be present in INSTALL_DIR
  #When Invoked from the cmdline, only rg would be found
```

{% endcode %}
{% endhint %}

***

[^1]: Not supported or understood by the builder\
    Rather, soar will parse & perform it

[^2]: The symlink, NOT the real package itself

[^3]: Not supported or understood by the builder,\
    Rather, soar will parse & perform it\
    Just use x\_exec.run to do it & specify correct provides from the get-go\\


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pkgforge.dev/sbuild/specification/16.provides.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
