Skip to content

Package Manifest ​

The package manifest file tooth.json defines a lip package.

TIP

You can use variables from other fields in any string field by wrapping the variable name in {{}} like {{version}} and {{info.name}}. For example, {{version}} will be replaced with the value of the version field.

Example ​

json
{
  "format_version": 3,
  "format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
  "tooth": "github.com/user/repo",
  "version": "1.0.0",
  "info": {
    "name": "My Package",
    "description": "A short description",
    "tags": ["tool", "utility"],
    "avatar_url": "https://example.com/avatar.png"
  },
  "variants": [
    {
      "label": "",
      "platform": "win-x64",
      "dependencies": {
        "github.com/other/package": ">=1.0.0"
      },
      "assets": [
        {
          "type": "zip",
          "urls": ["https://example.com/release.zip"],
          "placements": [
            {
              "type": "dir",
              "src": "bin/",
              "dest": "bin/"
            }
          ]
        }
      ],
      "preserve_files": ["config/*.json"],
      "remove_files": ["temp/"],
      "scripts": {
        "pre_install": ["echo pre-install"],
        "post_install": ["echo post-install"],
        "pre_uninstall": ["echo pre-uninstall"],
        "post_uninstall": ["echo post-uninstall"]
      }
    }
  ]
}

Fields ​

Top-Level ​

FieldTypeRequiredDescription
format_versionintYesMust be 3.
format_uuidstringYesMust be "289f771f-2c9a-4d73-9f3f-8492495a924d".
toothstringYesPackage path. Must be a valid Go module path.
versionstringYesPackage version. Must be a valid semantic version.
infoobjectNoPackage metadata. See Info.
variantsarrayNoPackage variants. See Variant.

Info ​

FieldTypeDefaultDescription
namestring""Display name.
descriptionstring""Short description.
tagsstring[][]Tags. Each tag must match ^[a-z0-9-]+(:[a-z0-9-]+)?$.
avatar_urlstringnullAvatar image URL.

Variant ​

A variant defines platform-specific or labeled package configurations. When resolving a variant, lip merges all variants whose label and platform match.

FieldTypeDefaultDescription
labelstring""Variant label.
platformstring""Target platform (.NET RID). Empty matches all. Supports glob matching.
dependenciesobject{}Map of package ID to semver range.
assetsarray[]Asset definitions. See Asset.
preserve_filesstring[][]Glob patterns for files to preserve during uninstall.
remove_filesstring[][]Glob patterns for additional files to remove during uninstall.
scriptsobject{}Lifecycle scripts. See Scripts.

Asset ​

FieldTypeRequiredDescription
typestringYesArchive type: "self", "tar", "tgz", "uncompressed", or "zip".
urlsstring[]NoDownload URLs.
placementsarrayNoFile placement rules. See Placement.

Placement ​

FieldTypeRequiredDescription
typestringYes"file" or "dir".
srcstringYesSource path within the archive.
deststringYesDestination path relative to the workspace. Must not be absolute, rooted, or contain ...

Scripts ​

FieldTypeDefaultDescription
pre_installstring[][]Commands to run before installation.
installstring[][]Alias for post_install. Runs after package files are placed.
post_installstring[][]Commands to run after installation.
pre_uninstallstring[][]Commands to run before uninstallation.
uninstallstring[][]Alias for pre_uninstall. Runs before installed files are removed.
post_uninstallstring[][]Commands to run after uninstallation.

Prefer post_install and pre_uninstall in new manifests. install and uninstall are supported as compatibility aliases for the same lifecycle phase. If both forms are present, lip runs both lists in that phase.