{"id":13895083,"url":"https://github.com/kyoh86/gogh","last_synced_at":"2026-04-08T18:09:10.469Z","repository":{"id":50138284,"uuid":"48105623","full_name":"kyoh86/gogh","owner":"kyoh86","description":"Gogh is a tool to manage GitHub repositories efficiently, inspired by `ghq`","archived":false,"fork":false,"pushed_at":"2026-03-17T04:37:32.000Z","size":11043,"stargazers_count":34,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-17T19:43:36.417Z","etag":null,"topics":["cli-app","ghq","github","go","golang","golang-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kyoh86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2015-12-16T11:09:27.000Z","updated_at":"2026-03-17T04:29:22.000Z","dependencies_parsed_at":"2023-12-22T19:29:46.389Z","dependency_job_id":"1b3c6a3f-d263-46fc-a30f-58e2f5b346af","html_url":"https://github.com/kyoh86/gogh","commit_stats":null,"previous_names":[],"tags_count":166,"template":false,"template_full_name":null,"purl":"pkg:github/kyoh86/gogh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoh86%2Fgogh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoh86%2Fgogh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoh86%2Fgogh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoh86%2Fgogh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyoh86","download_url":"https://codeload.github.com/kyoh86/gogh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoh86%2Fgogh/sbom","scorecard":{"id":575593,"data":{"date":"2025-08-11","repo":{"name":"github.com/kyoh86/gogh","commit":"6462e2e7c305cd594c9c62d16eb8cba028e9d977"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/assign.yml:1","Warn: no topLevel permission defined: .github/workflows/release-on-tag.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/review.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/assign.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/assign.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-on-tag.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release-on-tag.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-on-tag.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release-on-tag.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-on-tag.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release-on-tag.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-on-tag.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release-on-tag.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/review.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/review.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/review.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/review.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/kyoh86/gogh/test.yml/main?enable=pin","Warn: containerImage not pinned by hash: .github/actions/pkgbuild/Dockerfile:1: pin your Docker image by updating archlinux:latest to archlinux:latest@sha256:104d24b4464e89a16566d3e68ce0e2707aa15258c690ee9bef755930e8bc1c2d","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v4.0.1-beta.9 not signed: https://api.github.com/repos/kyoh86/gogh/releases/230334057","Warn: release artifact v4.0.1-beta.8 not signed: https://api.github.com/repos/kyoh86/gogh/releases/229013022","Warn: release artifact v4.0.1-beta.7 not signed: https://api.github.com/repos/kyoh86/gogh/releases/228965904","Warn: release artifact v4.0.1-beta.6 not signed: https://api.github.com/repos/kyoh86/gogh/releases/228504663","Warn: release artifact v4.0.1-beta.5 not signed: https://api.github.com/repos/kyoh86/gogh/releases/228498054","Warn: release artifact v4.0.1-beta.9 does not have provenance: https://api.github.com/repos/kyoh86/gogh/releases/230334057","Warn: release artifact v4.0.1-beta.8 does not have provenance: https://api.github.com/repos/kyoh86/gogh/releases/229013022","Warn: release artifact v4.0.1-beta.7 does not have provenance: https://api.github.com/repos/kyoh86/gogh/releases/228965904","Warn: release artifact v4.0.1-beta.6 does not have provenance: https://api.github.com/repos/kyoh86/gogh/releases/228504663","Warn: release artifact v4.0.1-beta.5 does not have provenance: https://api.github.com/repos/kyoh86/gogh/releases/228498054"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release-on-tag.yml:13"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0635","Warn: Project is vulnerable to: GO-2022-0646","Warn: Project is vulnerable to: GO-2025-3770","Warn: Project is vulnerable to: GO-2025-3787 / GHSA-fv92-fjc5-jj9h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T17:36:46.227Z","repository_id":50138284,"created_at":"2025-08-20T17:36:46.227Z","updated_at":"2025-08-20T17:36:46.227Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-app","ghq","github","go","golang","golang-tools"],"created_at":"2024-08-06T18:01:58.823Z","updated_at":"2026-04-08T18:09:10.461Z","avatar_url":"https://github.com/kyoh86.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Gogh\n\nGogh is a tool to manage GitHub repositories efficiently, inspired by [`ghq`](https://github.com/motemen/ghq).\n\n[![`PkgGoDev`](https://pkg.go.dev/github.com/kyoh86/gogh/v4)](https://pkg.go.dev/github.com/kyoh86/gogh/v4)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kyoh86/gogh/v4)](https://goreportcard.com/report/github.com/kyoh86/gogh/v4)\n[![GitHub release](https://github.com/kyoh86/gogh/actions/workflows/release.yml/badge.svg)](https://github.com/kyoh86/gogh/releases)\n\n![](./doc/image/gogh.jpg)\n\n## Description\n\n**`gogh` is forked from [`ghq`](https://github.com/motemen/ghq).**\n\n```console\n$ gogh list\ngithub.com/kyoh86/git-branches\ngithub.com/kyoh86/gogh\ngithub.com/kyoh86/vim-wipeout\ngithub.com/kyoh86-tryouts/bare\ngithub.com/nvim-telescope/telescope.nvim\n...\n```\n\n`gogh` provides a way to organize remote repository clones, like `go clone` does. When you clone a\nremote repository by `gogh clone`, `gogh` makes a directory under a specific root directory (by default\n`~/Projects`) using the remote repository URL's host and path. And creating new one by `gogh create`,\n`gogh` make both of a local repositories and a remote repository.\n\n```console\n$ gogh clone https://github.com/kyoh86/gogh\n# Runs `git clone https://github.com/kyoh86/gogh ~/Projects/github.com/kyoh86/gogh`\n```\n\nYou can also do:\n\n- List repositories (local repositories) (`gogh list`).\n- Create a new repository (`gogh create`).\n- Fork a repository (`gogh fork`).\n- Clone a repository (`gogh clone`).\n- Delete a repository (`gogh delete`).\n- List remote repositories (`gogh repos`).\n- Show the current working directory's repository (`gogh cwd`).\n- Manage [overlay files](#overlay-feature) (`gogh overlay`), [scripts](#script-feature) (`gogh script`), [hooks](#hook-feature) (`gogh hook`), and [extras](#extra-feature) (`gogh extra`).\n\nSee [#Available commands](#available-commands), [#Overlay Feature](#overlay-feature), [#Script Feature](#script-feature), [#Hook Feature](#hook-feature), and [#Extra Feature](#extra-feature) for more information.\n\n## Install\n\n### For Go developers\n\nEnsure you have Go installed before running the following commands.\n\n```console\n$ go install github.com/kyoh86/gogh/v4/cmd/gogh@latest\n```\n\n### `Homebrew`/`Linuxbrew`\n\n```console\n$ brew tap kyoh86/tap\n$ brew update\n$ brew install kyoh86/tap/gogh\n```\n\n### Shell completions\n\nYou can generate the autocompletion script for your shell with the following command:\n\n```console\n$ gogh completion \u003cshell\u003e\n```\n\nIf you want to use the generated script, you can save it to a file and source it in your shell configuration file.\nFor example, to generate the autocompletion script for `bash` and save it to `~/.gogh-completion.bash`, you can run:\n\n```console\n$ gogh completion bash \u003e ~/.gogh-completion.bash\n```\n\nThen, add the following line to your `~/.bashrc` or `~/.bash_profile`:\n\n```bash\nsource ~/.gogh-completion.bash\n```\n\nOr, if you want to use `zsh`, you can run:\n\n```console\n$ gogh completion zsh \u003e ~/.config/zsh/completions/_gogh.zsh\n```\n\nThen, add the following line to your `~/.zshrc`:\n(zsh completions are loaded from `fpath`)\n\n```zsh\nfpath=(\"~/.config/zsh/completions\" $fpath)\n\nautoload -Uz compinit \u0026\u0026 compinit\n```\n\n## Setup\n\n`gogh` manages repositories in multiple servers that is pairs of an owner and a host name.\nTo login in new server or logout, you should use `auth login`.\n\n## Available commands\n\nSee [doc/usage/gogh.md](./doc/usage/gogh.md) for detailed command usage.\n\n### Show repositories\n\n| Command | Description                                                               |\n| --      | --                                                                        |\n| `cwd`   | Print the local repository which the current working directory belongs to |\n| `list`  | List local repositories                                                   |\n| `repos` | List remote repositories                                                  |\n\n### Manipulate repositories\n\n| Command  | Description                              |\n| --       | --                                       |\n| `clone`  | Clone remote repositories to local       |\n| `create` | Create a new local and remote repository |\n| `delete` | Delete local and remote repository       |\n| `fork`   | Fork a repository                        |\n\n### Automation\n\n| Command   | Description                                   |\n| --        | --                                            |\n| `extra`   | Manage overlay-hook packages (extras)         |\n| `hook`    | Manage repository automation hooks            |\n| `overlay` | Manage repository overlay files               |\n| `script`  | Manage Lua scripts for repository actions     |\n\n### Configurations\n\n| Command   | Description                               |\n| --        | --                                        |\n| `auth`    | Manage authentication tokens              |\n| `config`  | Show / Change configurations              |\n| `roots`   | Manage root directories                   |\n\n### Others\n\n| Command      | Description                                                |\n| --           | --                                                         |\n| `bundle`     | Manage bundle                                              |\n| `completion` | Generate the autocompletion script for the specified shell |\n| `help`       | Help about any command                                     |\n\nUse `gogh [command] --help` for more information about a command.\nOr see the manual in [doc/usage/gogh.md](./doc/usage/gogh.md).\n\n## Environment variables\n\n- `GOGH_CONFIG_PATH`\n    - **(DEPRECATED)** The path to the configuration file.\n    - Default: `${XDG_CONFIG_HOME}/gogh/config.yaml`.\n- `GOGH_DEBUG`\n    - Enable debug mode\n    - Default: `` (empty)\n    - Set to any non-empty value to enable debug mode\n- `GOGH_DEFAULT_NAMES_PATH`\n    - The path for the default names\n    - Default: `${XDG_CONFIG_HOME}/gogh/default_names.v4.toml`\n- `GOGH_FLAG_PATH`\n    - The path for values for each `gogh` flags\n    - Default: `${XDG_CONFIG_HOME}/gogh/flags.v4.toml`\n- `GOGH_HOOK_CONTENT_PATH`\n    - The path to store hook content\n    - Default: `${XDG_CONFIG_HOME}/gogh/hook.v4/`\n- `GOGH_HOOK_PATH`\n    - The path to store hook configuration\n    - Default: `${XDG_CONFIG_HOME}/gogh/hook.v4.toml`\n- `GOGH_OVERLAY_CONTENT_PATH`\n    - The path to store overlay file contents\n    - Default: `${XDG_CONFIG_HOME}/gogh/overlay.v4/`\n- `GOGH_OVERLAY_PATH`\n    - The path to store overlay configuration\n    - Default: `${XDG_CONFIG_HOME}/gogh/overlay.v4.toml`\n- `GOGH_SCRIPT_PATH`\n    - The path to store script configuration\n    - Default: `${XDG_CONFIG_HOME}/gogh/script.v4.toml`\n- `GOGH_TOKENS_PATH`\n    - The path for the authentication tokens\n    - Default: `${XDG_CACHE_HOME}/gogh/tokens.v4.toml`\n- `GOGH_WORKSPACE_PATH`\n    - The path for the workspaces\n    - Default: `${XDG_CONFIG_HOME}/gogh/workspace.v4.toml`\n\n## Configurations\n\n### Roots\n\n`gogh` manages repositories under the `roots` directories.\n\nSee also: [Directory structures](#directory-structures)\n\nYou can change the roots with `roots add \u003cpath\u003e` or `roots remove \u003cpath\u003e` and see all of them by\n`roots list`. `gogh` uses the primary one to `create`, `fork` or `clone` to put a local repository\nunder it. If you want to change the primary, use `roots set-primary \u003cpath\u003e`.\n\nDefault: `${HOME}/Projects`.\n\n### Default Host and Owner\n\nWhen you specify a repository with ambiguous user or host, it will be interpolated with a default\nvalue. You may set them with `config set-default-host \u003chost\u003e` and `config set-default-owner \u003chost\u003e \u003cowner\u003e`.\n\nIf you set them like below:\n\n| key     | value         |\n| -       | -             |\n| `host`  | `example.com` |\n| `owner` | `kyoh86`      |\n\nambiguous repository names will be interpolated:\n\n| Ambiguous name | Interpolated name       |\n| --             | --                      |\n| `gogh`         | example.com/kyoh86/gogh |\n| `foobar/gogh`  | example.com/foobar/gogh |\n\nNOTE: default host will be \"github.com\" if you don't set it.\n\n### Flags\n\nYou can set flags for each command in the configuration file. The flags are used to set the default\nvalues for each command. You can set the flags in the configuration file like this:\n\n```toml\n[repos]\n    limit = 7\n    archive = \"not-archived\"\n[bundle-restore]\n    request-timeout = 5\n```\n\nThe configuration file is located at `${XDG_CONFIG_HOME}/gogh/flags.v4.toml` by default, and you can\nchange the path with the `GOGH_FLAG_PATH` environment variable.\n\nNOTE: If you set the boolean flags to `true` in the configuration file, you can disable them in the command line by\nusing `--\u003cflag\u003e=false`. For example, if you set `--private=true` in the configuration file, you can disable it by\nusing `--private=false` in the command line.\n\n## Directory structures\n\nLocal repositories are placed under `gogh.roots` with named `*host*/*user*/*repo*.\n\n```\n~/Projects             -- primary root\n    +-- github.com/\n        |-- google/\n        |   +-- go-github/\n        |-- kyoh86/\n        |   +-- gogh/\n        +-- alecthomas/\n            +-- kingpin/\n/path/to/another/root  -- another root\n    +-- github.com/\n        |-- kyoh86/\n        |   +-- gogh/\n        |   +-- git-branches/\n        |   +-- vim-wipeout/\n        |   +-- bare/\n        |   +-- tryouts/\n        |-- anybody/\n            +-- yyy/\n/...\n```\n\n## Overlay Feature\n\n### What are Overlays?\n\nOverlays are template files that can be applied to repositories. They are particularly useful for:\n\n- Adding untracked files (like editor configurations or scripts)\n- Applying consistent settings across multiple repositories\n- Creating templates for new projects\n\n### How Overlays Work\n\nOverlays are never applied automatically. You must either:\n1. Apply them manually using `gogh overlay apply`\n2. Configure hooks to apply them automatically during repository operations\n\n### Use Cases\n\n1. **Editor Configuration**: Add your favorite editor settings to repositories\n2. **Project Templates**: Apply language-specific configurations to new projects\n3. **License Files**: Ensure all your repositories have the correct license file\n4. **CI/CD Templates**: Add standard workflow files to repositories\n\n### Basic Overlay Commands\n\nExample commands to manage overlays:\nSee each `--help` for more details.\n\n```console\n# gogh overlay add \u003cname\u003e \u003csource-path\u003e \u003ctarget-path\u003e\n$ gogh overlay add vscode-settings /path/to/source/vscode/settings.json .vscode/settings.json\n$ gogh overlay list\n# gogh overlay remove \u003coverlay-id\u003e\n$ gogh overlay remove f8be36a27fa682b7b8d3c4117086851c74e47142705eba633cd91715c315d96b\n# gogh overlay apply \u003coverlay-id\u003e [[host/]owner/]repo...\n$ gogh overlay apply f8be36a27fa682b7b8d3c4117086851c74e47142705eba633cd91715c315d96b github.com/owner/repo\n# Apply to current directory repository\n$ gogh overlay apply f8be36a27fa682b7b8d3c4117086851c74e47142705eba633cd91715c315d96b .\n```\n\n### Practical Usages\n\n#### Extracting Untracked Files as Overlays\n\nExtract files from a repository that aren't tracked by git:\n\n```console\n$ gogh overlay extract [repo-refs...]\n```\n\n#### Showing Overlay Content\n\nView the content of registered overlays:\n\n```console\n$ gogh overlay show \u003coverlay-id\u003e\n```\n\n## Script Feature\n\n### What are Scripts?\n\nScripts in Gogh are Lua scripts that can be executed within repository contexts. They provide a powerful way to automate repository-specific tasks.\n\n### How Scripts Work\n\nScripts are written in Lua and have access to repository information through the `gogh` global table. They can be invoked manually or automatically through hooks.\n\n### Available Context Variables\n\nWhen scripts are executed, they have access to:\n\n```lua\n-- Repository information\ngogh.repo.host      -- e.g., \"github.com\"\ngogh.repo.owner     -- e.g., \"kyoh86\"\ngogh.repo.name      -- e.g., \"gogh\"\ngogh.repo.path      -- Repository path relative to workspace\ngogh.repo.full_path -- Full absolute path to the repository\n\n-- Hook information (when invoked via hooks)\ngogh.hook.id            -- Hook UUID\ngogh.hook.name          -- Hook name\ngogh.hook.repoPattern   -- Pattern that matched\ngogh.hook.triggerEvent  -- Event that triggered the hook\ngogh.hook.operationType -- Type of operation\ngogh.hook.operationId   -- ID of the operation\n```\n\n### Basic Script Commands\n\n```console\n# Add a script\n$ gogh script add setup-deps /path/to/setup-deps.lua\n\n# List all scripts\n$ gogh script list\n\n# Invoke a script in repositories\n$ gogh script invoke \u003cscript-id\u003e [[host/]owner/]repo...\n# Invoke in current directory repository\n$ gogh script invoke \u003cscript-id\u003e .\n\n# Edit a script\n$ gogh script edit \u003cscript-id\u003e\n\n# Remove a script\n$ gogh script remove \u003cscript-id\u003e\n```\n\n### Example Scripts\n\n#### Setting Up Dependencies\n\n```lua\n-- setup-deps.lua\nif os.execute(\"test -f ./package.json\") == 0 then\n  print(\"Installing Node.js dependencies...\")\n  os.execute(\"npm install\")\nelseif os.execute(\"test -f ./go.mod\") == 0 then\n  print(\"Downloading Go dependencies...\")\n  os.execute(\"go mod download\")\nend\n```\n\n#### Custom Git Configuration\n\n```lua\n-- project-git-config.lua\nprint(\"Setting repository-specific Git configuration...\")\nos.execute(\"git config user.email 'work@example.com'\")\n```\n\n## Hook Feature\n\n### What are Hooks?\n\nHooks in Gogh are automation triggers that execute operations (overlays or scripts) at specific points in the repository lifecycle.\n\n### How Hooks Work\n\nHooks combine:\n- **Trigger Events**: When to run (post-clone, post-fork, post-create)\n- **Repository Patterns**: Which repositories to target\n- **Operations**: What to execute (overlay application or script execution)\n\n### Hook Configuration\n\n- **Repository Pattern**: Controls which repositories the hook applies to\n  - Works with glob patterns: `github.com/owner/*`, exact matches, etc.\n- **Trigger Event**: When the hook should run\n  - `post-clone`: After cloning a repository\n  - `post-fork`: After forking a repository\n  - `post-create`: After creating a new repository\n- **Operation Type**: What action to perform\n  - `overlay`: Apply overlay files\n  - `script`: Execute a Lua script\n\n### Basic Hook Commands\n\n```console\n# Add a hook to apply an overlay after cloning\n$ gogh hook add --name \"apply-vscode\" \\\n  --repo-pattern \"github.com/myorg/*\" \\\n  --trigger-event \"post-clone\" \\\n  --operation-type \"overlay\" \\\n  --operation-id \"\u003coverlay-id\u003e\"\n\n# Add a hook to run a script after creating\n$ gogh hook add --name \"setup-new-repo\" \\\n  --repo-pattern \"github.com/myorg/*\" \\\n  --trigger-event \"post-create\" \\\n  --operation-type \"script\" \\\n  --operation-id \"\u003cscript-id\u003e\"\n\n# List all hooks\n$ gogh hook list\n\n# Manually invoke a hook\n$ gogh hook invoke \u003chook-id\u003e [[host/]owner/]repo\n# Invoke for current directory repository\n$ gogh hook invoke \u003chook-id\u003e .\n\n# Remove a hook\n$ gogh hook remove \u003chook-id\u003e\n```\n\n### Practical Examples\n\n#### Automatic Project Setup\n\n1. Create a setup script:\n```console\n$ gogh script add project-setup /path/to/setup.lua\n```\n\n2. Create a hook to run it after cloning:\n```console\n$ gogh hook add --name \"auto-setup\" \\\n  --repo-pattern \"github.com/mycompany/*\" \\\n  --trigger-event \"post-clone\" \\\n  --operation-type \"script\" \\\n  --operation-id \"\u003cscript-id\u003e\"\n```\n\n#### Apply Templates to New Projects\n\n1. Create overlays for project templates:\n```console\n$ gogh overlay add gitignore /path/to/template/.gitignore .gitignore\n```\n\n2. Create a hook to apply them:\n```console\n$ gogh hook add --name \"apply-templates\" \\\n  --repo-pattern \"github.com/myorg/*\" \\\n  --trigger-event \"post-create\" \\\n  --operation-type \"overlay\" \\\n  --operation-id \"\u003coverlay-id\u003e\"\n```\n\n## Extra Feature\n\n### What are Extras?\n\nExtras are higher-level configurations that combine overlays and hooks into reusable packages. They simplify the process of managing repository templates and automation.\n\n### Types of Extras\n\n1. **Auto-apply Extras**: Automatically applied to specific repositories when cloned\n   - Created from existing repositories with their ignored files\n   - Applied automatically via hooks when the repository is cloned\n\n2. **Named Extras**: Reusable templates that can be applied to any repository\n   - Created with custom names for easy reference\n   - Applied manually using the `extra apply` command\n\n### How Extras Work\n\nEach extra contains:\n- One or more overlay-hook pairs\n- Metadata about the source and creation time\n- Type information (auto-apply or named)\n\nWhen you save an extra from a repository, it:\n1. Extracts all untracked files as overlays\n2. Creates hooks to apply these overlays\n\n## Contributing\n\nSee `CONTRIBUTING.md` for development setup notes (including the local `gogh`\nbinary workflow with mise).\n3. Bundles them together as a single extra\n\n### Basic Extra Commands\n\n```console\n# Save a repository's untracked files as an auto-apply extra\n$ gogh extra save github.com/owner/repo\n\n# Create a named extra from a specific repository\n$ gogh extra create my-template --source github.com/owner/repo --overlay \u003coverlay-name\u003e\n\n# List all extras\n$ gogh extra list\n\n# Show details of an extra\n$ gogh extra show \u003cextra-id-or-name\u003e\n\n# Apply a named extra to repositories\n$ gogh extra apply \u003cextra-name\u003e [[host/]owner/]repo...\n\n# Remove an extra\n$ gogh extra remove \u003cextra-id-or-name\u003e\n```\n\n### Practical Examples\n\n#### Auto-apply Repository Configuration\n\nSave your local development environment setup to be automatically restored when cloning:\n\n```console\n# Save untracked files from a repository as auto-apply extra\n$ gogh extra save github.com/owner/repo\n# Save from current directory repository\n$ gogh extra save .\n# Now when you clone this repository again, all untracked files will be restored\n```\n\n#### Create Reusable Project Templates\n\nCreate a template from a well-configured repository:\n\n```console\n# Create a template with common development files\n$ gogh extra create python-template github.com/myorg/python-starter\n\n# Apply it to new projects\n$ gogh extra apply python-template github.com/myorg/new-python-project\n```\n\n#### Managing Extras\n\nView and manage your extras:\n\n```console\n# List all extras with their types\n$ gogh extra list --type all\n\n# Show detailed information about an extra\n$ gogh extra show my-template\n\n# Remove an extra that's no longer needed\n$ gogh extra remove old-template\n```\n\n# LICENSE\n\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg)](http://www.opensource.org/licenses/MIT)\n\nThis software is released under the [MIT License](http://www.opensource.org/licenses/MIT), see\nLICENSE. And this software is based on [`ghq`](https://github.com/motemen/ghq).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyoh86%2Fgogh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyoh86%2Fgogh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyoh86%2Fgogh/lists"}