{"id":16980117,"url":"https://github.com/peter-bread/gamon","last_synced_at":"2025-03-22T15:30:33.457Z","repository":{"id":221896471,"uuid":"750076583","full_name":"peter-bread/gamon","owner":"peter-bread","description":"GitHub Account Manager","archived":true,"fork":false,"pushed_at":"2025-01-28T19:41:50.000Z","size":129,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-01T17:01:49.982Z","etag":null,"topics":["account-management","bash","cobra","command-line-tool","completions","git","github","golang","homebrew","linux","mac","macos","shellscript","zsh"],"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/peter-bread.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2024-01-29T23:55:56.000Z","updated_at":"2025-01-30T20:31:26.000Z","dependencies_parsed_at":"2024-02-20T17:57:46.958Z","dependency_job_id":"f6e825e5-19bc-4588-a275-06b22212305b","html_url":"https://github.com/peter-bread/gamon","commit_stats":null,"previous_names":["peter-bread/gamon"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-bread%2Fgamon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-bread%2Fgamon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-bread%2Fgamon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-bread%2Fgamon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-bread","download_url":"https://codeload.github.com/peter-bread/gamon/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244978337,"owners_count":20541837,"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":["account-management","bash","cobra","command-line-tool","completions","git","github","golang","homebrew","linux","mac","macos","shellscript","zsh"],"created_at":"2024-10-14T01:49:27.465Z","updated_at":"2025-03-22T15:30:33.442Z","avatar_url":"https://github.com/peter-bread.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--toc:ignore--\u003e\n\n# gamon\n\n\u003e [!WARNING]\n\u003e Gamon is being archived. This repo is a bit of a mess, some of the install\n\u003e scripts are broken and I'm not happy with the tool at the moment.\n\u003e\n\u003e I will likely do a full rewrite and re-release it in a new repo.\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n[![GitHub Release](https://img.shields.io/github/v/release/peter-bread/gamon?style=for-the-badge\u0026color=ff00a1)](https://github.com/peter-bread/gamon/releases/latest) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/peter-bread/gamon/go.yml?branch=dev\u0026style=for-the-badge\u0026label=build%20and%20test%3A%20dev) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/peter-bread/gamon/go.yml?branch=main\u0026style=for-the-badge\u0026label=build%20and%20test%3A%20main) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/peter-bread/gamon/latest?style=for-the-badge) [![GitHub License](https://img.shields.io/github/license/peter-bread/gamon?style=for-the-badge\u0026color=008500)](./LICENSE)\n\n\u003c!-- markdownlint-restore --\u003e\n\n---\n\nGamon is a command line tool that helps with managing multiple GitHub accounts\non one machine.\n\nRight now, it's main functionality is switching the active `gh` account based\non your current working directory.\n\n\u003c!--toc:ignore--\u003e\n\n## Table of Contents\n\n\u003c!--toc:start--\u003e\n\n- [Prerequisites](#prerequisites)\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n- [Set up](#set-up)\n- [Usage](#usage)\n- [Documentation](#documentation)\n- [License](#license)\n\u003c!--toc:end--\u003e\n\n## Prerequisites\n\nBefore you install this software, make sure you have a compatible shell\ninstalled. We currently support `bash` and `zsh`.\n\n|       | MacOS      | Linux      |\n| ----- | ---------- | ---------- |\n| Shell | bash / zsh | bash / zsh |\n\n## Dependencies\n\nThis software depends on the following software:\n\n\u003c!--toc:ignore--\u003e\n\n### Build Dependencies\n\n| Application | Link                              |\n| ----------- | --------------------------------- |\n| Go          | [Link to Go](https://golang.org/) |\n\n\u003c!--toc:ignore--\u003e\n\n### Runtime Dependencies\n\n| Application | Link                                     |\n| ----------- | ---------------------------------------- |\n| gh          | [Link to gh](https://github.com/cli/cli) |\n\n`gh` is GitHub’s official command line tool. It brings pull requests, issues,\nand other GitHub concepts to the terminal next to where you are already working\nwith `git` and your code.\n\n## Installation\n\nBelow are the two simplest ways to install the gamon binary, `gam`.\n\nCheck out [manual installation](./docs/manual_installation.md) for more\ndetailed installation instructions.\n\n\u003c!--toc:ignore--\u003e\n\n### Homebrew\n\nIf you're on macOS, you can use [Homebrew](https://brew.sh/):\n\n```bash\nbrew tap peter-bread/gamon\nbrew install gamon\n```\n\nHomebrew will manage dependencies automatically.\n\n\u003e Not tested yet, but this might work on Linux if you are using Linuxbrew.\n\n\u003c!--toc:ignore--\u003e\n\n### Pre-built Binaries\n\nEnsure you have installed the [runtime dependencies](#runtime-dependencies).\n\nYou can use the [installation script](./scripts/install_binary.sh) to\ndownload, extract and install the binary.\n\nThis script downloads the pre-built binary, moves it to `~/.gamon/bin`, and\nperforms other necessary setup tasks.\n\n\u003e Before using this script, please ensure you review and understand the\n\u003e operations it performs. This is to ensure that it aligns with your intended\n\u003e use and doesn't cause unintended effects.\n\nYou will be prompted to add `~/.gamon/bin` to PATH in your `.bashrc` or `zshrc`.\n\nFor the latest release:\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/peter-bread/gamon/main/scripts/install_binary.sh | bash\n```\n\nFor a specific version:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/peter-bread/gamon/main/scripts/install_binary.sh | bash -s -- X\n```\n\n\u003c!-- markdownlint-restore --\u003e\n\nwhere `X` is the major version you wish to install.\n\n\u003e **Note:** The versioning scheme used is `X.Y.Z`. When you specify `X` in the\n\u003e command above, the script will install the latest release within that\n\u003e major version.\n\nSee [manual installation](./docs/manual_installation.md) for more installation options.\n\n## Set up\n\nSee [this guide](https://github.com/peter-bread/git-ssh-management) for a\nsetting up the required file structure.\n\n\u003e In future releases, I hope to automate much of the set up process.\n\u003e\n\u003e [_Or change it entirely..._](https://github.com/peter-bread/gamon/issues/55)\n\nYou need to set `GAM_REPO_ROOT_DIR`, the path where all of **your** git\nrepositories will be stored.\n\nThis is illustrated below:\n\n```text\n\"$GAM_REPO_ROOT_DIR/\"\n|-- personal/\n|   |-- myrepo123/\n|-- work/\n|   |-- project1/\n|   |-- project2/\n|\n| ...\n```\n\nTo set `GAM_REPO_ROOT_DIR`, add the following line to\nyour `.zshrc` or `.bashrc` file:\n\n```bash\nexport GAM_REPO_ROOT_DIR=\"/path/to/repo/root/directory\"\n```\n\nReplace `\"/path/to/repo/root/directory\"` with the actual path to your repository\nroot directory.\n\nThen, to enable automatic account switching based on the repository you're\nworking with, add the following line to your .zshrc or .bashrc file:\n\n```bash\nsource \u003c(gam hook)\n```\n\nThis will run the gam script command every time you start a new shell session,\nsetting up the necessary environment for automatic account switching.\n\n## Usage\n\nAfter settimg up `gam` as described in the [set up](#set-up) section, you can\nstart using it to manage your GitHub accounts.\n\n`gam` uses the `GAM_REPO_ROOT_DIR` environment variable to determine which\nGitHub account to use based on the current repository. When you navigate to a\ndirectory within `GAM_REPO_ROOT_DIR` and run a GitHub CLI command, `gam` will\nautomatically switch to the account associated with that directory.\n\nRemember to source the `gam hook` in each new shell session to enable automatic\naccount switching:\n\n```bash\nsource \u003c(gam hook)\n```\n\n## Documentation\n\n- [Manual Installation](./docs/manual_installation.md)\n- [Commands](./docs/commands.md)\n- [Updating](./docs/update.md)\n- [Uninstalling](./docs/uninstall.md)\n\n## License\n\nThis project is licensed under the terms of the MIT license.\nSee the [LICENSE](./LICENSE) file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-bread%2Fgamon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-bread%2Fgamon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-bread%2Fgamon/lists"}