Official Plugin Repository for IReader
Extend your reading experience with custom themes, TTS engines, translation services, AI features, and more.
What is This? β’ Plugin Types β’ Quick Start β’ Documentation β’ Community
IReader-plugins is the official plugin development kit and repository for IReader, a cross-platform ebook/novel reader application built with Kotlin Multiplatform.
This repository provides:
- Plugin Build System - Gradle plugins and KSP processors for building IReader plugins
- Plugin API - Interfaces and utilities for plugin development
- Example Plugins - Reference implementations for all plugin types
- Repository Tools - Generate and host your own plugin repository
| Problem | Solution |
|---|---|
| Monolithic apps are hard to customize | Modular plugin architecture |
| New features require app updates | Install plugins on-demand |
| Third-party contributions are difficult | Open plugin ecosystem |
| Feature bloat in main app | Keep core lightweight |
| Type | Interface | What It Does | Examples |
|---|---|---|---|
| Theme | ThemePlugin |
Custom colors, typography, backgrounds | Ocean Theme, Sakura Night, Cyber Neon |
| TTS | TTSPlugin |
Text-to-speech engines | Piper TTS, Edge TTS, XTTS |
| Translation | TranslationPlugin |
Language translation services | OpenAI, DeepSeek, LibreTranslate |
| Feature | FeaturePlugin |
Custom reader features | Reading Stats, Dictionary, Notes |
| AI | AIPlugin |
AI-powered capabilities | Summarizer, Character Analyzer |
- JDK 17+
- Gradle 8.10+
git clone https://github.com/IReaderorg/IReader-plugins.git
cd IReader-plugins# Create plugin directory
mkdir -p plugins/features/my-plugin/src/main/kotlin// plugins/features/my-plugin/build.gradle.kts
plugins {
id("ireader-plugin")
}
pluginConfig {
id.set("com.yourname.my-plugin")
name.set("My Plugin")
version.set("1.0.0")
versionCode.set(1)
description.set("Description of my plugin")
author.set("Your Name")
type.set(PluginType.FEATURE)
permissions.set(listOf(PluginPermission.READER_CONTEXT))
}// plugins/features/my-plugin/src/main/kotlin/MyPlugin.kt
package com.yourname.myplugin
import ireader.plugin.api.*
import ireader.plugin.annotations.*
@IReaderPlugin
@PluginMetadata(
id = "com.yourname.my-plugin",
name = "My Plugin",
version = "1.0.0",
versionCode = 1,
description = "Description of my plugin",
author = "Your Name"
)
class MyPlugin : FeaturePlugin {
override val manifest = PluginManifest(
id = "com.yourname.my-plugin",
name = "My Plugin",
version = "1.0.0",
versionCode = 1,
description = "Description of my plugin",
author = PluginAuthor("Your Name"),
type = PluginType.FEATURE,
permissions = listOf(PluginPermission.READER_CONTEXT),
minIReaderVersion = "1.0.0",
platforms = listOf(Platform.ANDROID, Platform.DESKTOP)
)
override fun initialize(context: PluginContext) {
// Setup your plugin
}
override fun cleanup() {
// Release resources
}
override fun getMenuItems() = listOf(
PluginMenuItem("action", "Do Something", "icon_name")
)
override fun getScreens() = emptyList<PluginScreen>()
override fun onReaderContext(context: ReaderContext): PluginAction? = null
}# Build your plugin
./gradlew :plugins:features:my-plugin:assemble
# Build all plugins
./gradlew buildAllPlugins
# Generate repository index
./gradlew repo| Document | Description |
|---|---|
| Project Overview | What this project is and why it exists |
| Developer Guide | Comprehensive guide for plugin developers |
| Plugin Creation Guide | Step-by-step tutorial for creating plugins |
| Quick Reference | Cheat sheet for common tasks |
| AI Context | Context document for AI assistants |
IReader-plugins/
βββ annotations/ # KSP annotations (@IReaderPlugin, @PluginMetadata, etc.)
βββ compiler/ # KSP processor for compile-time validation
βββ buildSrc/ # Gradle plugin DSL and build logic
βββ plugins/ # Plugin implementations
β βββ themes/ # Theme plugins (12+ themes)
β βββ tts/ # TTS plugins (14+ engines)
β βββ translation/ # Translation plugins (5+ services)
β βββ features/ # Feature plugins (9+ features)
β βββ engines/ # JavaScript engines
β βββ screens/ # Custom reader screens
β βββ sources/ # Source loaders
βββ example/ # Example plugin templates
βββ docs/ # Documentation
βββ repo/ # Generated repository (after build)
βββ gradle/
βββ libs.versions.toml # Version catalog
Arctic Aurora, Coffee Bean, Coral Reef, Cyber Neon, Desert Sand, Mint Fresh, Nordic Frost, Ocean Theme, Royal Velvet, Sakura Night, Slate Gray, Vintage Sepia
Piper TTS, Edge TTS, XTTS v2, Fish Speech, OpenVoice, Bark TTS, Parler TTS, Silero TTS, Style TTS 2, Tortoise TTS, Persian variants
OpenAI, DeepSeek, Ollama, HuggingFace, LibreTranslate
AI Summarizer, Bookmark Manager, Chapter Notes, Quote Highlighter, Reading Goals, Reading Stats, Reading Timer, Reading Tracker, Smart Dictionary
Plugins must declare required permissions:
| Permission | Description | Use Case |
|---|---|---|
NETWORK |
Make HTTP requests | API calls, cloud services |
STORAGE |
Access local storage | Caching, downloads |
READER_CONTEXT |
Access reading state | Text selection, position |
LIBRARY_ACCESS |
Access user's library | Book metadata |
PREFERENCES |
Read/write preferences | User settings |
NOTIFICATIONS |
Show notifications | Background updates |
Plugins support three monetization models:
// Free (default)
monetization.set(PluginMonetizationType.FREE)
// Premium - one-time purchase
monetization.set(PluginMonetizationType.PREMIUM)
price.set(4.99)
currency.set("USD")
trialDays.set(7)
// Freemium - free with paid features
monetization.set(PluginMonetizationType.FREEMIUM)Built plugins are packaged as .iplugin files (ZIP archives):
my-plugin.iplugin
βββ plugin.json # Generated manifest
βββ classes.jar # JVM/Desktop classes
βββ android/
βββ classes.dex # Android DEX (if d8 available)
- Build your plugins:
./gradlew buildAllPlugins - Generate repository:
./gradlew repo - Host the
repo/directory on GitHub Pages or any web server - Users add your repository URL in IReader: Community Hub β Plugin Repositories β Add Repository
- Discord: IReader Community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Mozilla Public License 2.0
Made with β€οΈ by the IReader Team
