Skip to content

Add Homebrew tap distribution for ShellTime CLI#271

Merged
AnnatarHe merged 1 commit intomainfrom
claude/homebrew-tap-setup-Lw6rR
Apr 10, 2026
Merged

Add Homebrew tap distribution for ShellTime CLI#271
AnnatarHe merged 1 commit intomainfrom
claude/homebrew-tap-setup-Lw6rR

Conversation

@AnnatarHe
Copy link
Copy Markdown
Contributor

@AnnatarHe AnnatarHe commented Apr 10, 2026

Summary

This PR adds Homebrew tap distribution support to the ShellTime CLI release pipeline, enabling users to install ShellTime via Homebrew on macOS.

Key Changes

  • GoReleaser Configuration: Added Homebrew formula configuration to .goreleaser.yaml that:

    • Targets the shelltime/homebrew-tap repository
    • Includes both mt-common and mac build artifacts
    • Installs both shelltime and shelltime-daemon binaries
    • Provides setup instructions via caveats (init, auth, hooks, daemon installation)
    • Includes version verification test
  • GitHub Actions: Updated .github/workflows/release.yaml to pass the HOMEBREW_TAP_GITHUB_TOKEN secret to the release job, enabling automated formula updates to the Homebrew tap repository

Implementation Details

  • The Homebrew formula will be published to the Formula directory in the shelltime/homebrew-tap repository
  • Automated commits are made by shelltime-bot account
  • Post-installation caveats guide users through the initial setup process
  • The configuration uses environment variable substitution for the GitHub token to maintain security

https://claude.ai/code/session_01TwCfzkqy4jkzx6UaZjHdp6


Open with Devin

Add brews section to .goreleaser.yaml to auto-publish the Homebrew
formula to shelltime/homebrew-tap on each release. Pass
HOMEBREW_TAP_GITHUB_TOKEN in the release workflow.

https://claude.ai/code/session_01TwCfzkqy4jkzx6UaZjHdp6
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 40.08% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a Homebrew formula configuration to .goreleaser.yaml to automate the distribution of the ShellTime CLI and daemon. A critical issue was identified regarding the installation caveats: the current CLI logic for installing the daemon expects a specific local path that conflicts with Homebrew's standard installation locations, which will cause the recommended setup commands to fail for Homebrew users.

Comment thread .goreleaser.yaml
Comment on lines +160 to +169
caveats: |
To get started with ShellTime, run:
shelltime init

Or set up manually:
shelltime auth
shelltime hooks install
shelltime daemon install

For more info, visit https://shelltime.xyz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The shelltime init and shelltime daemon install commands mentioned in the caveats will fail for users who install via Homebrew.

The current implementation of commandDaemonInstall in commands/daemon.install.go (lines 54-58) explicitly checks for the daemon binary at ~/.shelltime/bin/shelltime-daemon. However, Homebrew installs binaries to the system PATH (e.g., /usr/local/bin or /opt/homebrew/bin).

When a Homebrew user runs these commands, they will receive an error message directing them to use the curl installation script, which defeats the purpose of the Homebrew distribution. You should update the CLI logic to look for shelltime-daemon in the system PATH as a fallback before checking the local directory.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment thread .goreleaser.yaml
Comment on lines +139 to +169
brews:
- name: shelltime
ids:
- mt-common
- mac
repository:
owner: shelltime
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Formula
homepage: "https://shelltime.xyz"
description: "Track and analyze your shell usage - ShellTime CLI"
license: "MIT"
commit_author:
name: shelltime-bot
email: bot@shelltime.xyz
install: |
bin.install "shelltime"
bin.install "shelltime-daemon"
test: |
system "#{bin}/shelltime", "--version"
caveats: |
To get started with ShellTime, run:
shelltime init

Or set up manually:
shelltime auth
shelltime hooks install
shelltime daemon install

For more info, visit https://shelltime.xyz
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 README not updated with Homebrew install method, violating AGENTS.md documentation rule

AGENTS.md mandates: "When command behavior, setup flow, config formats, or integrations change, update the docs in the same change." This PR adds Homebrew tap as a new installation method via .goreleaser.yaml but does not update README.md to mention it. The README Install section (README.md:10-14) only shows the curl method. Users discovering the tap would have no documentation of brew install shelltime/tap/shelltime as an install option.

Prompt for agents
AGENTS.md requires that when the setup flow changes, README.md must be updated in the same change. This PR adds a Homebrew tap (shelltime/homebrew-tap) via the new brews section in .goreleaser.yaml, but the Install section in README.md (around lines 10-14) only documents the curl-based install. Add a Homebrew install option to README.md, e.g.:

## Install

brew install shelltime/tap/shelltime

Or via curl:

curl -sSL https://shelltime.xyz/i | bash

Adjust the exact tap/formula name to match the repository owner (shelltime) and formula name (shelltime) configured in .goreleaser.yaml lines 140-147.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@AnnatarHe AnnatarHe merged commit 915c2ad into main Apr 10, 2026
7 checks passed
@AnnatarHe AnnatarHe deleted the claude/homebrew-tap-setup-Lw6rR branch April 10, 2026 02:09
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