{"id":13821641,"url":"https://github.com/blimmer/zsh-aws-vault","last_synced_at":"2025-04-05T15:05:20.822Z","repository":{"id":27204128,"uuid":"112888343","full_name":"blimmer/zsh-aws-vault","owner":"blimmer","description":"oh-my-zsh plugin for aws-vault","archived":false,"fork":false,"pushed_at":"2024-12-13T17:51:00.000Z","size":39,"stargazers_count":90,"open_issues_count":2,"forks_count":25,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T14:06:27.636Z","etag":null,"topics":["aws-vault","oh-my-zsh","oh-my-zsh-plugin","prompt","zsh","zsh-plugin"],"latest_commit_sha":null,"homepage":null,"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/blimmer.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}},"created_at":"2017-12-03T00:29:29.000Z","updated_at":"2025-02-13T11:59:04.000Z","dependencies_parsed_at":"2024-11-24T19:05:34.993Z","dependency_job_id":"e771f43f-1883-4f0b-9b22-44ac171f723c","html_url":"https://github.com/blimmer/zsh-aws-vault","commit_stats":{"total_commits":32,"total_committers":16,"mean_commits":2.0,"dds":0.6875,"last_synced_commit":"2b3ae32f43d347c33510036c9cebbd540e392797"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fzsh-aws-vault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fzsh-aws-vault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fzsh-aws-vault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fzsh-aws-vault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blimmer","download_url":"https://codeload.github.com/blimmer/zsh-aws-vault/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353729,"owners_count":20925329,"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","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":["aws-vault","oh-my-zsh","oh-my-zsh-plugin","prompt","zsh","zsh-plugin"],"created_at":"2024-08-04T08:01:25.202Z","updated_at":"2025-04-05T15:05:20.799Z","avatar_url":"https://github.com/blimmer.png","language":"Shell","funding_links":[],"categories":["Plugins","Shell"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"readme":"# zsh-aws-vault\n\noh-my-zsh plugin for [aws-vault](https://github.com/99designs/aws-vault)\n\n## Installation\n\n### [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)\n\nThis plugin is intended to be used with oh-my-zsh\n\n1. `$ cd ~/.oh-my-zsh/custom/plugins` (you may have to create the folder)\n2. `$ git clone https://github.com/blimmer/zsh-aws-vault.git`\n3. In your .zshrc, add `zsh-aws-vault` to your oh-my-zsh plugins:\n\n```bash\nplugins=(\n  git\n  ruby\n  zsh-aws-vault\n)\n```\n\n### [zgen](https://github.com/tarjoilija/zgen)\n\n1. add `zgen load blimmer/zsh-aws-vault` to your '!saved/save' block\n1. `zgen update`\n\n## Features\n\nThis plugin is pretty simple - it provides:\n\n- aliases\n- prompt segment\n\n### Aliases\n\n| Alias         | Expression                                   |\n| ------------- | -------------------------------------------- |\n| av            | aws-vault                                    |\n| ave           | aws-vault exec                               |\n| avl           | aws-vault login                              |\n| avll          | aws-vault login -s                           |\n| [avli](#avli) | aws-vault login in sandboxed browser profile |\n| avs           | aws-vault server                             |\n| [avsh](#avsh) | aws-vault exec $1 -- zsh                     |\n| avp           | list aws config / role ARNs                  |\n| avr           | eval $(AWS_VAULT=  aws-vault export --format=export-env $AWS_VAULT) |\n\n### `avli`\n\nLogin in Private Browsing Window\n\n\u003e This alias is currently only supported in OSX and Linux.\n\nThis alias will create a sandboxed browser profile after getting the temporary login URL for your AWS profile. This\nallows opening multiple profiles simultaneously in different browser profiles. This differs from using incognito mode,\nwhich shares the same profile across all incognito windows.\n\nYou can specify a specific browser to handle your login URL by setting `AWS_VAULT_PL_BROWSER` to the bundle name of the\nbrowser. By default, it will pick your default URL handler in MacOS. It supports the following browsers:\n\n| `AWS_VAULT_PL_BROWSER` value          | Browser                   |\n| ------------------------------------- | ------------------------- |\n| `org.mozilla.firefox`                 | Firefox                   |\n| `org.mozilla.firefoxdeveloperedition` | Firefox Developer Edition |\n| `com.google.chrome`                   | Chrome                    |\n| `com.microsoft.edgemac`               | Edge                      |\n| `com.microsoft.edgemac.dev`           | Edge Developer Edition    |\n| `com.brave.Browser`                   | Brave                     |\n| `com.vivaldi.browser`                 | Vivaldi                   |\n\nYou can pass arbitrary parameters when launching the browser by setting the optional `AWS_VAULT_PL_BROWSER_LAUNCH_OPTS`\nenvironment variable. For example, if you wanted to start new `avli` browser windows maximized, you can set\n`AWS_VAULT_PL_BROWSER_LAUNCH_OPTS=\"--start-maximized\"`. Refer to your browser documentation for possible options.\n\n### `avsh`\n\nCreate a shell for a given profile.\n\nFor example, place the relevant `AWS` environment variables for your default profile by running:\n\n```bash\navsh default\n```\n\n### `avr`\n\nRefresh your credentials without exiting the existing subshell. Available when using aws-vault 7+.\n\n### Prompt Segment\n\nThis prompt segment echos out the current aws-vault profile you're logged into.\nI use this for adding a segment into my custom\n[agnoster theme](https://github.com/agnoster/agnoster-zsh-theme/blob/master/agnoster.zsh-theme).\n\nFor instance, this code:\n\n```bash\nprompt_aws_vault() {\n  local vault_segment\n  vault_segment=\"`prompt_aws_vault_segment`\"\n  [[ $vault_segment != '' ]] \u0026\u0026 prompt_segment cyan black \"$vault_segment\"\n}\n```\n\nProduces this segment in my prompt:\n\n![screenshot of agnoster theme with aws-vault segment](https://i.imgur.com/BLE0QXg.png)\n\nThe instructions to customize the prompt vary based on the [theme](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) you\nuse. In some cases, you'll need to create a copy of the theme file and edit it to include the prompt segment. You can\ncheck out my\n[custom agnoster theme](https://github.com/blimmer/dotfiles/blob/fa46a6818dcd92c2b7c1a578b32166542c4febca/oh-my-zsh-custom/themes/agnoster.zsh-theme#L232)\nto see how I updated the prompt.\n\n#### Prompt Customization\n\nYou can customize the prompt segment behavior by overriding these variables:\n\n| Variable Name                  | Default | Description                                                                 |\n| ------------------------------ | ------- | --------------------------------------------------------------------------- |\n| `AWS_VAULT_PL_CHAR`            | ☁       | The character to display when logged into an aws-vault profile              |\n| `AWS_VAULT_PL_DEFAULT_PROFILE` | default | Only show the character when logged into this profile, not the profile name |\n\n### Multi Factor Authentication (MFA)\n\nYou can override the default MFA prompt by adding the `AWS_VAULT_PL_MFA` environment variable.\n\n| `AWS_VAULT_PL_MFA` value | Description                                                                                                                                                                 | Example                                                                                                    |\n| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| inline                   | Enter your MFA token as an additional argument to the command.                                                                                                              | `avsh default 123456`\u003cbr\u003e`avli default 123456`                                                             |\n| yubikey                  | Generate an MFA token from your Yubikey. See the [docs](https://github.com/99designs/aws-vault/blob/master/USAGE.md#using-a-yubikey-as-a-virtual-mfa) for more information. | `avsh default`\u003cbr\u003e`avsh default my-yubikey-profile`\u003cbr\u003e`avli default`\u003cbr\u003e`avli default my-yubikey-profile` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblimmer%2Fzsh-aws-vault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblimmer%2Fzsh-aws-vault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblimmer%2Fzsh-aws-vault/lists"}