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"
- Host: GitHub
- URL: https://github.com/ficcdaf/newrepo.fish
- Owner: ficcdaf
- License: mit
- Created: 2025-05-02T23:11:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-05T22:47:04.000Z (about 1 year ago)
- Last Synced: 2025-05-12T21:18:09.113Z (about 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.