Anisurge / extensions
GitHub

Schema reference

Schema version 1 · engine ANISURGE · single UTF-8 JSON file ending in .asx

Top-level fields

FieldTypeRequiredNotes
schemaVersionintyesMust be 1
idstringyes[a-z0-9-]+
namestringyesDisplay name
versionstringyesUI string, e.g. 1.2.0
versionCodeintyesMonotonic; used for updates
languagestringnoDefault all
nsfwboolnoDefault false
descriptionstringno
author / homepage / iconUrlstringno
minAppVersionCodeintnoSkip if app is older
capabilitiesobjectnosubDub, resolveBy[]
defaults.headersobjectnoMerged into each http.get
pipeline.resolvearrayyesNon-empty step list

Steps

http.get

{
  "step": "http.get",
  "url": "https://example.com/x/{{anilistId}}/{{episode}}",
  "headers": { "Accept": "text/html" },
  "saveAs": "pageHtml",
  "optional": false
}
  • Merges defaults.headers, then step headers
  • Saves response body text to saveAs
  • Non-2xx fails unless optional: true

extract.regex

{
  "step": "extract.regex",
  "from": "pageHtml",
  "pattern": "data-id=\"(\\d+)\"",
  "group": 1,
  "saveAs": "dataId",
  "onlyIfMissing": "dataId"
}

json.parse / json.get

{ "step": "json.parse", "from": "sourcesBody", "saveAs": "sources" }
{ "step": "json.get", "from": "sources", "path": "sources.file", "saveAs": "streamUrl" }

map.videos

{
  "step": "map.videos",
  "file": "{{sources.sources.file}}",
  "quality": "Auto",
  "headers": { "Referer": "https://example.com/" },
  "subtitles": {
    "from": "sources.tracks",
    "urlKey": "file",
    "labelKey": "label"
  },
  "intro": "sources.intro",
  "outro": "sources.outro"
}

try

Ordered branches; first that completes without error wins. Optional when:

opMeaning
gtnumeric greater than value
eqequality
existsvar non-empty

index.json

{
  "schemaVersion": 1,
  "name": "Anisurge Official Extensions",
  "engine": "ANISURGE",
  "extensions": [
    {
      "id": "anokoto",
      "name": "Anokoto",
      "version": "1.0.0",
      "versionCode": 1,
      "downloadUrl": "https://raw.githubusercontent.com/Anisurge/extensions/main/extensions/anokoto/anokoto.asx",
      "minAppVersionCode": 140
    }
  ]
}