{"id":30749504,"url":"https://github.com/treechcer/gust","last_synced_at":"2025-09-14T07:23:28.935Z","repository":{"id":306787014,"uuid":"1027189707","full_name":"Treechcer/GUST","owner":"Treechcer","description":"Gust a lightweight PowerShell script to simplify and automate common GitHub workflows: initializing repos, managing branches, committing, pushing, pulling, etc.  all configurable via a JSON file.","archived":false,"fork":false,"pushed_at":"2025-09-13T13:37:59.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T14:43:07.357Z","etag":null,"topics":["automation","branch-management","clitool","developer-tools","devops","git","git-automation","git-client","github","open-source","powershell","productivity","scripting","version-control","workflow"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/Treechcer.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-27T14:01:27.000Z","updated_at":"2025-09-13T13:38:03.000Z","dependencies_parsed_at":"2025-09-01T21:17:08.883Z","dependency_job_id":"8754848e-97cf-473f-8562-efc074cc6754","html_url":"https://github.com/Treechcer/GUST","commit_stats":null,"previous_names":["treechcer/gust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Treechcer/GUST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treechcer%2FGUST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treechcer%2FGUST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treechcer%2FGUST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treechcer%2FGUST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Treechcer","download_url":"https://codeload.github.com/Treechcer/GUST/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treechcer%2FGUST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275076031,"owners_count":25401311,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","branch-management","clitool","developer-tools","devops","git","git-automation","git-client","github","open-source","powershell","productivity","scripting","version-control","workflow"],"created_at":"2025-09-04T06:08:51.734Z","updated_at":"2025-09-14T07:23:28.927Z","avatar_url":"https://github.com/Treechcer.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gust – Git Utility Something Tool (PowerShell)\r\n\r\n**Gust** is a PowerShell script that automates common Git tasks for your GitHub repository (managing branches, pushing etc.) with all being configurable in `config.json`.\r\n\r\n## Features\r\n\r\n- Verifies if the user has set `user.name` and `user.email` (global and local) - or set their name and email in config with `\"changeNameGlobal\" : true` (default is false)\r\n- Initializes a `new` Git repository if one doesn't exists\r\n- Adds and commits changes  \r\n- Pushes to the selected branch (default is `main`)\r\n- A most of things being configurable in `config.json`\r\n- Supports multiple \"modes\" (mode is what the script will do when you run GUST) - including modes: branch switching, branch creating, etc.\r\n- Allows setting default message for commit messages\r\n- Support short aliases for inputs (more on that later)\r\n- Adds a `remote origin` (or any other depends on config) and `pulls with --allow-unrelated-histories`\r\n\r\n## Parameters\r\n\r\n| Parameter   | Required  | Description | Aliases  |\r\n|-------------|---------- |-------------| -------- |\r\n| message     | Sometimes                                  | Your commit message you want to use                                                                                                           | -c (as commit message) |\r\n| gitURL      | Only required when initializing repository | The GitHub repository URL (omit .git at the end it will be added automatically)                                                               | -u (as URL)            |\r\n| otherModes  | most of the time                           | This is used to change the mode you want to do, also it has configurable default value `\"defaultMode\" : \"c\"`                                  | -m (as mode)           |\r\n| branch      | no                                         | this is for working branches, it has default configurable in config under `\"defaultBranch\" : \"main\",`in some cases as `main`                  | -b                     |\r\n| number      | no                                         | this is used when you need some number as an input (now it's only used in log, it has default configurable in config `\"defaultLogLength\" : 5,`| -n                     | \r\n\r\n## Mode parameters\r\n\r\n|Name | Description |\r\n|-----|-------------|\r\n| c(commit)                 | This is configs default. Adds a commit message and pushes to your GitHub repository. |\r\n| b(ranch)s(witch)c(create) | Creates a new branch and switches to the new branch.                                 |\r\n| b(ranch)s(witch)          | Switches to an existing branch.                                                      |\r\n| b(ranch)d(elete)          | Deletes an existing branch.                                                          |\r\n| s(tatus)                  | Shows the status of current branch.                                                  |\r\n| p(ull)                    | Pulls the latest changes from your remote repository.                                |\r\n| l(og)                     | Shows recent commits (default number or set with -number / -n).                      |\r\n\r\n## configurations\r\n\r\n```json\r\n{\r\n    \"defaultBranch\" : \"main\",\r\n    \"defaultRemote\" : \"origin\",\r\n    \"userName\" : \"$null\",\r\n    \"userEmail\" : \"$null\",\r\n    \"changeNameGlobal\" : false,\r\n    \"autoPullBeforePush\": true,\r\n    \"defaultCommitMessage\" : \"small fixes\",\r\n    \"forceBranchDelete\": false,\r\n    \"defaultLogLength\" : 5,\r\n    \"defaultMode\" : \"c\"\r\n}\r\n```\r\n\r\n| key | description |\r\n| --- | ----------- |\r\n| defaultBranch        | Default branch to push to.                                                                                                                                                  |\r\n| defaultRemote        | Default git remote name.                                                                                                                                                    |\r\n| userName             | Used if no git config is set for user.name.                                                                                                                                 |\r\n| userEmail            | Used if no git config is set for user.email.                                                                                                                                |\r\n| changeNameGlobal     | Boolean value that makes the name / email change global or local (to enable name changing you have to change the userEmail to your email address and userName to your name) |\r\n| autoPullBeforePush   | If `True` this sets if you automatically pull before pushing.                                                                                                               |\r\n| defaultCommitMessage | Used as no commit message is inputted.                                                                                                                                      |\r\n| forceBranchDelete    | If `true` uses `-D` (force deletes) branches.                                                                                                                               |\r\n| defaultLogLength     | Number of commits shown when using the `log` mode.                                                                                                                          |\r\n| defaultMode          | Default mode used when no mode is inputted.                                                                                                                                 |\r\n\r\n## Prerequisites\r\n\r\n- [Git](https://git-scm.com/) installed on your system\r\n- User has configured name and email configured:\r\n\r\ngit config --global user.name \"Your Name\"  \r\ngit config --global user.email \"your@email.com\"\r\n\r\n\u003e Note: To configure local configuration instead, remove `--global`.\r\n\u003e Note: this can also be setup as automatic action if you set `userName`, `userEmail` to change your name locally, if you want it globally you can change to true `changeNameGlobal` in your config file.\r\n\r\n## Usage\r\n\r\n```powershell\r\n.\\gust.ps1 -c \"commit message\" -u \"URL\" \r\n```\r\n\r\nThis is an example of pushing and setting up remote code to your GitHub repository.\r\n\r\n```powershell\r\n.\\gust.ps1 -c \"Refactor UI\"\r\n```\r\n\r\nThis is an example of committing to an already established repository.\r\n\r\n``` powershell\r\n.\\gust.ps1 -m \"bcs\" -b \"coolBranch\"\r\n```\r\n\r\nthis is example of creating a new branch and switching to the branch\r\n\r\n```powershell\r\n.\\gust.ps1 -m \"bs\" -b \"main\"\r\n```\r\n\r\nThis is example of switching to a already existing branch.\r\n\r\n```powershell\r\n.\\gust.ps1 -m \"bd\" -b \"coolBranch\"\r\n```\r\n\r\nThis is example of deleting a existing branch.\r\n\r\n```powershell\r\n.\\gust.ps1 -m \"s\"\r\n```\r\n\r\nThis is example of showing git status.\r\n\r\n```powershell\r\n.\\gust.ps1 -m \"log\" -n 8\r\n```\r\n\r\nThis is example of showing the log provided the length of how much you want (in this you'l see 8 things in the log).\r\n\r\n```powershell\r\n.\\gust.ps1 -c \"Bug fixes\"\r\n```\r\n\r\nThis is showcase you don't need to use `-m` dor mode because you have default mode in config (which defaults to `c` - commit mode).\r\n\r\n## Set Up To Call GUST Globally\r\n\r\nYou can make gust.ps1 callable from anywhere by adding its directory to your PATH environment variable. \r\n\r\nFor example, if the script is located at: `C:\\downloads\\gust\\gust.ps1`\r\n\r\nThen add the following path to your system's PATH variable: `C:\\downloads\\gust\\`\r\n\r\n\u003e Note: last `\\` is necesery for it to work\r\n\r\nAfter that, you can run the script using:\r\n\r\ngust -c \"Your commit message\"\r\n\r\n\u003e Note: If you delete the `gust.cmd` file, you'll need to call the script explicitly using `gust.ps1`. In that case, include the full path or ensure the .ps1 file extension is recognized in your environment.\r\n\r\n## Modding Support\r\n\r\nGUST supports **mods** (external PowerShell scripts) to extend its functionality.  \r\nEach mod must follow a strict structure and expose specific functions so GUST can load and execute them.\r\n\r\n### Mod Structure\r\n\r\nA mod is a `.ps1` file placed in the `mods/` directory.  \r\nIt must define these functions:\r\n\r\n- **getModificationName** → returns the mod’s name  \r\n- **getModificationVersion** → returns the mod’s version  \r\n- **getModifications** → returns a list of regex/string patterns that the mod recognizes as valid \"modes\"  \r\n- **behaviourSwitchCheck** → main function called when a mode matches\r\n\r\n\u003e Function names **must not be changed**. Renaming them will break the mod system.\r\n\r\n### Example Mods\r\n\r\nThere are already example mods included in the repository:\r\n\r\n- `mods/exampleMod1.ps1` (mod tester)\r\n- `mods/exampleMod2.ps1` (gust importer)\r\n\r\nYou can use these as a reference to see how mods are structured.\r\n\r\nA reusable template is also provided in:\r\n\r\n- `mods/modTemplate.ps1`\r\n\r\nThis file can be copied and modified to create your own mods quickly.\r\n\r\n## Mod API\r\n\r\nMod API is stored in the file `modAPI.ps1`.  \r\nFor now, it is only used as an easy way to access user inputs from the main GUST script.\r\n\r\n| Function       | Description |\r\n|----------------|-------------|\r\n| getMessage     | Returns the input for commit message. |\r\n| getURL         | Returns the input for repository URL. |\r\n| getOtherModes  | Returns the input for mode string. |\r\n| getBranch      | Returns the input for branch name. |\r\n| getNumber      | Returns the input for numeric input (used in log)|\r\n\r\n## Final Note\r\n\r\nThis was made mainly for my use, because these are most of the commands I use and it streamlines most of my committing to github.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreechcer%2Fgust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreechcer%2Fgust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreechcer%2Fgust/lists"}