{"id":18609952,"url":"https://github.com/mcrmonkey/bash-my-gcp","last_synced_at":"2025-07-26T02:37:39.203Z","repository":{"id":57887750,"uuid":"85008901","full_name":"mcrmonkey/bash-my-gcp","owner":"mcrmonkey","description":"Tools and aliases for gcloud in bash","archived":false,"fork":false,"pushed_at":"2022-08-26T12:07:16.000Z","size":30,"stargazers_count":19,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T08:53:54.215Z","etag":null,"topics":["bash","bash-script","cloud","cloud-computing","gcp","google-cloud","google-cloud-sdk","zsh-plugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/mcrmonkey.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}},"created_at":"2017-03-14T23:54:29.000Z","updated_at":"2024-12-05T22:26:39.000Z","dependencies_parsed_at":"2023-01-16T21:00:59.450Z","dependency_job_id":null,"html_url":"https://github.com/mcrmonkey/bash-my-gcp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mcrmonkey/bash-my-gcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrmonkey%2Fbash-my-gcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrmonkey%2Fbash-my-gcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrmonkey%2Fbash-my-gcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrmonkey%2Fbash-my-gcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcrmonkey","download_url":"https://codeload.github.com/mcrmonkey/bash-my-gcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrmonkey%2Fbash-my-gcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267108566,"owners_count":24037503,"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-07-26T02:00:08.937Z","response_time":62,"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":["bash","bash-script","cloud","cloud-computing","gcp","google-cloud","google-cloud-sdk","zsh-plugin"],"created_at":"2024-11-07T03:07:51.984Z","updated_at":"2025-07-26T02:37:39.150Z","avatar_url":"https://github.com/mcrmonkey.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bash-my-gcp\n\nbash-my-gcp assists people using Google Cloud Platform services from the\ncommand line by providing shorter memorable commands for operating on the\nGoogle Cloud platform.\n\nAll of these functions and aliases are wrappers around the Google Cloud SDK\ncommand line tools.\n\n\n**Please note**:\nAlthough these scripts make use of Google products and services, these scripts\nare not endorsed and/or supported by Google themselves. Use at your own risk\netc.\n\nThis project has been inspired by the\n[bash-my-aws](https://github.com/bash-my-universe/bash-my-aws) project.\n\nWhy not give this a try:\n[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/mcrmonkey/bash-my-gcp\u0026tutorial=cloudshell-tutorial.md)\n\n\n**Note**\nTo aid with compatability in zsh some command names have recently changed.\nPlease see below for more information.\n\n\n\n\n## Requirements\n\n* [Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstart-linux)\n* [bash](https://www.gnu.org/software/bash/)\n or\n* [zsh](https://www.zsh.org/)\n\n## Installation\n\nEnsure you have the cloudsdk installed on your system and you have it in\na working state\n\nClone this repository:\n\n```sh\ngit clone https://www.github.com/mcrmonkey/bash-my-gcp\n```\n\nThe scripts will need to be loaded in to your bash session:\n\nIf you have make installed run the following to add it to you bashrc file:\n\n```sh\nmake install\n```\n\nor add the following line to your bashrc file manually:\n\n```sh\n. /path/to/bash-my-gcp/loader.sh\n```\n\nYou can also run the above line manually as and when you need it\n\n## Usage\n\nThe following commands are available:\n\n### Configuration profile operations\n\n#### `gcpro [config profile]`\n\nThis command handles switching between GCP configuration profiles and is\na wrapper around the `gcloud config configurations` command.\n**Note** this has recently changed from `gcp` for zsh git alias compatibility.\n\nExample:\n\n```sh\ngcpro customer-prod\n```\n\nRunning the command without arguments will display your configuration profiles\nand which one of them is active\n\nTab completion is available for this command.\n\nrun the following command to learn more about configuration profiles and how to\nset them up:\n\n```sh\ngcloud topic configurations\n```\n\n#### `gcp-id`\n\nDisplay the current project ID\n\n#### `gcpro-create \u003cconfig_name\u003e \u003cgcloud_account\u003e \u003cproject_name\u003e`\n\nCreate a new configuration profile\n\n* `\u003cconfig_name\u003e` - Name of the config profile. e.g.: gaskets-nonprod\n* `\u003cgcloud_account\u003e` - The account you want to use with the project. This account\n  will be tested against the project as its added.\n* `\u003cproject_name\u003e` - The project name\n\n**Note**\nThis command has recently changed from `gcp-create` to be more consistent with\nthe zsh changes\n\n\n### Console operations\n\n#### `gconsole [section]`\n\nThis command will open the cloud console on either the home page or the\nspecified section i.e. networks\n\nTODO: This command probably needs a better way of starting a browser that is\nfully compatible with all/vast majority of linux distributions. If your distro\ndoesn't have xdg-open ( Part of Gnome ) the URL will be dropped in your\nterminal.\n\nThis command currently requires the project ID to be set in your configuration\nprofile.\n\nExamples:\n\nOpen the console home page for the current project:\n\n```sh\ngconsole\n```\n\nOpen the console in the networking section:\n\n```sh\ngconsole net\n```\n\nTab completion is available for this command.\n\n### Cloud DNS operations\n\n#### `gcdns-zones`\n\nList or describe managed zones.\n\nTab completion is available for this command.\n\n**Note**\nThis has changed from `gcd-zones` in light of the changes to the `gcd` command\nso that it is more consistent.\n\n#### `gcdns`\n\nList DNS record sets.\n**Note**\nThis has changed from `gcd` for zsh compatibility with git aliases\n\n### Instance operations\n\n#### `gci`\n\nThis command will list the current instances and their state in the currently\nloaded project in a fancy table.\n\n`--filter` is available and will fuzzy match instances. `--filter=\"this AND that\"`\nwill fail however due to a bug :\\\n\n#### `gci-status \u003cinstance\u003e`\n\nObtain the status of an instance or group of instances.\nFuzzy matching of instance names is available.\n\n\n#### `gci-start \u003cinstance\u003e`\n\nStart an instance\n\nCurrently only supports one instance name\n\n#### `gci-stop \u003cinstance\u003e`\n\nStop an instance\n\nCurrently only supports one instance name\n\n#### `gci-zone \u003cinstance\u003e`\n\nReturn the zone for an instance\n\n#### `gci-ips \u003cinstance\u003e`\n\nList the IP's for an instance\n\n#### `gci-iip \u003cinstance\u003e`\n\nShow internal IP's for an instance\n\n#### `gci-eip \u003cinstance\u003e`\n\nShow external IP's for an instance\n\n\n### Zones and regions\n\n#### `gcr [zone]`\n\nList the available regions with your project quotas and region status along side\n\n\n#### `gcz [zone]`\n\nList the available zones, the region it lives in and the zones status\n\n\n### Misc\n\n#### `gssh \u003cIP or hostname\u003e`\n\nWrapper around ssh command to funnel host key ID's in to knownhost file suffixed with the project ID\neg: ~/.ssh/known_hosts-abc-prod-1234\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrmonkey%2Fbash-my-gcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcrmonkey%2Fbash-my-gcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrmonkey%2Fbash-my-gcp/lists"}