- Custom Templates
Custom Templates
Build your own AIOStreams templates using the Configurator or manual JSON editing
Building Custom Templates
The recommended way to create a custom AIOStreams template is through the Core Builds Configurator. It generates a complete, valid template JSON from your selections — service, device, resolution, audio, scrapers, and filtering preferences.
Launch Configurator
Interactive template builder — generates optimised AIOStreams JSON through a guided UI.
Template JSON Structure
AIOStreams templates are JSON files with two top-level sections:
{
"metadata": {
"id": "my-template",
"name": "My Template",
"version": "1.0.0",
"description": "What this template does"
},
"config": {
"presets": [],
"services": [],
"sortCriteria": {},
"excludedStreamExpressions": [],
"includedStreamExpressions": [],
"preferredStreamExpressions": [],
"excludedRegexPatterns": [],
"rankedRegexPatterns": [],
"formatter": {},
"deduplicator": {}
}
}
Key Config Sections
| Section | Purpose |
|---|---|
presets | Scraper addons (Torrentio, Comet, MediaFusion, etc.) with credentials and settings |
services | Debrid/usenet service credentials (TorBox, AllDebrid, Real-Debrid, EasyNews) |
sortCriteria | Multi-key stable sort — global, movies, series, anime, plus cached/uncached variants |
excludedStreamExpressions | ESEs — filters that remove unwanted streams (SEL syntax) |
includedStreamExpressions | ISEs — filters that protect streams from exclusion (SEL syntax) |
preferredStreamExpressions | PSEs — scoring tiers that rank streams by quality (SEL syntax) |
formatter | Stream display format using the tamtaro or custom formatter DSL |
deduplicator | Deduplication rules — hash, title similarity, tiebreakers |
Sort Criteria
Each sort section is an array of { key, direction } objects. Position 1 is the primary sort; subsequent keys break ties.
{
"sortCriteria": {
"global": [
{ "key": "cached", "direction": "desc" },
{ "key": "streamExpressionMatched", "direction": "desc" },
{ "key": "streamExpressionScore", "direction": "desc" },
{ "key": "resolution", "direction": "desc" },
{ "key": "quality", "direction": "desc" },
{ "key": "bitrate", "direction": "desc" },
{ "key": "size", "direction": "desc" }
]
}
}
Use "direction" — not "order". AIOStreams rejects templates that use "order".
Manual Editing Tips
- Start from an existing template — download one from the Template Directory and modify it
- Validate before import — use the Template Inspector to check for errors
- Never hardcode API keys — AIOStreams prompts for credentials on import
- Test on your target host — elfhosted and fortheweak have different regex and URL allowlists
The Configurator handles all expression architecture, regex scoring, sort criteria, and host compatibility automatically. Manual editing is only needed for advanced customisation beyond what the Configurator offers.