Skip to content

Add 1Password formula wrappers for macOS and Linux#124

Merged
nsheaps merged 11 commits intomainfrom
claude/add-1password-install-7z2BD
Mar 24, 2026
Merged

Add 1Password formula wrappers for macOS and Linux#124
nsheaps merged 11 commits intomainfrom
claude/add-1password-install-7z2BD

Conversation

@nsheaps
Copy link
Copy Markdown
Owner

@nsheaps nsheaps commented Mar 22, 2026

Summary

This PR adds Homebrew formula wrappers for 1Password and 1Password CLI that delegate installation to native package managers (Homebrew casks on macOS, APT on Linux). These meta-formulas provide a unified installation experience across platforms while leveraging upstream package managers for actual software delivery.

Key Changes

  • New onepassword-cli formula: Meta-formula that installs 1Password CLI via brew cask on macOS or APT repository on Linux

    • Automatically sets up the official 1Password APT repository on Linux with GPG key verification
    • Configures debsig-verify policy for package signature verification
    • Provides platform-specific update instructions via caveats
  • New onepassword formula: Meta-formula for the main 1Password application

    • Depends on onepassword-cli to ensure CLI is available
    • Delegates to native package managers for installation
    • Reuses APT repository setup from the CLI dependency on Linux
  • Formula aliases: Added 1password and 1password-cli aliases pointing to their respective formula files for convenience

  • Updated op-exec dependency: Changed from generic 1password-cli to nsheaps/devsetup/onepassword-cli to reference the new formula

Implementation Details

  • Both formulas use a "trick" file to satisfy Homebrew's installation requirements while delegating actual package installation to post_install hooks
  • Linux setup includes comprehensive APT repository configuration with architecture detection (arm64/amd64)
  • GPG key and debsig-verify policy files are only downloaded/installed if not already present
  • Livecheck is disabled as upstream package managers handle version updates independently

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9

claude and others added 7 commits March 22, 2026 23:56
On macOS, installs the upstream Homebrew casks (1password, 1password-cli)
so that `brew upgrade --cask` continues to manage updates. On Linux,
configures the official 1Password APT repository and installs packages
via apt, preserving `apt upgrade` as the update path.

- Formula/onepassword-cli.rb: CLI tool, sets up APT repo on Linux
- Formula/onepassword.rb: desktop app, depends on onepassword-cli
- Aliases/1password and Aliases/1password-cli for numeric-prefixed names
- Updated op-exec.rb dependency to use the new formula

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
…ulas

- Align continuation lines to 2-space multiples instead of method-argument alignment
- Add 1Password/APT terms (onepassword, dearmor, debsig, keyrings, sourcelist, sourceparts) to cspell dictionary

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
Casks work on Linux, so the desktop app belongs as a cask that depends
on the upstream 1password and 1password-cli casks. The CLI formula
remains for Linux APT support (used by op-exec dependency).

- Move Formula/onepassword.rb -> Casks/onepassword.rb
- Update Aliases/1password symlink to point to cask

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
…p app

- macOS: depend on upstream 1password cask (automates the recommended
  1password.com download)
- Linux: install via APT (1Password's recommended method), reusing the
  APT repo configured by the onepassword-cli formula
- Remove CLI dependency from desktop cask (separate concern)

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
Configure rubocop to use fixed indentation (2-space) for multi-line
arguments and operations instead of alignment-based indentation, which
produces non-2-space-multiple offsets that editorconfig rejects.

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
@nsheaps nsheaps force-pushed the claude/add-1password-install-7z2BD branch from 0bd3866 to 49b8261 Compare March 23, 2026 03:56
claude and others added 4 commits March 23, 2026 03:58
Add Layout/LineEndStringConcatenationIndentation cop config to use
indented style (2-space) instead of aligned (which produces odd-numbered
indentation that editorconfig rejects). Restructure string continuations
to start the space on the continuation line to satisfy both linters.

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
- Rename EOS heredoc delimiters to CAVEAT (meaningful name)
- Break post_install and setup_apt_repo into smaller methods to
  stay under rubocop's 10-line method length limit

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
Break 13-line method into two sub-methods under 10 lines each.
Verified locally with rubocop: 0 offenses.

https://claude.ai/code/session_01BV8yJX7EgQGWUntp1PgDr9
@nsheaps nsheaps marked this pull request as ready for review March 24, 2026 18:34
@nsheaps nsheaps merged commit 127cff1 into main Mar 24, 2026
2 checks passed
@nsheaps nsheaps deleted the claude/add-1password-install-7z2BD branch March 24, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants