01 Step 3: The plugin

  /plugins/my-shelf/
  +-- device.json
  +-- README.md

device.json:

  {
    "title": "My Shelf",
    "description": "My own EPUB collection.",
    "browse": {
      "url": "https://raw.githubusercontent.com/<you>/my-shelf/main/all.json",
      "items": "books",
      "page_size": 10,
      "fields": {
        "title": "title",
        "author": "author",
        "id": "id",
        "url": "file",
        "description": "summary"
      },
      "lists": [
        { "title": "All books" },
        { "title": "Science fiction",
          "url": "https://raw.githubusercontent.com/<you>/my-shelf/main/scifi.json" }
      ]
    },
    "download": {
      "url": "{url}",
      "dest_dir": "/Books/My Shelf",
      "filename": "{title}.epub",
      "sidecar": {
        "path": "{dest}.meta.json",
        "body": "{\"myshelf_id\":\"{id}\"}"
      }
    }
  }

README.md is optional. Note that a catalog plugin never shows its README on the reader: selecting it opens the catalog. The README is still useful for people browsing the files, and for Plugin Hub.
Reader file (.txt)