{"id":44330034,"url":"https://github.com/rahmasir/gfr","last_synced_at":"2026-02-11T09:09:09.598Z","repository":{"id":309893448,"uuid":"1037310645","full_name":"rahmasir/gfr","owner":"rahmasir","description":"rahmasir's git flow assistant [Git Flow + Rahmasir], for easier access to using as cli, I change it to ggg, there is a dedicated Git assistant that speeds up the development of projects here | دستیار گیت فلوی این ارگانیزیشن که توسعه برنامه ها رو سریع تر میکنه 👋","archived":false,"fork":false,"pushed_at":"2025-12-31T20:43:19.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-05T07:55:13.157Z","etag":null,"topics":["gf","ggg","git","git-flow","grf","hammasir","neshan","neshan-map","pip","poetry","python","rahmasir"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/gfr","language":"Python","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/rahmasir.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-13T11:34:22.000Z","updated_at":"2025-12-31T20:43:23.000Z","dependencies_parsed_at":"2026-01-01T06:11:45.755Z","dependency_job_id":null,"html_url":"https://github.com/rahmasir/gfr","commit_stats":null,"previous_names":["rahmasir/gfr"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rahmasir/gfr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmasir%2Fgfr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmasir%2Fgfr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmasir%2Fgfr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmasir%2Fgfr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahmasir","download_url":"https://codeload.github.com/rahmasir/gfr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmasir%2Fgfr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29330858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: 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":["gf","ggg","git","git-flow","grf","hammasir","neshan","neshan-map","pip","poetry","python","rahmasir"],"created_at":"2026-02-11T09:09:08.716Z","updated_at":"2026-02-11T09:09:09.585Z","avatar_url":"https://github.com/rahmasir.png","language":"Python","readme":"# gfr - Git Flow Assistant of Rahmasir\n#### Video Demo: [https://youtu.be/B6yIjM1rkIU](https://youtu.be/B6yIjM1rkIU)\n#### Description:\n\n`gfr` is a powerful command-line tool designed to streamline your Git and GitHub workflows, especially for projects involving microservices managed as Git submodules. It automates common tasks like repository creation, branch management, releases, and more, letting you focus on coding.\n\n###### This was created without git flow and only with the main branch 🪖😐🪻\n\n## Installation\n\nYou can install `gfr` in two ways:\n\n### 1. From PyPI\n\nThe easiest way to install `gfr` is directly from the Python Package Index (PyPI).\n```\npip install gfr\n```\n\n### 2. From Source\n\nAlternatively, you can clone the repository and install it locally. This is useful if you want to contribute to the project.\n```\ngit clone https://github.com/rahmasir/gfr\ncd gfr\npip install .\n```\n\n## Configuration\n\nBefore using `gfr`, you need to create a `.env` file in the root directory of your project. This file stores your GitHub credentials securely.\n\n1.  Create a file named `.env`.\n    \n2.  Add the following variables:\n    \n```\n# .env\nGITHUB_TOKEN=your_github_personal_access_token\nGITHUB_ORGANIZATION=your_github_organization\nGITHUB_USERNAME=your_github_username\n```\n\n-   **`GITHUB_TOKEN`**: A [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens \"null\") with `repo` scopes.\n    \n-   **`GITHUB_ORGANIZATION`**: The name of your GitHub organization where repositories will be managed.\n    \n-   **`GITHUB_USERNAME`**: Your GitHub username, used for assigning issues and pull requests.\n    \n\n## Usage\n\nAll commands are run through the `ggg` entry point.\n\n### Project \u0026 Repository Management\n\n#### `ggg init`\n\nInitializes a new project in an empty directory. This command will:\n\n1.  Create a new repository on GitHub.\n    \n2.  Initialize a local Git repository.\n    \n3.  Create and push `develop` and `doc` branches.\n    \n4.  Set `develop` as the default branch on GitHub.\n    \n5.  Switch your local branch to `develop`.\n    \n```\n# Navigate to an empty directory\nmkdir my-new-project \u0026\u0026 cd my-new-project\n\n# Run the command and follow the prompts\nggg init\n```\n\n#### `ggg create`\n\nCreates a new GitHub repository and immediately clones it into your current directory.\n```\nggg create\n```\n\n#### `ggg clone`\n\nFetches a list of all repositories from your organization and provides an interactive menu to choose which one to clone.\n```\nggg clone\n```\n\n#### `ggg addmicro [microservice-name]` (alias: `am`)\n\nCreates a new repository for an existing local directory and adds it to your main project as a Git submodule.\n```\n# Assuming 'user-service' is an existing directory\nggg addmicro user-service\n```\n\n### Daily Workflow Commands\n\n#### `ggg status`\n\nDisplays a detailed, color-coded status for the parent project and all submodules, showing the current branch and lists of staged, unstaged, and untracked files.\n```\nggg status\n```\n\n#### `ggg add [service] [files...]`\n\nStages changes in either the parent project or a specific microservice.\n\n-   **`service`**: The target repository.\n    \n    -   `.`: The parent project.\n        \n    -   `-`: The last used microservice.\n        \n    -   `[name]`: The name of a specific microservice.\n        \n-   **`files...`**: The files to stage (e.g., `.` for all).\n    \n```\n# Stage all changes in the parent project\nggg add . .\n\n# Stage a specific file in the 'user-service'\nggg add user-service src/main.py\n\n# Stage all changes in the last used microservice\nggg add - .\n```\n\n#### `ggg commit [service] \"[message]\"`\n\nCommits staged changes. If committing to a microservice on a feature/bugfix branch, it automatically prepends the issue number to the commit message.\n```\n# Commit in the parent project\nggg commit . \"Initial commit\"\n\n# Commit in the 'user-service'\nggg commit user-service \"Implement user login endpoint\"\n```\n\n#### `ggg ac [service] \"[message]\"`\n\nA convenient shortcut that stages all changes (`add .`) and commits them in one step.\n```\nggg ac user-service \"Refactor user model\"\n```\n\n#### `ggg push`\n\nPushes all branches (`git push --all`) for the parent project and every submodule.\n```\nggg push\n```\n\n#### `ggg acp [service] \"[message]\"`\n\nThe ultimate shortcut: stages all changes, commits, and pushes everything in a single command.\n```\nggg acp . \"Update project README\"\n```\n\n### Branching \u0026 Feature Management\n\n#### `ggg feature [service] start \"[name]\"`\n\nStarts a new feature workflow. It will:\n\n1.  Create a new issue on GitHub with the `enhancement` label.\n    \n2.  Create a new local branch named `feature/[issue-number]-[feature-name]`.\n    \n3.  Switch you to the new branch.\n    \n```\nggg feature . start \"User Profile Page\"\n```\n\n#### `ggg feature [service] finish`\n\nFinishes the current feature branch. It automates the entire closing process:\n\n1.  Pushes the branch to the remote.\n    \n2.  Creates a pull request to `develop`.\n    \n3.  Merges the pull request, which automatically closes the associated issue.\n    \n4.  Deletes the local and remote feature branches.\n    \n5.  Switches you back to the `develop` branch.\n    \n```\nggg feature . finish\n```\n\n#### `ggg bugfix [service] start \"[name]\"` / `finish`\n\nWorks exactly like the `feature` command but uses the `bugfix` prefix for branches and the `bug` label for issues.\n```\nggg bugfix user-service start \"Fix login authentication error\"\nggg bugfix user-service finish\n```\n\n#### `ggg dev` / `ggg doc`\n\nQuickly switch to the `develop` or `doc` branch in the current repository.\n```\nggg dev\n```\n\n### Release Management\n\n#### `ggg release [service] start`\n\nInitiates the release process. It will:\n\n1.  Determine the next version number (major/minor) based on existing Git tags.\n    \n2.  Create a new `release/[version]` branch.\n    \n3.  Prompt you for changelog entries.\n    \n4.  Create or update the `CHANGELOG.md` file.\n    \n```\nggg release . start\n```\n\n#### `ggg release [service] finish`\n\nFinalizes and publishes a release. This command will:\n\n1.  Create and merge pull requests to both `main` and `develop`.\n    \n2.  Create a new version tag on the `main` branch.\n    \n3.  Generate a new GitHub Release with detailed notes and a link to the commits.\n    \n4.  Clean up the release branch.\n    \n5.  Switch you back to `develop`.\n    \n```\nggg release . finish\n```\n\n### Utility Commands\n\n#### `ggg link`\n\nDisplays a table with clickable GitHub links for the parent project and all submodules.\n```\nggg link\n```\n\n#### `ggg addasset [service] [asset-name] [destination-file]`\n\nCreates a new file from a predefined template.\n```\n# Create a MIT LICENCE in user-service\nggg addasset user-service mit LICENCE\n```\n\n## How It Works\n\n`gfr` is built on a few core principles to keep it robust and extensible:\n\n-   **Git Submodules**: The tool is designed to work with a microservice architecture where each service is a Git submodule within a parent repository. Commands intelligently target either the parent or a specific submodule.\n    \n-   **State Management**: A `.gfr.yml` file is created at the root of your project to store simple state, such as the last-used microservice. This enables convenient shortcuts like using `-` as a service name.\n    \n-   **Modular Commands**: Each command (`add`, `commit`, `release`, etc.) is a self-contained module. This makes the codebase easy to navigate and allows for new commands to be added without affecting existing ones.\n    \n-   **Service Layers**: The tool separates concerns into different layers. Commands handle user interaction, helpers contain shared business logic, and utilities provide low-level wrappers around Git and the GitHub API.\n    \n\n## Contributing\n\nContributions are welcome! If you have an idea for a new feature or have found a bug, please open an issue. If you'd like to contribute code, please follow these steps:\n\n1.  Fork the repository.\n    \n2.  Create a new branch for your feature (`git checkout -b feature/AmazingFeature`).\n    \n3.  Commit your changes (`git commit -m 'Add some AmazingFeature'`).\n    \n4.  Push to the branch (`git push origin feature/AmazingFeature`).\n    \n5.  Open a pull request.\n    \n\n## License\n\nThis project is licensed under the MIT License - see the `LICENSE` file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahmasir%2Fgfr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahmasir%2Fgfr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahmasir%2Fgfr/lists"}