olivier d3f3fe926a fix: scope tokens per host, harden Gitea support, port upstream fixes
Fork fixes:
- Global token is GitHub-only; never sent to Gitea/Forgejo hosts
- Gitea: download assets via browser_download_url (+token) so private repos work
- Gitea URL parsing keeps port and sub-path installs, strips browser sub-pages
- GitHub detected by hostname, not substring
- Gitea releases: follow pagination (X-Total-Count), skip drafts
- Gitea token validation against the repo; 404 is no longer "valid"
- Settings tab and migration log use this plugin's own id/folder
- Check-only mode no longer reinstalls/enables a missing plugin folder
- reloadPlugin reports load failures (enablePlugin resolves false)
- Repository / release-notes links work for both providers

Ported from upstream BRAT 2.2.0:
- Release sort: semver tags first, date fallback
- Null-safe version comparison, JSON shape guards
- Drop obsidian-daily-notes-interface (read daily note format directly)
- Notice.messageEl, CSS without !important, console.debug/error
2026-10-25 20:39:33 -04:00

BRAT (Gitea Fork)

A fork of obsidian42-brat that adds support for self-hosted Gitea/Forgejo instances alongside GitHub.

What is this?

BRAT (Beta Reviewers Auto-update Tester) lets you install and auto-update beta Obsidian plugins directly from any git forge that supports releases. This fork extends the original to work with any Gitea instance — not just GitHub.

Usage

Open the BRAT command palette and choose "Add a beta plugin for testing", then paste a repository URL:

Source Format Example
GitHub user/repo or https://github.com/user/repo TfTHacker/obsidian42-brat
Gitea https://git.your-instance.com/user/repo https://gitea.mithrilforge.dev/olivier/BindThem

The plugin auto-detects the provider from the URL host: github.com is GitHub, any other host is Gitea/Forgejo. Gitea addresses may include a port (https://git.lan:3000/user/repo) or a sub-path install (https://example.com/gitea/user/repo); a pasted browser URL such as …/user/repo/releases/tag/v1.0 is reduced to the repository.

Access tokens

  • Global token (settings): GitHub only. It is never sent to a Gitea/Forgejo host.
  • Per-plugin token: set in the add-plugin dialog; sent only to that plugin's host. Use it for private Gitea repos.

Installation

Download the latest release assets (main.js, manifest.json, styles.css) and place them in:

.obsidian/plugins/obsidian42-brat-gitea/

Then enable BRAT (Gitea Fork) in Settings → Community Plugins.

Features

  • Install plugins from GitHub (bare user/repo format, backward compatible)
  • Install plugins from Gitea / Forgejo (full URL format)
  • Per-plugin token management via Obsidian SecretStorage
  • Frozen version pinning, incompatible plugin overrides
  • Theme installation and updates
  • Same UI and commands as the original BRAT

Credits

Original BRAT by TfTHacker and johannrichard.

S
Description
BRAT fork with Gitea support — install beta plugins from GitHub or self-hosted Gitea/Forgejo
Readme
143 KiB
0 Stars 1 Watchers 0 Forks
v1.0.3
Latest
2026-10-26 01:39:39 +01:00
Languages
TypeScript 95.9%
JavaScript 2.2%
CSS 1.9%