|
22 | 22 |
|
23 | 23 | No more plaintext credentials in your home directory. Automatically authenticate every CLI you use with [1Password CLI](https://developer.1password.com/docs/cli/) + [Shell Plugins](https://developer.1password.com/docs/cli/shell-plugins/). Approve temporary credential usage in your terminal with biometrics. |
24 | 24 |
|
| 25 | +*By accessing or using 1Password Developer Tools, you agree to the [API and SDK Terms of Service](https://1password.com/legal/api-sdk-terms-of-service).* |
| 26 | + |
25 | 27 | ## 🪄 See it in action! |
26 | 28 | <p align="center"> |
27 | 29 | <picture> |
@@ -63,8 +65,54 @@ Still not sure where or how to begin? We're happy to help! You can: |
63 | 65 | - Book a free [pairing session](https://calendly.com/d/grs-x2h-pmb/1password-shell-plugins-pairing-session) with one of our developers |
64 | 66 | - Join the [Developer Slack workspace](https://developer.1password.com/joinslack), and ask us any questions there |
65 | 67 |
|
| 68 | +## Advanced Configuration |
| 69 | +### Managing shell plugins in your own dotfiles |
| 70 | + |
| 71 | +By default, `op plugin init` writes its configuration to `~/.config/op/plugins.sh` |
| 72 | +and manages that file for you. If you'd rather keep your plugin configuration in |
| 73 | +your own dotfiles (for example, tracked in version control), you can define the |
| 74 | +shell functions yourself and source them in your shell's configuration file. |
| 75 | + |
| 76 | +### Step 1: Define the plugin functions |
| 77 | +Shell functions for each shell should follow this pattern. In this case, |
| 78 | + |
| 79 | +### bash / zsh |
| 80 | + |
| 81 | +```bash |
| 82 | +gh() { |
| 83 | + op plugin run -- gh "$@" |
| 84 | +} |
| 85 | +``` |
| 86 | + |
| 87 | +### fish |
| 88 | + |
| 89 | +```fish |
| 90 | +function gh --wraps gh --description "1Password shell plugin for GitHub CLI" |
| 91 | + op plugin run -- gh $argv |
| 92 | +end |
| 93 | +``` |
| 94 | + |
| 95 | +### Step 2: Tell `op` your plugins are already configured |
| 96 | + |
| 97 | +Set `OP_PLUGIN_ALIASES_SOURCED=1` so 1Password CLI knows the shell plugins have |
| 98 | +already been set up: |
| 99 | + |
| 100 | +### bash / zsh |
| 101 | + |
| 102 | +```bash |
| 103 | +export OP_PLUGIN_ALIASES_SOURCED="1" |
| 104 | +``` |
| 105 | + |
| 106 | +### fish |
| 107 | +```fish |
| 108 | +set -x OP_PLUGIN_ALIASES_SOURCED 1 |
| 109 | +``` |
| 110 | + |
| 111 | +> **Note:** `op plugin init <plugin>` edits `~/.config/op/plugins.sh` directly and won't update your own dotfiles, so configure plugins manually as shown above. |
| 112 | +
|
| 113 | + |
66 | 114 | ## 💙 Community & Support |
67 | 115 |
|
68 | 116 | - File an [issue](https://github.com/1Password/shell-plugins/issues/new/choose) for bugs and feature requests |
69 | 117 | - Join the [Developer Slack workspace](https://developer.1password.com/joinslack) |
70 | | -- Subscribe to the [Developer Newsletter](https://1password.com/dev-subscribe/) |
| 118 | +- Subscribe to the [Developer Newsletter](https://1password.com/dev-subscribe/) |
0 commit comments