You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: clarify multi-recipient syntax for --emails flag on op item share #217
This is about the 1Password CLI reference docs, not op-js specifically. I filed it here because op-js is the closest public GitHub entry point for CLI feedback, that I could find, and it also affects how the wrapper handles the emails flag. If there's a better channel for CLI doc suggestions, feel free to redirect me. I'm also happy to post in the 1Password developer community, if that would be better.
Summary
The --emails flag on op item share doesn't document how to specify multiple email addresses. The CLI help text just says:
--emails strings Email addresses to share with.
And the CLI reference page says only "Email addresses to share with" with no usage example.
The strings type and plural name suggest it accepts multiple values, but the actual syntax isn't obvious and several reasonable guesses don't work.
What I tried
Comma-separated (doesn't work):
op item share "MyItem" --vault Private --emails "alice@example.com,bob@example.com"
[ERROR] 2026/03/10 14:22:08 "alice@example.com,bob@example.com" isn't a valid email address
Space-separated (doesn't work):
op item share "MyItem" --vault Private --emails "alice@example.com bob@example.com"
[ERROR] 2026/03/10 14:23:45 "alice@example.com bob@example.com" isn't a valid email address
Quoted list (doesn't work):
op item share "MyItem" --vault Private --emails 'alice@example.com, bob@example.com'
[ERROR] 2026/03/10 14:24:12 "alice@example.com, bob@example.com" isn't a valid email address
Repeating the flag (works):
op item share "MyItem" --vault Private --emails alice@example.com --emails bob@example.com
This is the only syntax that works, but nothing in the docs or help text points you toward it.
Proposed solution
Update the --emails flag description to show the working syntax. Something like:
--emails string -- Email address to restrict link access to. Repeat the flag to specify multiple recipients:
op item share "MyItem" --emails alice@example.com --emails bob@example.com
Possible op-js wrapper impact
The op-js wrapper types emails as string[] and joins arrays with commas (via parseFlagValue in cli.ts), which would produce --emails=a@example.com,b@example.com. If the CLI requires repeated flags instead of comma-separated values, the wrapper would need to handle this flag differently, repeating --emails for each array element instead of joining.
Activity