Skip to content

User Guide RQP Packages

Leonard Ramminger edited this page May 10, 2026 · 3 revisions

Using Native rqp Packages

Prev: Remote Protocol Reference | Up: User Guide | Next: Troubleshooting

rqp is ReqPack's built-in native package manager. Use it when you want ReqPack to install and track packages directly instead of wrapping another package manager such as apt, dnf, or npm.

This is especially useful for:

  • internal tools,
  • portable CLI artifacts,
  • self-contained package sets,
  • plugin or tool distribution where no external package manager is a good fit.

Configure Native Repositories and State

rqp uses two config keys:

rqp = {
  repositories = {
    "https://packages.example.test/index.json",
    "file:///srv/rqp/index.json",
  },
  statePath = "~/.local/share/reqpack/rqp/state",
}
  • repositories: list of repository index URLs or local file URLs
  • statePath: where installed rqp package state is stored

Do not confuse rqp.repositories with config.repositories:

  • rqp.repositories is for native rqp package indexes,
  • config.repositories is for other plugins such as Maven-style or internal wrapper repositories.

Install Packages

Install from a repository

rqp install rqp my-tool
rqp install rqp my-tool@1.2.3

Repository resolution chooses the best matching package for the current host architecture. Selection order is:

  1. version,
  2. release,
  3. revision.

If you request only my-tool@1.2.3, ReqPack still picks highest matching release and revision for that version.

Install from a local package file

rqp install rqp ./my-tool.rqp

Install from an extracted archive or directory

If the target directory contains a nested .rqp file, ReqPack can install it too.

rqp install rqp ./artifact-dir

Manage Installed Native Packages

rqp list rqp
rqp info rqp my-tool
rqp remove rqp my-tool
rqp update rqp my-tool

Notes:

  • update works best for packages that were originally installed from an rqp repository
  • if multiple installed versions exist and you do not specify one, remove/update can fail intentionally rather than guessing
  • installed identity includes version, release, and revision, so one package name can legitimately have multiple installed identities

How Installed State Is Stored

Installed native packages live below rqp.statePath. The layout is:

<statePath>/<name>/<name>@<version>-<release>+r<revision>/

Each installed package keeps:

  • metadata.json
  • reqpack.lua
  • source.json
  • manifest.json
  • scripts/

This is how ReqPack knows what was installed, where it came from, and how to remove it later.

When to Use rqp

Choose rqp when:

  • you want ReqPack-native packages and repos,
  • you want installation state managed entirely by ReqPack,
  • you do not want to depend on an external system package manager,
  • you want package lifecycle hooks inside the package itself.

Choose a wrapper plugin instead when:

  • a real package manager already exists for that ecosystem,
  • you mainly want a unified CLI over an existing tool,
  • system-native dependency resolution should stay in the original package manager.

Related Pages

If you want to build your own native packages or repositories, read:

Prev: Remote Protocol Reference | Up: User Guide | Next: Troubleshooting

Clone this wiki locally