1Password Shell Plugins troubleshooting
Using shell plugins
If you're using a non-interactive shell
1Password Shell Plugins are built to be used with interactive shells. An interactive shell is required for the shell plugin to prompt for authentication.
If your script doesn't inherit shell plugin aliases
Scripts might not inherit your shell plugin aliases if they're run in a subshell where the plugins.sh
file isn't sourced. When this happens, the CLI command in the script will output an error instead of running correctly.
For example, the following script runs a doctl
command in a subshell, and as a result wouldn't inherit the doctl
shell plugin alias:
yourscript.sh
To make the script run correctly, you can wrap the doctl
command in op plugin run
. For example:
yourscript.sh
Contributing shell plugins
If your locally-built plugin stops working
If your locally-built plugin stops working, you might need to update your 1Password CLI version or rebuild your plugin with the latest shell plugins SDK.
Update your 1Password CLI installation
If you're using an outdated version of the CLI, you'll see this error message:
To update your 1Password CLI installation to the latest version:
Or update 1Password CLI with a package manager.
Rebuild your plugins with the latest shell plugins SDK
If the shell plugins SDK is outdated, you'll see this error message:
To update to the latest shell plugins SDK, you'll need to merge the main
branch of the shell plugins repository into the branch for your plugin. To do this:
-
Navigate to the directory where you cloned the shell plugins repo:
-
If you've made any local changes to your plugin branch, commit or stash them:
-
Check out the
main
branch: -
Pull the
main
branch: -
Check out your plugin branch:
-
Merge
main
into your branch:
Then fix any merge conflicts and make any needed changes to the plugin code to conform to the latest version of the SDK.
When you're ready to rebuild your plugin:
If you're still having trouble, join our Developer Slack workspace and we'll help you figure out a solution.