https://github.com/nhatthm/plugin-registry-github
Github installer for Plugin Registry
https://github.com/nhatthm/plugin-registry-github
github go golang plugin plugin-registry regitry
Last synced: 3 months ago
JSON representation
Github installer for Plugin Registry
- Host: GitHub
- URL: https://github.com/nhatthm/plugin-registry-github
- Owner: nhatthm
- License: mit
- Created: 2021-05-05T12:47:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T20:49:59.000Z (about 1 year ago)
- Last Synced: 2025-10-25T21:28:18.755Z (7 months ago)
- Topics: github, go, golang, plugin, plugin-registry, regitry
- Language: Go
- Homepage:
- Size: 195 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github installer for Plugin Registry
[](https://github.com/nhatthm/plugin-registry-github/releases/latest)
[](https://github.com/nhatthm/plugin-registry-github/actions/workflows/test.yaml)
[](https://codecov.io/gh/nhatthm/plugin-registry-github)
[](https://goreportcard.com/report/github.com/nhatthm/plugin-registry-github)
[](https://pkg.go.dev/github.com/nhatthm/plugin-registry-github)
[](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)
An installer for [plugin-registry](https://github.com/nhatthm/plugin-registry)
## Prerequisites
- `Go >= 1.18`
## Install
```bash
go get github.com/nhatthm/plugin-registry-github
```
## Usage
Import the library while bootstrapping the application (see the [examples](#examples))
The installer supports this source format: `[https?://][www.]github.com/owner/repository[@version]`. For examples:
- `https://github.com/owner/repository`
- `https://www.github.com/owner/repository`
- `github.com/owner/repository@latest`
- `github.com/owner/repository@v1.4.2`
In the root folder of the repository, there must be a `.plugin.registry.yaml` file that describe the plugin.
For example: https://github.com/nhatthm/moneylovercli-plugin-n26/blob/master/.plugin.registry.yaml
## Examples
```go
package mypackage
import (
"context"
registry "github.com/nhatthm/plugin-registry"
_ "github.com/nhatthm/plugin-registry-github" // Add file system installer.
)
var defaultRegistry = mustCreateRegistry()
func mustCreateRegistry() registry.Registry {
r, err := createRegistry()
if err != nil {
panic(err)
}
return r
}
func createRegistry() (registry.Registry, error) {
return registry.NewRegistry("~/plugins")
}
func installPlugin(url string) error {
return defaultRegistry.Install(context.Background(), url)
}
```
## Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)
### Paypal donation
[](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)
or scan this