| Home Screen | Repository Browser |
|---|---|
![]() |
![]() |
A comprehensive GitHub client for KOReader that lets you browse repositories, clone repos for offline editing, commit and push changes, and edit Markdown files with a rich formatting toolbar — all directly from your e-reader.
Every repo works in two modes:
| Mode | Network | Browsing | Editing | Git Operations |
|---|---|---|---|---|
| Remote-Only | Required | GitHub REST API | API commit (with token) | None |
| Attached (Cloned) | Optional | Local filesystem | Local editor | Full (commit, push, pull, sync) |
- Remote-Only: Browse any GitHub repo via API. View files, download, edit via API. No local storage used.
- Attach to Device: Clone a repo locally. Browse, edit, and commit fully offline. Sync when online.
- Clone: Clone a remote repo to your device (optionally shallow with
--depth 1) - Pull: Fetch and fast-forward merge remote changes
- Commit: Stage all changes and commit with a message prompt
- Push: Send local commits to GitHub
- Sync: One-tap pull then push (bidirectional reconciliation)
- Status: View modified, untracked, and staged files
- Log: Browse recent commit history
- Diff: View uncommitted changes as a unified diff
- Branch: View current branch, list branches, switch branches
- Detach: Remove local clone while keeping the remote bookmark
When opening an attached repo while online, Github Browser automatically checks for remote changes:
- Remote ahead: Shows "N remote changes" banner with a Pull button
- Local ahead: Shows "N local commits ready to push" banner
- Diverged: Warns about conflict, offers manual resolution
- Up to date: No prompt needed
The Recent Changes view shows remote changes, uncommitted local changes, and unpushed commits in one screen.
A 2-row formatting toolbar pinned at the bottom of the editor, above the virtual keyboard:
Row 1 (Formatting): H# | B | I | S | - | 1. | [ ] | > | ` | ``` | Lnk | Tbl
Row 2 (Navigation): Tab | S+Tab | Undo | Redo | Home | End | up | down
| Button | Action |
|---|---|
| H# | Heading cycle: tap adds # at line start (up to #####), 6th tap removes all |
| B / I / S | Bold, Italic, Strikethrough (wraps selection) |
| - / 1. / [ ] | Bullet list, numbered list (auto-increment), checkbox |
| > / ` / ``` | Blockquote, inline code, code block |
| Lnk / Tbl | Link template, table insertion (prompt for dimensions) |
| Tab / S+Tab | Indent (insert spaces) / Outdent (remove leading spaces) |
| Undo / Redo | Full undo/redo stack (KOReader's built-in editor has none) |
| Home / End | Jump to start/end of line |
| up / down | Move cursor between lines |
- Store multiple GitHub Personal Access Tokens with named labels
- Set a global default token
- Assign specific tokens to individual repositories
- Import tokens from a
.txtfile (one per line) - Write operations (edit, delete, push) only appear when a token is explicitly assigned to that repo
- View: Fetch and display text/code files inline (remote) or from disk (local)
- File Preview: Files open in a preview view first with Edit Remote, Edit Locally, and Download action buttons
- Edit via API: Edit remote files directly on GitHub (requires token)
- Edit Locally: Download a remote file to disk, edit with the full toolbar, push later
- Commit to GitHub: From the local editor, push changes directly via API
- Download: Save binary files to device storage
- Create / Delete: Add or remove files (requires token for remote, works directly on local)
- New File: Create new files in attached repos directly from the repo view
- Search: Search files by name or code content within a repository
- Pinned Repos: Quick-access repos on the home screen
- Bookmarks: Save favorite repos
- History: Track recently visited repos with configurable limit
- Local Repos: All attached repos with sync status indicators
- Add Local Folder: Attach any folder on your device (git repo or plain folder) — browse and edit files from the home screen
- Multiple Quick Repos: Assign multiple repos as gesture shortcuts, each with its own dedicated gesture
- DocumentRegistry: Opens
.md,.markdown,.txtfiles from KOReader's file manager
.sdrfolders are automatically excluded from all listings and git operations- Configurable ignore patterns (
.koreader,*.tmp,.DS_Storeadded by default) .gitdirectory always hidden from browsing
All network operations automatically check connectivity:
- Opening a remote repo: Prompts WiFi if offline
- Pull / Push / Sync / Clone: Prompts WiFi if offline
- Local browsing & editing: Works fully offline, no WiFi needed
- Edit Locally flow: Downloads file (needs network), then edits fully offline
- Copy the
githubbrowser.kopluginfolder to your KOReaderplugins/directory:- Kobo:
/mnt/onboard/.adds/koreader/plugins/ - Kindle:
/mnt/us/koreader/plugins/ - Android: Wherever your KOReader data directory is located.
- Desktop (AppImage):
~/.config/koreader/plugins/
- Kobo:
- Restart KOReader.
- The plugin will appear in the Search menu (4th column in the top menu).
- Open GitNotes from Search > Github Browser
- Tap Browse public repo...
- Enter
owner/repoor a full GitHub URL - Navigate directories, tap files to view or download
- Browse a remote repo
- Tap Attach to device at the top of the repo view
- The repo is cloned locally and appears under Local Repos on the home screen
- Open it anytime — works fully offline
- Edit files with the toolbar, commit locally
- When online: tap Push or Sync to send changes to GitHub
- Browse a remote repo
- Tap a text file
- Tap Edit (requires token assigned to the repo) — commits via API
- Or tap Edit Locally (no token needed) — downloads and opens in local editor
- Go to KOReader Settings > Gestures
- Find Github Browser in the action list to open the home screen
- Or find Github Browser: Quick Repo to jump directly to a specific repo
- To configure Quick Repo: Settings > Quick Repo (gesture shortcut) > enter
owner/repo
| Setting | Description |
|---|---|
| Manage GitHub Tokens | Add, rename, delete, or import tokens. Set a default token. |
| Download Folder | Where downloaded files are saved |
| Git Workspace | Root directory for cloned repos |
| Device Name | Tag in commit messages (e.g., "koreader", "libra2") |
| Auto-sync on open | Check for remote changes when opening a local repo |
| Max history entries | Limit how many recent repos are tracked (default: 20) |
| Ignore Patterns | Files/folders to hide from listings |
| Quick Repo | A repo opened by the "Quick Repo" gesture shortcut |
- Go to github.com/settings/tokens
- Click Generate new token (classic)
- Select repo scope (full control of private repositories)
- Copy the token
- In Github Browser: Settings > Manage GitHub Tokens > Add New Token
githubbrowser.koplugin/
├── _meta.lua # Plugin metadata
├── main.lua # Entry point, menu & gesture registration
├── githubbrowser_api.lua # GitHub REST API client (remote-only mode)
├── githubbrowser_git.lua # Local Git CLI wrapper (clone/pull/push/commit)
├── githubbrowser_sync.lua # Smart sync engine (reconcile local ↔ remote)
├── githubbrowser_browser.lua # Unified browsing UI (remote + local + sync)
├── githubbrowser_editor.lua # Enhanced editor (InputDialog + toolbar + undo)
├── githubbrowser_editor_toolbar.lua # 2-row formatting toolbar widget
├── githubbrowser_undo.lua # Undo/redo stack implementation
├── githubbrowser_settings.lua # Settings, tokens, repo registry
├── githubbrowser_ignore.lua # Ignore pattern matching engine
└── GUIDE.md # Detailed user guide
- KOReader 2024.01 or later
gitCLI installed on the device (for local repo features; remote browsing works without it)- Network connection for remote browsing, cloning, and pushing
- GitHub Personal Access Token for private repos and write operations
Author: right9code Version: 2.0.0 License: Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)

