项目作者: mhristof

项目描述 :
Generate iterm2 dynamic environments from your AWS and K8s configurations
高级语言: Go
项目地址: git://github.com/mhristof/germ.git
创建时间: 2020-05-19T18:51:58Z
项目社区:https://github.com/mhristof/germ

开源协议:

下载


  1. _______ _______ ______ __ __
  2. | || || _ | | |_| |
  3. | ___|| ___|| | || | |
  4. | | __ | |___ | |_||_ | |
  5. | || || ___|| __ || |
  6. | |_| || |___ | | | || ||_|| |
  7. |_______||_______||___| |_||_| |_|

Create iterm2 dynamic profiles.

Installation

  1. go get github.com/mhristof/germ

Coverage

This script extracts profiles for:

  1. AWS from ~/.aws/config
  2. Kubernetes from ~/.kube/config. If there are multiple clusters in the config, it splits out into different files and each profile utilises the extracted config. If you modify ~/.kube/config, you need to re-run this script.

F.A.Q.

My custom secret env var is not set.

You need to ‘login’ after you have opened your custom profile with Opt + a.

How can i store a simple secret in the keychain and use it ?

You can do that via the new command, for example

  1. germ add --name manos --export
  2. Enter secret:%

The export flag will create the secret value to be export MANOS=%s where %s is the value you typed.

If you want more complicated commands, you can ommit the --export flag and type the full text of your secret, for example

  1. export FOO=bar BAR=baz

My profile doesnt show in the list.

Make sure you have generated germ generate and written --write your profile and give iterm2
a couple of seconds to detect the changes and use the new profile definitions.

Custom rules

SmartSelectionRules

The user can define her own Smart selection rules in a file called ~/.germ.ssr.json. For example

cat ~/.germ.ssr.json

  1. [
  2. {
  3. "notes" : "jira ticket link",
  4. "precision" : "very_high",
  5. "regex" : "JENKINS-\\d*",
  6. "actions" : [
  7. {
  8. "title" : "Open Jenkins jira link",
  9. "action" : 1,
  10. "parameter" : "https://issues.jenkins-ci.org/browse/\\0"
  11. }
  12. ]
  13. },
  14. ]