Skip to content

If your are working with ,multiple gcp projects and struggle to remember which one is currently active, here is a solution for you.

License

Notifications You must be signed in to change notification settings

avivl/gcloud-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub stars GitHub forks

gcloud-project

📝 Description

Working with multiple GCP projects can be a bit confusing. After each gcloud command you need to remember adding the --project flag of the project you are currently working on. gcloud-project was created in order to solve this issue.

gcloud-project will look for a file named .gcpprj starting from the current directory and going up the tree. If such file is found its content will be read as the project-id.

Each execution of the gcloud command, will set the project id to that value, before actualy calling the command.

After the execution the value in the config file will be restored to it's previous value.

🔍 Usage

Under Zsh or Bourne shells such as sh and bash, you just source init.sh into your shell:

$ source ./init.sh

📦 Installation

Give it a try!

  • Install with zplug:

    gcloud-project can be installed by adding the following to your .zshrc file in the same function you're doing your other zplug load calls in.

     $ zplug "avivl/gcloud-project", use:init.sh
  • Install with git clone:

     $ git clone https://github.com/avivl/gcloud-project
     $ source /path/to/gcloud-project/init.sh

🎫 License

MIT ©️ avivl

About

If your are working with ,multiple gcp projects and struggle to remember which one is currently active, here is a solution for you.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages