All Projects β†’ blimmer β†’ zsh-aws-vault

blimmer / zsh-aws-vault

Licence: MIT license
oh-my-zsh plugin for aws-vault

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to zsh-aws-vault

wakatime-zsh-plugin
πŸ•’Track how much time you have spent in your terminal!
Stars: ✭ 71 (+12.7%)
Mutual labels:  oh-my-zsh, zsh-plugin, oh-my-zsh-plugin
jira.plugin.zsh
CLI support for JIRA & Git interaction
Stars: ✭ 31 (-50.79%)
Mutual labels:  oh-my-zsh, zsh-plugin, oh-my-zsh-plugin
zsh-ipip
πŸ”© An oh-my-zsh plugin for IPIP
Stars: ✭ 13 (-79.37%)
Mutual labels:  oh-my-zsh, oh-my-zsh-plugin
zsh-ssh-agent
Ssh-agent management for zsh
Stars: ✭ 19 (-69.84%)
Mutual labels:  oh-my-zsh, zsh-plugin
autoupdate-oh-my-zsh-plugins
Plugin for oh-my-zsh to automatically update custom-plugins
Stars: ✭ 147 (+133.33%)
Mutual labels:  oh-my-zsh, oh-my-zsh-plugin
T-Header
Termux customization with your own name (termux-banner + custom PS1) and oh-my-zsh themes with plugins
Stars: ✭ 296 (+369.84%)
Mutual labels:  oh-my-zsh, oh-my-zsh-plugin
oh-my-fish
The Fish Shell Framework
Stars: ✭ 8,403 (+13238.1%)
Mutual labels:  oh-my-zsh, prompt
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-36.51%)
Mutual labels:  oh-my-zsh, zsh-plugin
Zsh Nvm
Zsh plugin for installing, updating and loading nvm
Stars: ✭ 1,670 (+2550.79%)
Mutual labels:  oh-my-zsh, zsh-plugin
History Sync
An oh-my-zsh plugin for GPG encrypted internet synchronised Zsh history, with Git.
Stars: ✭ 135 (+114.29%)
Mutual labels:  oh-my-zsh, zsh-plugin
git-prompt.zsh
A fast, customizable, pure-shell, asynchronous Git prompt for Zsh
Stars: ✭ 139 (+120.63%)
Mutual labels:  prompt, zsh-plugin
Spaceship Prompt
πŸš€β­ A Zsh prompt for Astronauts
Stars: ✭ 15,748 (+24896.83%)
Mutual labels:  oh-my-zsh, prompt
Fz
Cli shell plugin, the missing fuzzy tab completion feature of z jump around command.
Stars: ✭ 359 (+469.84%)
Mutual labels:  oh-my-zsh, zsh-plugin
Awesome Zsh Plugins
A collection of ZSH frameworks, plugins, themes and tutorials.
Stars: ✭ 10,129 (+15977.78%)
Mutual labels:  oh-my-zsh, zsh-plugin
Zsh Vi Mode
πŸ’» A better and friendly vi(vim) mode plugin for ZSH.
Stars: ✭ 181 (+187.3%)
Mutual labels:  oh-my-zsh, zsh-plugin
guri
A simple and fast Oh-My-Zsh theme
Stars: ✭ 19 (-69.84%)
Mutual labels:  oh-my-zsh, prompt
octofetch
Github user information on terminal :D
Stars: ✭ 65 (+3.17%)
Mutual labels:  prompt
purification
Very minimal Zsh prompt without any dependency
Stars: ✭ 25 (-60.32%)
Mutual labels:  prompt
Theme-Engine
Theme-Engine is usually made for modification & customization, so you can make trunks even more Colourful and better your Termux.
Stars: ✭ 31 (-50.79%)
Mutual labels:  zsh-plugin
careful rm
A safe wrapper for rm that adds useful warnings and an optional recycle/trash mode
Stars: ✭ 22 (-65.08%)
Mutual labels:  oh-my-zsh

zsh-aws-vault

oh-my-zsh plugin for aws-vault

Installation

oh-my-zsh

This plugin is intended to be used with oh-my-zsh

  1. $ cd ~/.oh-my-zsh/custom/plugins (you may have to create the folder)
  2. $ git clone https://github.com/blimmer/zsh-aws-vault.git
  3. In your .zshrc, add zsh-aws-vault to your oh-my-zsh plugins:
plugins=(
  git
  ruby
  zsh-aws-vault
)

zgen

  1. add zgen load blimmer/zsh-aws-vault to your '!saved/save' block
  2. zgen update

Features

This plugin is pretty simple - it provides:

  • aliases
  • prompt segment

Aliases

Alias Expression
av aws-vault
ave aws-vault exec
avl aws-vault login
avll aws-vault login -s
avli aws-vault login in private browsing window
avs aws-vault server
avsh aws-vault exec $1 -- zsh
avp list aws config / role ARNs

avli

Login in Private Browsing Window

This alias is currently only supported in OSX and Linux.

This alias will open a new browser window after getting the temporary login URL for your profile.

You can specify a specific browser to handle your login URL by setting AWS_VAULT_PL_BROWSER to the bundle name of the browser. By default, it will pick your default URL handler in MacOS. It supports the following browsers:

AWS_VAULT_PL_BROWSER value Browser Description
org.mozilla.firefox Firefox Creates and/or opens a profile with the same name as your aws-vault profile. This allows for multiple profiles to be open simultaneously.
org.mozilla.firefoxdeveloperedition Firefox Developer Edition Creates and/or opens a profile with the same name as your aws-vault profile. This allows for multiple profiles to be open simultaneously.
com.google.chrome Chrome Opens a new private browsing window for the session. This allows for multiple profiles to be open simultaneously.
com.brave.Browser Brave Opens a new private browsing window for the session. This allows for multiple profiles to be open simultaneously.
com.vivaldi.browser Vivaldi Opens a new private browsing window for the session. This allows for multiple profiles to be open simultaneously.

You can pass arbitrary parameters when launching the browser by setting the optional AWS_VAULT_PL_BROWSER_LAUNCH_OPTS environment variable. For example, if you wanted to start new avli browser windows maximized, you can set AWS_VAULT_PL_BROWSER_LAUNCH_OPTS="--start-maximized". Refer to your browser documentation for possible options.

avsh

Create a shell for a given profile.

For example, place the relevant AWS environment variables for your default profile by running:

avsh default

Prompt Segment

This prompt segment echos out the current aws-vault profile you're logged into. I use this for adding a segment into my custom agnoster theme.

For instance, this code:

prompt_aws_vault() {
  local vault_segment
  vault_segment="`prompt_aws_vault_segment`"
  [[ $vault_segment != '' ]] && prompt_segment cyan black "$vault_segment"
}

Produces this segment in my prompt:

screenshot of agnoster theme with aws-vault segment

The instructions to customize the prompt vary based on the theme you use. In some cases, you'll need to create a copy of the theme file and edit it to include the prompt segment. You can check out my custom agnoster theme to see how I updated the prompt.

Prompt Customization

You can customize the prompt segment behavior by overriding these variables:

Variable Name Default Description
AWS_VAULT_PL_CHAR ☁ The character to display when logged into an aws-vault profile
AWS_VAULT_PL_DEFAULT_PROFILE default Only show the character when logged into this profile, not the profile name

Multi Factor Authentication (MFA)

You can override the default MFA prompt by adding the AWS_VAULT_PL_MFA environment variable.

AWS_VAULT_PL_MFA value Description Example
inline Enter your MFA token as an additional argument to the command. avsh default 123456
avli default 123456
yubikey Generate an MFA token from your Yubikey. See the docs for more information. avsh default
avsh default my-yubikey-profile
avli default
avli default my-yubikey-profile
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].