Some questions regarding 1Password CLI and winget

Options
Backspaze
Backspaze
Community Member

I've been using 1Password CLI since it's initial release and just now I figured I would check if there's some smoother way of managing updates of the application.

As of now, the steps for updating are 1) running op update 2) downloading the new update 3) unzipping the file 4) moving op.exe to C:\Program Files\1Password CLI 5) deleting the downloaded files and 6) running op update to verify the update. I want to cut that down to just run winget upgrade "1Password CLI".

In the installation instructions I see that it's available as a package through winget. I searched the forum and found some threads with feature requests for making the application available on winget, but the threads I looked at mentioned that it was on the roadmap and that packages that already were available on winget were community maintained. Is that still the case or is the package managed by 1Password now since that installation method is listed in the docs?

So far I've used the manual installation method for installing and updating the application. Can I "switch" to the winget package easily and will it just take over from my manual install, or are there any caveats to consider? For example, I have my own account and a service account configured to use the current 1Password CLI installation. The service account is used in conjunction with some scripts that run on a schedule. Will the accounts and scripts continue to work or will I have to configure everything from scratch again?

I could just try and see what happens, but as I thought it was somewhat of a hassle to get everything configured, I'd rather post a question here first.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided

Comments

  • Backspaze
    Backspaze
    Community Member
    Options

    As I didn't get any replies here, I contacted 1Password by email and got the following response:

    ...you should be able to switch to the package without issue. It should recognize the config files that are already set up. Also, if you have the desktop app already linked then it'll recognize that and you should be able to login easily without having to reset your environment.

    I ran the command winget install 1password-cli and it installed just fine and my scheduled scripts continues to work, so I can confirm that it was as easy as that to switch from manual installation to winget. This might be different if you've installed 1Password CLI with the manual method and placed the op.exe in another location than the default C:\Program Files\1Password CLI.

  • Backspaze
    Backspaze
    Community Member
    Options

    Small update on this.

    When installing 1Password CLI manually, I added the "install" folder C:\Program Files\1Password CLI to PATH for the entire system, while the installed winget package added its install folder, %LOCALAPPDATA%\Microsoft\WinGet\Packages\AgileBits.1Password.CLI_Microsoft.Winget.Source_8wekyb3d8bbwe, to the PATH for my user account. Thus when running any op command, I was still using the old manually installed op.exe.

    I noticed this today when I tried to update the winget installation and it said that it already was updated and running 2.23.0, while op --version showed 2.21.0. Removing C:\Program Files\1Password CLI from system PATH fixed this without needing a reboot. I've also removed the folder C:\Program Files\1Password CLI without any issues.

    Side note regarding updating through winget. There is a delay between when a new version is released for installing using the manual method and when it becomes available in winget. The latest version right now is 2.24.0 and it was released 2023-12-14 which is more than three weeks ago. I subscribe to the RSS feed for the releases and noticed that this kind of delay of 2 or more weeks has been consistent for the winget version and I'm guessing this is caused by some extra steps required, like validation, for publishing updates to winget.