OPI is a package index for FOAM projects. It has the goal to simplify discovery and installation of community based packages.
Adding a package to the index is simple.
Fork this repository, and add the package meta data as a json file to pkg/<your_package>/metadata.json.
You can use the template metadata.json file in the root of this repository.
Please note that the package name should be in lower case.
An example is given below
{
"name": "ogl", # required
"repo": "https://github.com/hpsim/OGL.git", # required
"description":"GPU capable linear solver", # A short description to print in CLI max 80 chars
"type": "lib", # optional, possible values: [lib,app,data,solver]
"version": [">=2304", "<8"], # optional, required FOAM version possible format examples: [ 2304, 8, 0.1.0]
"requires": ["other-package"] # optional, list of other OPI packages that need to be installed before
"keywords": ["GPU", "linear solver"] # optional keywords for searching and grouping e.g. turbulence, scheme
}
For non-standard (i.e., non-wmake–based) builds, you can also include a "build" field in the metadata.json file with a list of shell commands needed to build the package.
styro: community package manager
styro is a community package manager for OpenFOAM that can install and manage packages listed here in OPI.
We encourage you to add a badge in your README referencing the index entry for your package.
As an example, dynamic JSON badges from shields.io can be useful, set:
urlto the raw JSON file you PR'd, eg.https://raw.githubusercontent.com/exasim-project/opi/refs/heads/main/pkg/ogl/metadata.jsonqueryto$.[name,type,version]for example (optional fields will be ignored if not present)labeltoOPIlabelColorto#0cc8cfandcolorto#131d36
You can then paste the link to the badge into your README file, it will look like this: