AnisurgeAnisurge / extensions

Introduction to Anisurge Extensions

Complete guide to Anisurge .asx extension packs — declarative JSON streaming pipelines for anime, HLS and MP4 video sources, softsubs, intro/outro skip ranges, and multi-provider catalog.

Anisurge Extensions — Official .asx Pack Catalog

The Anisurge Extensions system allows you to extend the Anisurge app with additional streaming sources using lightweight, declarative .asx pack files. Unlike traditional plugin systems (Aniyomi APKs, CloudStream JS, or Mihon extensions), Anisurge extensions are pure JSON pipelines — no compiled code, no scripting runtime, and no APK installation required.

What is an .asx Extension Pack?

An .asx file is a structured JSON document that defines a pipelines for resolving streaming video URLs. When you play an episode in Anisurge, the app executes the pipeline steps sequentially — each step fetches data, extracts values, or transforms results — ultimately producing a list of video streams with optional subtitles, quality labels, and intro/outro skip timestamps.

Key Characteristics

FeatureDescription
DeclarativePure JSON — no TypeScript, JavaScript, or Kotlin in the pack
LightweightPacks are typically 1-5 KB, downloaded on demand
VersionedMonotonic versionCode enables automatic update detection
SandboxedPipeline execution is isolated; no filesystem or network access beyond declared HTTP requests
Multi-stepSupports HTTP GET, regex extraction, JSON parsing, conditional branches, and video mapping

How Extensions Work in Anisurge

The Anisurge app (Kotlin Multiplatform, build target Android + Desktop) includes a declarative pipeline engine (AsxPipelineRunner) that executes .asx pack steps at playback time. The flow is:

  1. Repository Registration — Add the official or community index URL in Settings → Extensions
  2. Pack Installation — Browse the catalog and tap Install; app downloads the .asx, validates schema, stores locally
  3. Stream Resolution — When playing an episode, the app picks the extension server, injects context variables (anilistId, malId, episode, lang, title), and runs the pipeline
  4. Video Playback — The pipeline returns video URLs with optional subtitles (VTT/SRT), quality ladder, and skip ranges; mpv renders the stream

Official Index

The official extension index is hosted at:

https://raw.githubusercontent.com/Anisurge/extensions/main/index.json

This index lists all published packs with metadata (name, version, description, author, NSFW flag, icon URL, download URL, and minimum app version). The app fetches this index periodically to check for updates.

Available Packs (11 Total)

Anivexa Series — Anivexa API Gateway

Packs that route through the Anivexa API (https://anivexa-api.vercel.app) with predictable URL patterns for each provider.

  • Anivexa AniKoto — MegaPlay and VidWish HLS streams with softsub captions and intro/outro ranges
  • Anivexa AnimeGG — Direct MP4 streams where AnimeGG exposes them
  • Anivexa AniNeko — HLS streams with provider-specific referer headers

Scraper Series — Anisurge Scraper API

Packs that use the Anisurge Batch Scrape API (https://fetch.n92dev.us.kg/api?action=batch_scrape) and map the first playable stream from the selected sub or dub slot.

  • Scraper Anitaku — HLS streams with VTT captions (Anitaku/Gogoanime lineage, vibeplayer .m3u8)
  • Scraper Suzu — HLS streams from Suzu/Senshi with provider headers
  • Scraper 2D Hive — Direct MP4-style stream URLs with necessary headers
  • Scraper AnimeGG — Direct MP4 streams
  • Scraper AnimeHeaven — Direct MP4 streams
  • Scraper AniNeko — HLS streams
  • Scraper MKissa — Direct MP4 streams

Standalone

  • Anokoto — MegaPlay HLS + softsubs from AniList or MAL; the first official .asx pack

Requirements

To use Anisurge Extensions, you need:

  • Anisurge app build ≥ 140 with .asx / ANISURGE engine support
  • Network access to raw.githubusercontent.com (for index and pack downloads)
  • Extensions warning accepted once in Settings → Extensions
  • Android device (deep link flow) or manual repository URL entry

For Developers

Extensions are open source under the MIT License. The entire catalog source, validation scripts, and documentation are available on GitHub:

Pipeline Steps Reference

StepPurpose
http.getFetch HTML or JSON from a URL with custom headers
extract.regexExtract a value using a regular expression capture group
json.parseParse a JSON string into a structured variable
json.getNavigate a parsed JSON object by dot-separated path
map.videosMap resolved values into video stream objects with headers, subtitles, and skip ranges
tryOrdered fallback branches with conditional predicates (gt, eq, exists)

Template Variables

Pipelines use {{variable.path}} syntax to inject runtime context and intermediate results:

VariableSourceDescription
{{anilistId}}Runtime contextAniList media ID for the current title
{{malId}}Runtime contextMyAnimeList ID (0 if unknown)
{{episode}}Runtime contextEpisode number being played
{{lang}}Runtime contextsub or dub
{{title}}Runtime contextBest-effort anime title
{{sources.sources.file}}Pipeline resultNested path after JSON parse

Getting Started

  1. Add the repository — Open Settings → Extensions in Anisurge, tap Add repository, paste the index URL, select engine Anisurge
  2. Install packs — Browse the catalog, tap Install on any pack; the app shows a confirmation dialog then downloads and validates the .asx
  3. Play content — On the watch screen, pick the extension server row (Sub or Dub when supported)
  4. Updates — When a pack versionCode increases, the Extensions list shows an Update badge; tap to reinstall

Need more details? See the Add repository guide, Create an extension, Schema reference, and Testing guide.