An open API service indexing awesome lists of open source software.

https://github.com/ficcdaf/newrepo.fish

"Easily create sr.ht and github repos"
https://github.com/ficcdaf/newrepo.fish

Last synced: about 1 year ago
JSON representation

"Easily create sr.ht and github repos"

Awesome Lists containing this project

README

          

# newrepo.fish

> Easily create sr.ht and GitHub repositories configured for mirroring 🐟

This tool is meant to streamline setting up repository mirroring from sr.ht to
GitHub. It facilitates creating repositories on both platforms. Setting up a
builds.sr.ht job for automatic mirroring to GitHub will be added soon.

## Usage

Please ensure that `hut` and `gh` are both installed and authenticated before
proceeding.

```
USAGE
newrepo [] [flags]
FLAGS
-p/--private: set private
-P/--public: set public
-s/--srht: set srht provider
-g/--github: set github provider
-a/--all: set all providers
-d/--description []: set optional description
```

For example, to create a public repo called `my-project` on both platforms:

```sh
newrepo --public --all my-project -d 'This is my project!'
```

## Why?

I prefer developing on sr.ht, but there are some advantages to mirroring your
repositories to GitHub. Depending on the ecosystem, if you're publishing a
plugin, sourcehut may not be supported as an installation source, such as Yazi
plugins and Fisher plugins (unless you're using
[my fork](https://git.sr.ht/~ficd/fisher)).

Another advantage of GitHub is its ubiquity. It can lead to better visibility
for your projects — and importantly, if you're looking for a job, it's important
for your GitHub stats to reflect how active you really are as a developer.

Mirroring your repositories to GitHub can address some of these issues.
Therefore, I wanted an easy way to initialize a project in a way that's suitable
for mirroring.

## Installation

With Fisher ([my fork](https://git.sr.ht/~ficd/fisher)):

```sh
fisher install ~ficd/newrepo.fish
```

Without my fork:

```sh
fisher install ficcdaf/newrepo.fish
```

## Road map

- `git init` if repo isn't initialized.
- Automatically set up remotes.
- `git.sr.ht` is always `origin`.
- Automatically add mirror notice to GitHub repo description.
- Option to generate `.build.yml` for mirroring.
- Option to set up mirroring for a repository that's already on sr.ht.