How to Open a Specific 1Password Item in the Desktop App from the CLI

2026-04-26 05:38 (2 hours ago)

How to Open a Specific 1Password Item in the Desktop App from the CLI

I wanted to open a specific 1Password item directly in the desktop app from the command line. While the onepassword:// URL scheme exists, the official documentation barely mentions how to format URLs that target individual items.

After some experimentation, I found that just rewriting the URL scheme of a private link lets you open the item directly in the desktop app, without going through a browser.

Steps

1. Copy the private link from 1Password

In the 1Password desktop app, right-click the item you want to open and choose "Copy Private Link".

You'll get a URL like this:

https://start.1password.com/open/i?a=ABCDEFGHIJKLMNOPQRSTUVWXYZ&v=ZYXWVUTSRQPONMLKJIHGFEDCBA&i=noagqauoq2qmya7tdiavvvslf4&h=my.1password.com

The parameters are:

  • a = account UUID
  • v = vault UUID
  • i = item UUID
  • h = hostname

2. Rewrite the prefix

Replace https://start.1password.com with onepassword:.

Before:

https://start.1password.com/open/i?a=...&v=...&i=...&h=...

After:

onepassword://open/i?a=...&v=...&i=...&h=...

3. Run with the open command

open 'onepassword://open/i?a=ABCDEFGHIJKLMNOPQRSTUVWXYZ&v=ZYXWVUTSRQPONMLKJIHGFEDCBA&i=noagqauoq2qmya7tdiavvvslf4&h=my.1password.com'

Wrap the URL in single quotes. Otherwise, the shell interprets & as a background-process operator.

The 1Password desktop app launches and shows the item directly. The browser doesn't open at all.

URL schemes that don't work

There's some incorrect information floating around online. Schemes like the following do not work:

# Doesn't work
open 'onepassword://view-item?i=noagqauoq2qmya7tdiavvvslf4'

There's no view-item path. The onepassword: protocol itself is valid, so the app may launch — but no specific item will be shown.

The correct format is onepassword://open/i?a=...&v=...&i=...&h=..., and all four parameters are required.

Why this works

According to comments from 1Password developers in their community forum, share links of the form https://start.1password.com/open/i?... are registered as URL handlers for the 1Password app. If the desktop app is installed, opening one of these HTTPS links triggers the app to display the item.

The catch is that the browser is invoked first along the way, which is what we want to avoid. Rewriting the prefix to onepassword:// skips the browser entirely and goes straight to the app.

Caveats

  • This isn't documented officially, so future versions of 1Password could change the behavior (though the share-link feature itself is stable).
  • This assumes you have the 1Password 8 desktop app installed on macOS.
  • Behavior may differ on iOS. This post focuses on macOS.

Summary

  1. Copy the private link
  2. Replace https://start.1password.com with onepassword:
  3. Run open '<URL>'

That's all it takes to launch a specific 1Password item from the CLI, directly into the desktop app. Combine this with a launcher like Alfred or Raycast and you've got a powerful workflow.

Please rate this article
Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Categories

Archive