{"id":13484762,"url":"https://github.com/siketyan/ghr","last_synced_at":"2025-05-16T08:03:27.172Z","repository":{"id":62734419,"uuid":"562095757","full_name":"siketyan/ghr","owner":"siketyan","description":"🚀 Yet another repository management with auto-attaching profiles.","archived":false,"fork":false,"pushed_at":"2025-05-13T02:03:59.000Z","size":1403,"stargazers_count":128,"open_issues_count":13,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-15T12:14:42.663Z","etag":null,"topics":["cli","git","repository-management","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/ghr","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siketyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"siketyan","patreon":"siketyan"}},"created_at":"2022-11-05T09:49:50.000Z","updated_at":"2025-05-13T02:04:02.000Z","dependencies_parsed_at":"2022-11-05T10:45:32.915Z","dependency_job_id":"d3cb2799-5dd7-4494-af18-62e7c84cb9bc","html_url":"https://github.com/siketyan/ghr","commit_stats":{"total_commits":494,"total_committers":7,"mean_commits":70.57142857142857,"dds":0.4352226720647774,"last_synced_commit":"125ba2aa3d4dbd87a97ed54fcb62f7dc4b5baadb"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siketyan%2Fghr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siketyan%2Fghr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siketyan%2Fghr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siketyan%2Fghr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siketyan","download_url":"https://codeload.github.com/siketyan/ghr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493381,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git","repository-management","rust"],"created_at":"2024-07-31T17:01:32.809Z","updated_at":"2025-05-16T08:03:27.146Z","avatar_url":"https://github.com/siketyan.png","language":"Rust","funding_links":["https://github.com/sponsors/siketyan","https://patreon.com/siketyan"],"categories":["Rust"],"sub_categories":[],"readme":"# 🚀 ghr\n\n[![crates.io](https://img.shields.io/crates/v/ghr.svg)](https://crates.io/crates/ghr)\n[![Rust](https://github.com/siketyan/ghr/actions/workflows/rust.yml/badge.svg)](https://github.com/siketyan/ghr/actions/workflows/rust.yml)\n\nYet another repository management with auto-attaching profiles.\n\n## 🔥 Motivation\n\n[ghq](https://github.com/x-motemen/ghq) is the most famous solution to resolve stress of our repository management\ncurrently.\nHowever, I wanted to customise the git configuration by some rules, such as using my company email in their\nrepositories.\n\nTo achieve that, ghq was not enough for me.\nSo I have rewritten them as simple, in Rust, the robust and modern language today.\n\n## 📦 Installation\n\n### macOS / Using Homebrew (easy)\n\n```shell\nbrew install s6n-jp/tap/ghr\n```\n\nTo upgrade:\n\n```shell\nbrew upgrade s6n-jp/tap/ghr\n```\n\n### Windows / Using scoop (easy)\n\n```shell\nscoop bucket add siketyan https://github.com/siketyan/scoop-bucket.git\nscoop install ghr\n```\n\nTo upgrade:\n\n```shell\nscoop update ghr\n```\n\n### Any OS / Using cargo (classic)\n\nIf you have not installed Rust environment, follow the instruction of [rustup](https://rustup.rs/).\n\n```shell\ncargo install ghr\n```\n\nFor upgrading, we recommend to use [cargo-update](https://github.com/nabijaczleweli/cargo-update).\n\n```shell\ncargo install-update ghr\n```\n\n### 🔧 Installing the shell extension\n\nTo extend ghr features to maximum, it is recommended to install the shell extension.\nAdd the line below to your shell configuration script to enable it.\n\n#### Bash\n\n```shell\nsource \u003c(ghr shell bash)\n```\n\nTo enable completions, add the line into `~/.bash_completion`.\n\n```shell\nsource \u003c(ghr shell bash --completion)\n```\n\n#### Fish\n\n```shell\nghr shell fish | source\n```\n\nTo enable completions, add the line into `~/.config/fish/completions/ghr.fish`.\n\n```shell\nghr shell fish --completion | source\n```\n\n## 💚 Usages\n\n```\nUsage: ghr \u003cCOMMAND\u003e\n\nCommands:\n  cd       Change directory to one of the managed repositories (Shell extension required)\n  clone    Clones a Git repository to local\n  delete   Deletes a repository from local\n  init     Initialises a Git repository in local\n  list     Lists all managed repositories\n  open     Opens a repository in an application\n  browse   Browse a repository on web\n  path     Prints the path to root, owner, or a repository\n  profile  Manages profiles to use in repositories\n  search   Perform a fuzzy search on the repositories list\n  shell    Writes a shell script to extend ghr features\n  sync     Sync repositories between your devices\n  version  Prints the version of this application\n  help     Print this message or the help of the given subcommand(s)\n\nOptions:\n  -q, --quiet    Operates quietly. Errors will be reported even if this option is enabled\n  -v, --verbose  Operates verbosely. Traces, debug logs will be reported\n  -h, --help     Print help\n```\n\n### Cloning a repository\n\nghr supports many patterns or URLs of the repository to clone:\n\n```shell\nghr clone \u003cowner\u003e/\u003crepo\u003e\nghr clone github.com:\u003cowner\u003e/\u003crepo\u003e\nghr clone https://github.com/\u003cowner\u003e/\u003crepo\u003e.git\nghr clone ssh://git@github.com/\u003cowner\u003e/\u003crepo\u003e.git\nghr clone git@github.com:\u003cowner\u003e/\u003crepo\u003e.git\n```\n\nIf you have installed the shell extension, you can change directory to the cloned repository:\n\n```shell\nghr clone \u003curl_or_pattern\u003e --cd\n```\n\nIf you often use repositories of a specific owner, you can set the default owner to be resolved.\n\n```toml\n[defaults]\nowner = \"siketyan\"\n```\n\n```shell\nghr clone \u003crepo\u003e\n```\n\n### Changing directory\n\nYou can change directory to one of the managed repositories on the shell.\nIt requires installing the shell extension.\n\n```shell\nghr cd \u003curl_or_pattern\u003e\n```\n\n### Attaching profiles\n\nCreate `~/.ghr/ghr.toml` and edit as you like:\n\n```toml\n[profiles.default]\nuser.name = \"Your Name\"\nuser.email = \"your_name@personal.example.com\"\n\n[profiles.company]\nuser.name = \"Your Name (ACME Inc.)\"\nuser.email = \"your_name@company.example.com\"\n\n[[rules]]\nprofile.name = \"company\"\nowner = \"acme\" # Applies company profiles to all repositories in `acme` org\n\n[[rules]]\nprofile.name = \"default\"\n```\n\n### Configuring applications to open repos in\n\nEdit `~/.ghr/ghr.toml` and add entries as you like:\n\n```toml\n[applications.vscode]\ncmd = \"code\"\nargs = [\"%p\"]\n```\n\n\u003e [!NOTE]\n\u003e `%p` will be replaced by the repository path.\n\n### Finding path of the repository\n\n```shell\nghr path # Root directory\nghr path \u003cowner\u003e/\u003crepo\u003e # Repository directory\nghr path \u003curl\u003e # Repository directory resolved by URL\nghr path github.com/\u003cowner\u003e/\u003crepo\u003e # Repository directory of the specified host\nghr path --owner=\u003cowner\u003e # Owner root\nghr path --host=github.com # Host root\nghr path --host=github.com --owner=\u003cowner\u003e # Owner root of the specified host\n```\n\n### Syncing repositories and their state\n\n\u003e [!WARNING]\n\u003e This feature is experimental.\n\nghr supports dumping and restoring the current branch and remotes of managed repositories.\n\n```shell\nghr sync dump \u003e repositories.toml\nghr sync restore \u003c repositories.toml\n```\n\n## 🛠 Customising\n\nYou can change the root of repositories managed by ghr by setting environment variable `GHR_ROOT` in your shell profile.\n\n```shell\nghr path # ~/.ghr\nGHR_ROOT=/path/to/root ghr path # /path/to/root\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiketyan%2Fghr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiketyan%2Fghr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiketyan%2Fghr/lists"}