Skip to main content

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.

The ngrok shell plugin allows you to use 1Password to securely authenticate the ngrok CLI with your fingerprint, Apple Watch, or system authentication, rather than storing your credentials in plaintext. Follow the instructions to configure your default credentials and source the plugins.sh file, then you’ll be prompted to authenticate ngrok with biometrics.

Requirements

  1. Sign up for 1Password.
  2. Install and sign in to 1Password for Mac or Linux.
  3. Install 1Password CLI 2.14.0 or later.
  4. Integrate 1Password CLI with the 1Password app.
  5. Install the ngrok CLI .
The following shells are supported:
  • Bash
  • Zsh
  • Fish

Step 1: Configure your default credentials

Optional: Add an API key

The ngrok shell plugin sets up authentication for the following ngrok commands by default: http, service, start, tcp, tls, and tunnel. To configure authentication for the ngrok api command, add a custom field to your ngrok item titled API Key and save your ngrok API key there.

Step 2: Source the plugins.sh file

To make the plugin available, source your plugins.sh file. For example:

source ~/.config/op/plugins.sh

The file path for your op folder may vary depending on your configuration directory. op plugin init will output a source command with the correct file path.

If this is your first time installing a shell plugin, you’ll also need to add the source command to your RC file or shell profile to persist the plugin beyond the current terminal session. For example:

Step 3: Use the CLI

Step 4: Remove imported credentials from disk

After saving your ngrok credentials in 1Password, you can remove all local copies you previously had stored on disk. To find your ngrok configuration file location, run:
ngrok config check
To remove your credentials, run rm with the filepath for your configuration file. For example:
rm "~/Library/Application Support/ngrok/ngrok.yml"

Next steps

1Password Shell Plugins support more than 60 third-party CLIs. To see a list of supported CLIs:

op plugin list

To choose another plugin to get started with:

op plugin init

To use shell plugins for seamless context switching, learn how to configure a plugin in multiple environments or with multiple accounts.

Get help

Reference

If you’re using ngrok 3.2.1 or later, 1Password authenticates with ngrok by injecting environment variables with the credentials required by the plugin commands directly from your 1Password account. If you’re using an earlier version of ngrok, 1Password authenticates by injecting a temporary file with the appropriate credentials. If you saved your ngrok credentials in 1Password manually rather than using op plugin init to import a new item, make sure that your field names match the table below. If the item doesn’t contain a field with the required name, you’ll be prompted to rename one of the existing fields.
1Password field nameYAML config fieldEnvironment variable
Auth TokenauthtokenNGROK_AUTHTOKEN
API Keyapi_keyNGROK_API_KEY
Thanks to @arunsathiya for contributing this plugin! Learn how to build your own shell plugins.

Learn more