# API

Visit [dist.pkgx.dev](https://dist.pkgx.dev) for an HTTP index.

* sources (mirror)
  * `dist.pkgx.dev/<PKG>/versions.txt`
  * `dist.pkgx.dev/<PKG>/v<VERSION>.tar.gz`
  * `dist.pkgx.dev/<PKG>/v<VERSION>.sha256sum`
* bottles
  * `dist.pkgx.dev/<PKG>/<PLATFORM>/<ARCH>/versions.txt`
  * `dist.pkgx.dev/<PKG>/<PLATFORM>/<ARCH>/v<VERSION>.tar.gz`
  * `dist.pkgx.dev/<PKG>/<PLATFORM>/<ARCH>/v<VERSION>.tar.xz`
  * `dist.pkgx.dev/<PKG>/<PLATFORM>/<ARCH>/v<VERSION>.asc`
  * `dist.pkgx.dev/<PKG>/<PLATFORM>/<ARCH>/v<VERSION>.sha256sum`

`versions.txt` files are newline separated, sorted lists of available versions\
for each type of distributable.

{% hint style="warning" %}
`dist.pkgx.dev/<PKG>/versions.txt` and the bottle`versions.txt` may not be the same. Always check the more specific`versions.txt`.
{% endhint %}

## The Pantry

The [pantry](https://github.com/pkgxdev/pantry) is our API for pkg metadata.

## libpkgx

Install and run `pkgx` packages from your apps.

* [Rust](https://github.com/pkgxdev/pkgx)
* [TypeScript](https://github.com/pkgxdev/libpkgx)


---

# 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.pkgx.sh/appendix/packaging/pantry-api.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.
