Skip to content

Got rid of forced tutorial and added auto opt in for CLI analytics#370

Merged
rvvance merged 5 commits intomainfrom
refactor/optout-tutorial-and-analytics
Apr 30, 2026
Merged

Got rid of forced tutorial and added auto opt in for CLI analytics#370
rvvance merged 5 commits intomainfrom
refactor/optout-tutorial-and-analytics

Conversation

@rvvance
Copy link
Copy Markdown
Contributor

@rvvance rvvance commented Apr 27, 2026

  • Removes forced tutorial, agent-skill, and analytics prompts; scripted use of brev no longer blocks on interactive dialogs.
  • Switches analytics from opt-in to opt-out; adds brev analytics on/off and honors DO_NOT_TRACK=1 / BREV_NO_ANALYTICS=1. Explicit opt-outs are preserved across upgrade.
  • New non-blocking hint points fresh users at brev hello; Quick Start now shows at the top of brev --help
  • also edited the agent skill to install for codex instead of just claude

@rvvance rvvance requested a review from a team as a code owner April 27, 2026 23:56
@patelspratik
Copy link
Copy Markdown
Contributor

some Claude feedback that seems worth doing

  • Likely orphaned hello helpers. With ls.go and cmd.go's onboarding hooks gone, hello.ShouldWeRunOnboardingLSStep, hello.Step1, possibly hello.CanWeOnboard are unreferenced. Worth a grep -r and removal here or in a follow-up.
    • No tests. The env-var override matrix for IsAnalyticsEnabled() and IsDisabledByEnv() is pure logic and worth at least one unit test given the policy stakes.
  • IdentifyUser missing the remote kill gate. captureEvent checks both IsAnalyticsEnabled() and IsAnalyticsFeatureEnabled(); IdentifyUser only checks the first. If posthog remote-kill is flipped off in an incident, command events stop but Alias calls keep firing. Add the second gate (or factor a shared helper).
  • TrackEvent (/api/brevent) only honors IsAnalyticsEnabled, not IsAnalyticsFeatureEnabled. That's likely intentional (different telemetry channel), but the new doc-comment on IsAnalyticsFeatureEnabled reads "remote kill switch for CLI telemetry" which implies it kills all telemetry. Either narrow the comment to "posthog only" or extend the gate to TrackEvent.

Comment thread pkg/cmd/cmd.go
},
PersistentPostRunE: func(cmd *cobra.Command, args []string) error {
analytics.CaptureCommand(analytics.GetOrCreateAnalyticsID(), cmd, args)
analytics.CaptureCommand("", cmd, args)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we drop this id here I think un-intentionally

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's intentional. Passing "" here is the fix for a privacy bug. The old analytics.GetOrCreateAnalyticsID() call always wrote a UUID to ~/.brev/personal_settings.json if one didn't exist, even for users who had opted out of analytics.

@rvvance rvvance merged commit 8e255d8 into main Apr 30, 2026
9 checks passed
@rvvance rvvance deleted the refactor/optout-tutorial-and-analytics branch April 30, 2026 19:03
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.

4 participants