'op signin' and '--shorthand'

zcutlip
zcutlip
Community Member

Can someone clarify how op signin --shorthand works?

The help says the shorthand is "device specific" and you can set it "the first time you sign in to an account."

  • Does this mean I can choose a shorthand for the account on my initial sign-in on each specific system/device, or...
  • Does it mean that I can only set the shorthand on my very first time signing into the account, ever?

When I try to do an initial sign-in using op, like:

op signin "https://<my-address>.1password.com" --shorthand foobar

I get:

[ERROR] 2020/06/05 12:27:19 You can only use --shorthand the first time you sign in.

Thanks!


1Password Version: op-cli 1.0.0
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • zcutlip
    zcutlip
    Community Member

    I guess I was doing initial sign-in wrong, leaving out my email address. I thought I got prompted for it in the past, but if do:

    op signin "https://<my-address>.1password.com" <my-email-address> --shorthand foobar
    

    It seems to work.

  • Hey @zcutlip, it sounds like you've found out a little bit more about the shorthand already in your second post, but I thought I would try to explain how the shorthand works a little.

    The shorthand must be unique. The default value is always the subdomain of your sign-in URL. For example, if you had accounts on my.1password.com and my.1password.eu, the shorthand would still default to my. If you had the domain mybusiness.1password.com then the shorthand would default to mybusiness. The shorthand for an account can be set for convenience or when you want to add multiple accounts belonging to the same sign-in address.

    Next, you can choose a shorthand when you first sign in to an account as you mentioned. If you sign in using op signin <url> <email> then later use op signin <url> <email> --shorthand <shorthand>, your account will be added twice to the CLI, once under the default shorthand and once under the shorthand that you specified.

    If you'd like to remove an account by its shorthand (for example if you have the same account under multiple shorthands), you can use op signout --forget --account <shorthand>.

    I hope that helps, but let us know if you have any questions!

  • zcutlip
    zcutlip
    Community Member

    I hope that helps, but let us know if you have any questions!

    Yes it does. Thanks!

  • You're very welcome! :chuffed:

This discussion has been closed.