Updates Manager is a plugin for KOReader that helps you manage updates for patches and plugins from multiple GitHub repositories.
- Multi-Repository Updates: Automatically check for updates from multiple GitHub repositories
- Selective Updates: Choose which patches/plugins to update with checkboxes
- Smart Caching: Repository data is cached to reduce API calls and improve performance
- Rate Limit Handling: Automatically handles GitHub API rate limits with intelligent retry logic
- Progress Display: Real-time progress updates during update checks
- Safe Installation: Backs up existing files before updating
- Preserve files on plugin update: Optional
preserve_filesin repo config keeps user config/API keys etc. when updating a plugin (paths with subfolders supported) - MD5 Verification: Validates file integrity using MD5 checksums
- Patch Descriptions: Automatic extraction from comments, local editing
- Plugin Version Management: Automatic version comparison for plugins
- Network Management: Automatic Wi-Fi connection handling
- Error Handling: Graceful handling of network errors and API limits
- Repository Management UI: Add/remove repositories through the plugin interface
- Update Notifications: Automatic background checks for updates
- Download the latest release from the Releases page
- Extract the
updatesmanager.kopluginfolder to your KOReaderpluginsdirectory - Restart KOReader
The plugin menu is organized into three main sections:
- Patches: Manage patch updates
- Check for Updates
- Force Refresh (ignore cache)
- Installed Patches
- Plugins: Manage plugin updates
- Check for Updates
- Force Refresh
- Installed Plugins
- Settings: Configuration options
- Repository Settings
- Clear Cache
Force Refresh bypasses the cache and fetches fresh data from all repositories. Use it when:
- You suspect the cache is outdated
- You want to check for updates immediately after a repository change
- You're experiencing issues with update detection
Note: Force Refresh will make more API calls and may take longer, especially with many repositories.
⚠️ Your custom patch modifications will be overwritten!
When you update a patch, any local modifications you made to the patch file will be completely replaced with the version from the repository.
- The plugin creates a backup (
.oldfile) before updating - If you've modified a patch, consider:
- Creating your own repository with your modified version
- Documenting your changes before updating
- Restoring from the
.oldbackup if needed
- Open KOReader menu
- Navigate to Updates Manager → Patches → Check for Updates
- The plugin will scan all configured patch repositories for updates
- Select which patches you want to update using checkboxes
- Long-press on any patch to view detailed information
- Click Update Selected to install updates
- Navigate to Updates Manager → Patches → Installed Patches
- View list of all installed patches with description previews
- Tap on a patch to see detailed information
- Use Edit Description to customize the patch description
- View patch details (from update list or installed patches)
- Click Edit Description
- Enter or modify the description
- Click Save
Descriptions are saved locally and take priority over repository descriptions.
If you've modified a patch and don't want it to appear in the update list, you can add it to the ignore list.
How to ignore a patch:
- Create or edit the file:
KOReader/settings/updatesmanager_ignored_patches.txt - Add one patch name per line (without
.luaextension) - Lines starting with
#are treated as comments - Empty lines are ignored
Example file:
# Patches I've modified and don't want to update
2-custom-folder-fonts
2-percent-badge
# Another modified patch
my-custom-patch
Notes:
- Patch names should be without the
.luaextension - The file is read each time you check for updates
- Ignored patches will not appear in the update list
- You can still manually update ignored patches by removing them from the ignore list
- Create a GitHub repository with your patches (e.g.,
KOReader.patches) - Add your repository to the plugin configuration (see Repository Configuration)
Want to add your repository to the default list?
You can create a pull request to add your repository to the plugin's default repository list. This way, all users will have access to your patches without manual configuration.
- Fork the Updates Manager plugin repository
- Add your repository to
config.luain theDEFAULT_PATCH_REPOStable - Create a pull request with a description of your patches repository
- Your PR will be reviewed and merged, making your patches available to all users
The plugin automatically extracts descriptions from comments at the beginning of patch files:
-- This patch allows customizing folder fonts
-- You can set different fonts for different folders
-- Supports both system and custom fonts
local ok, guard = pcall(require, "patches/guard")
-- ... rest of patch codeThe plugin will:
- Extract comment lines (starting with
--) - Skip metadata comments (version checks, requirements, etc.)
- Skip decorative lines (========, ----, etc.)
- Stop at the first non-comment line
Patch descriptions are loaded in the following priority order:
-
Local user-edited descriptions (highest priority)
- Stored in
KOReader/settings/updatesmanager_patch_descriptions.json - Can be edited through the plugin UI
- Stored in
-
Comments in patch files (lowest priority)
- Parsed from comment lines at the beginning of patch files
- Open KOReader menu
- Navigate to Updates Manager → Plugins → Check for Updates
- The plugin will check all configured plugin repositories for updates
- Select which plugins you want to update using checkboxes
- Long-press on any plugin to view detailed information (version, release notes)
- Tap the small changelog label or icon next to a plugin to preview the release notes for that specific version without leaving KOReader
- Click Update Selected to install updates
- Navigate to Updates Manager → Plugins → Installed Plugins
- View list of all installed plugins with versions
- Tap on a plugin to see detailed information (version, description, path)
Note: Default KOReader plugins (like archiveviewer, autodim, etc.) are hidden from this list as they are updated with KOReader itself.
How version checking works:
- The plugin reads the
versionfield from your plugin's_meta.luafile - It compares this version with the latest GitHub Release tag
- If the release version is newer, an update is shown
Important: You must specify a version in _meta.lua for the plugin to work correctly!
Edit your plugin's _meta.lua file and add a version field:
return {
name = "myplugin",
fullname = "My Plugin",
description = "Description of my plugin",
version = "1.0.0", -- ← Add this line!
}Version Format:
- Use semantic versioning (e.g.,
"1.0.0","1.2.3","2.0.0-beta.1") - The plugin supports versions with or without
vprefix (e.g.,"v1.0.0"or"1.0.0") - Versions are compared using semantic versioning rules
- If your
_meta.luadoesn't have aversionfield, the plugin will show"unknown"as the current version - The plugin will always show an update available if the version is
"unknown", even if you're already on the latest release - Always add a version to your
_meta.luato avoid false update notifications
- Create a GitHub Release in your plugin repository
- Use version tags that match your
_meta.luaversion (e.g.,v1.0.0,1.0.0) - Attach a ZIP file containing your plugin folder (e.g.,
myplugin.koplugin.zip) - The plugin will automatically detect and offer the update
Release Requirements:
- Release tag should match or be compatible with the version in
_meta.lua - Release must have at least one asset (ZIP file)
- ZIP file should contain the plugin folder (e.g.,
myplugin.koplugin/)
- Create a GitHub repository for your plugin (e.g.,
myplugin.koplugin) - Add version to
_meta.lua(see above) - Create GitHub Releases with version tags
- Add your repository to the plugin configuration (see Repository Configuration)
Want to add your plugin to the default list?
You can create a pull request to add your plugin to the plugin's default repository list. This way, all users will have access to your plugin updates without manual configuration.
- Fork the Updates Manager plugin repository
- Add your plugin repository to
config.luain theDEFAULT_PLUGIN_REPOStable - Create a pull request with a description of your plugin
- Your PR will be reviewed and merged, making your plugin available to all users
If your plugin requires user-specific files (e.g. a config file with an API key, or a file created from an example during setup), those files would normally be overwritten when the user updates the plugin via Updates Manager (the plugin directory is replaced with the new release).
You can ask for your repository entry to include preserve_files: a list of paths (relative to the plugin directory) that are saved before the update and restored after the new version is extracted. Only existing files are saved; paths are normalized (forward slashes, no leading slash).
- In the default list: when adding your plugin to
DEFAULT_PLUGIN_REPOS, include e.g.preserve_files = {"config.lua", "api_key.txt"}. - User config: in
updatesmanager_config.json, a plugin entry may include a"preserve_files"array.
Example (Lua, default list):
{
owner = "username",
repo = "myplugin.koplugin",
description = "My plugin",
preserve_files = {"config.lua", "credentials.lua"},
}Example (JSON, user config):
{
"owner": "username",
"repo": "myplugin.koplugin",
"description": "My plugin",
"preserve_files": ["config.lua", "credentials.lua"]
}KOReader/settings/updatesmanager_config.json
Patches are typically stored in a single repository with multiple patch files. One repository can contain many patches, optionally organized in subfolders.
{
"patches": [
{
"owner": "username",
"repo": "KOReader.patches",
"branch": "main",
"path": "",
"description": "User's patches collection"
},
{
"owner": "username",
"repo": "KOReader.patches",
"branch": "main",
"path": "subfolder",
"description": "Patches in subfolder"
},
{
"owner": "anotheruser",
"repo": "my-patches",
"branch": "main",
"path": "collection",
"description": "Another user's patches"
}
]
}Plugins are typically in separate repositories. Each plugin is usually in its own repository, and the repository name often matches the plugin name.
{
"plugins": [
{
"owner": "username",
"repo": "myplugin.koplugin",
"description": "My custom plugin"
}
]
}You can combine both patches and plugins in a single configuration file:
{
"patches": [
{
"owner": "username",
"repo": "KOReader.patches",
"branch": "main",
"path": "",
"description": "User's patches collection"
}
],
"plugins": [
{
"owner": "username",
"repo": "myplugin.koplugin",
"description": "My custom plugin"
},
{
"owner": "readest",
"repo": "readest",
"asset_pattern": "*.koplugin.zip",
"description": "Readest ebook reader plugin"
},
{
"owner": "username",
"repo": "myplugin.koplugin",
"description": "Plugin with user config",
"preserve_files": ["config.lua", "api_key.txt"]
}
]
}The Repository Settings menu (available in Updates Manager → Settings → Repository Settings) shows:
- Location of the configuration file
- Number of custom patch repositories (if any)
- Number of custom plugin repositories (if any)
- Instructions for adding custom repositories
To add custom repositories, edit the configuration file manually. The plugin will merge custom repositories with the default list.
Click to expand technical details
- Repository data is cached in
KOReader/settings/updatesmanager_cache/repository_cache.json - Plugin data is cached in
KOReader/settings/updatesmanager_cache/plugin_cache.json - Cache is valid until manually cleared or force refresh is used
- Cache includes metadata but not full file content (to save space)
- The plugin implements intelligent rate limiting to avoid GitHub API limits
- Small delays between API requests
- Automatic detection and handling of 403/429 errors
- Graceful degradation when rate limits are hit
To avoid API rate limits, you can configure a GitHub Personal Access Token:
Without token: 60 requests/hour (shared limit for all unauthenticated requests)
With token: 5,000 requests/hour (personal limit)
How to set up:
- The plugin automatically creates a template file on first launch:
KOReader/settings/updatesmanager_github_token.txt - Go to https://github.com/settings/tokens
- Click "Generate new token" → "Generate new token (classic)"
- Give it a name (e.g., "KOReader Updates Manager")
- Select expiration (recommended: 90 days or custom)
- For scopes, you only need
public_repo(read-only access to public repositories) - Click "Generate token"
- Copy the token and paste it in
updatesmanager_github_token.txt(on a new line, without#) - The plugin will automatically use the token for all GitHub API requests
Security Note:
- The token only needs
public_reposcope (read-only access to public repositories) - Never share this token or commit it to version control
- If your token is compromised, revoke it immediately at https://github.com/settings/tokens
- Configuration:
KOReader/settings/updatesmanager_config.json - Cache:
KOReader/settings/updatesmanager_cache/ - Local Descriptions:
KOReader/settings/updatesmanager_patch_descriptions.json - Ignored Patches:
KOReader/settings/updatesmanager_ignored_patches.txt - GitHub Token:
KOReader/settings/updatesmanager_github_token.txt(auto-created on first launch) - Patches:
KOReader/patches/ - Plugins:
KOReader/plugins/
The plugin includes support for the following patch repositories by default:
- joshuacant/KOReader.patches
- angelsangita/Koreader-Patches
- SeriousHornet/KOReader.patches
- sebdelsol/KOReader.patches
- zenixlabs/koreader-frankenpatches-public
- omer-faruq/koreader-user-patches
- advokatb/KOReader-Patches
And the following plugin repositories:
- loeffner/WeatherLockscreen
- advokatb/readingstreak.koplugin
- advokatb/updatesmanager.koplugin
- marinov752/emailtokoreader.koplugin
- omer-faruq/memobook.koplugin
- omer-faruq/rssreader.koplugin
- kodermike/airplanemode.koplugin
- kristianpennacchia/zzz-readermenuredesign.koplugin
- kristianpennacchia/wordreference.koplugin
- patelneeraj/filebrowserplus.koplugin
- omer-faruq/webbrowser.koplugin
- omer-faruq/assistant.koplugin
- 0xmiki/telegramhighlights.koplugin
- JoeBumm/Koreader-Menu-customizer
- dani84bs/AnnotationSync.koplugin
- agaragou/illustrations.koplugin
- omer-faruq/tbrplanner.koplugin
- omer-faruq/nonogram.koplugin
- Evgeniy-94/TelegramDownloader.koplugin
- readest/readest
- Check your internet connection
- Verify repository URLs in configuration
- Try "Force Refresh" to clear cache
- Check logs for API rate limit messages
- Check that patch file has comments at the beginning
- Try editing description locally through the plugin
- Check network connection
- Wait for rate limits to reset (usually 1 hour)
- Clear cache and try again
- Check logs for errors
- Check if your plugin's
_meta.luahas aversionfield - If version is missing or
"unknown", the plugin will always show updates - Add a proper version to
_meta.lua(see "For Plugin Authors" section)
Contributions are welcome! Please feel free to submit pull requests or open issues.
- Based on
2-update-patches.luaby sebdelsol - Inspired by the KOReader patch and plugin ecosystem