> ## Documentation Index
> Fetch the complete documentation index at: https://www.1password.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 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:

```html yourscript.sh theme={null}
#!/usr/bin/env bash

doctl account get
```

To make the script run correctly, you can wrap the `doctl` command in [`op plugin run`](/cli/reference/management-commands/plugin/#plugin-run). For example:

```html yourscript.sh theme={null}
#!/usr/bin/env bash

op plugin run doctl account get
```

### If autocompletion stops working

If autocompletion stops working in Zsh after you configure a shell plugin, run the following command to configure completion for aliases:

```shell theme={null}
setopt completealiases
```

## 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:

```shell theme={null}
1Password CLI is outdated, please run:

	op update

to update 1Password CLI to the latest version and to be able to use
this Shell Plugin.
```

To update your 1Password CLI installation to the latest version:

```shell theme={null}
op update
```

Or [update 1Password CLI with a package manager](/cli/reference/update/#update-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:

```shell theme={null}
1Password Shell Plugin is out of date. Remove the plugin at
'/Users/<user>/.op/plugins/local/aws' or rebuild it with the
latest Shell Plugin SDK to use it.
```

To update to the latest shell plugins SDK, you'll need to merge the `main` branch of the [shell plugins repository](https://github.com/1Password/shell-plugins/tree/main/) into the branch for your plugin. To do this:

1. Navigate to the directory where you cloned the shell plugins repo:

   ```shell theme={null}
   cd <path/to/shell-plugins/repo>
   ```

2. If you've made any local changes to your plugin branch, commit or stash them:

   ```shell theme={null}
   git commit -am "<commit message>"
   ```

3. Check out the `main` branch:

   ```shell theme={null}
   git checkout main
   ```

4. Pull the `main` branch:

   ```shell theme={null}
   git pull main
   ```

5. Check out your plugin branch:

   ```shell theme={null}
   git checkout <your-plugin-branch>
   ```

6. Merge `main` into your branch:

   ```
   git merge main
   ```

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:

```shell theme={null}
make <your-plugin>/build
```

<Note>
  **Join our Developer Slack**

  If you're still having trouble, join our [Developer Slack workspace](/joinslack) and we'll help you figure out a solution.
</Note>

## Learn more

* [Uninstall shell plugins](/cli/shell-plugins/uninstall/)
* [Test shell plugins](/cli/shell-plugins/test/)
* [Use shell plugins to switch between multiple environments](/cli/shell-plugins/environments/)
* [Use shell plugins with multiple accounts](/cli/shell-plugins/multiple-accounts/)
