Skip to content

dawedawe/ferriby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ferriby

Keep Ferrises alive and happy by feeding them commits in your repositories.
They can live in a local repository, at GitHub, any Forgejo instance like Codeberg or at a GitLab instance.

Ferriby demo recording

Usage

ferriby -fj https://example.org/owner/repository # Forgejo repository
ferriby -g path_to_local_repository # local git repository
ferriby -gh owner/repository # GitHub repository
ferriby -gl gitlab.example.org/12345/projectname # GitLab repository

You can use ferriby with multiple repositories at once:

ferriby -g local_path -gh owner/repo -g other_path -gh ...

Use a custom config file path:

ferriby -c config_file.json

Installation

You can install ferriby from crates.io:

cargo install ferriby

On Arch Linux, you can install it from the AUR:

paru -S ferriby

Configuration

Forgejo/Codeberg

Use the env var FERRIBY_FJ_PAT for Forgejo instances like Codeberg. Create your PAT in the settings/applications section with the repository permission set to Read. Please be aware that a Forgejo PAT in the env overwrites the PATs for all Forgejo instances in the config file. So if you have different Forgejo instances in your config, you should not use a PAT in the env.

GitHub

To access private GitHub repos and to have a higher rate limit for the checks, you can pass a PAT (Personal Access Token) to ferriby via the environment variable FERRIBY_GH_PAT.
Create your PAT in the settings section with Repository permissions of Read. Test it with

FERRIBY_GH_PAT="xyz" ferriby -gh owner/repository

It is strongly recommended to do this. Otherwise you are rate limited to 60 checks per hour.

GitLab

Use the env var FERRIBY_GL_PAT for GitLab. Please be aware that a GitLab PAT in the env overwrites the PATs for all GitLab instances in the config file. So if you have different GitLab instances in your config, you should not use a PAT in the env.

As GitLab uses numeric IDs to identify repositories in their API, we need to provide that. You can find that in the project settings. The projectname is just for us mortals and can include the user or group, too (see the config file example). You can define a project-specific PAT in the config. It only needs the read_api scope. If you want to use gitlab.com, don't include the "www" in the config.

Config file

ferriby looks for a config file in $HOME/.config/ferriby/config.json ($HOME/AppData/Roaming/ferriby/config.json on Windows). You can override that path with the -c argument. The config file should look like this:

{
  "git": [
    "/home/dawe/src/ferriby",
    "/home/dawe/src/tusistor"
  ],
  "github": [
    "dawedawe/ratatui",
    "dawedawe/ratzilla"
  ],
  "forgejo": [
    {
      "baseurl": "https://codeberg.org",
      "repo": "dawe/ferriby",
      "pat": "fjpat-123"
    },
    {
      "baseurl": "http://localhost:3000",
      "repo": "dawe/ferriby"
    }
  ],
  "gitlab": [
    {
      "hostname": "gitlab.com",
      "projectid": "71627370",
      "projectname": "ferriby",
      "pat": "glpat-123"
    },
    {
      "hostname": "gitlab.archlinux.org",
      "projectid": "98879",
      "projectname": "dawe/signstar"
    }
  ]
}

At least one repository needs to be configured. The JSON needs to be clean, no trailing commas allowed.

Advisory

This is gamification. If you have a human to love or a dog to walk, do that!

Credits

The ASCII art is based on work by Diggory Blake. Thanks!

This is a Ratatui app generated by the event driven async template.

License

Copyright (c) dawe [email protected]

This project is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT)

About

Keep Ferris alive by contributing to a git repo

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages