feat: first-run install prompt on bare failproofai#378
Conversation
PostHog showed only ~10% of npm-installed users ever ran
`failproofai policies --install` (470 unique installers → 48 over 90d).
The no-args dashboard launch now detects "zero hooks installed across any
detected CLI" and offers to run the existing interactive policy-selection
inline. Non-TTY falls through to the dashboard with a short hint.
- src/hooks/first-run-nudge.ts: opt-out via FAILPROOFAI_NO_FIRST_RUN=1,
walks every detected CLI/scope to skip if anything is already set up,
emits four PostHog events (first_run_nudge_{shown,accepted,declined,
skipped_noninteractive}) so the uplift is measurable.
- bin/failproofai.mjs: args.length === 0 guard before launch("start"),
try/catch-wrapped so the nudge cannot block the dashboard.
- scripts/postinstall.mjs: "Next steps" block for !configured &&
!registered (the brand-new-user case the existing printHooksWarning
doesn't cover).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reflect the new no-args behavior shipped in the previous commit. Quickstart in README and introduction.mdx call out that `failproofai policies --install` is now optional — running bare `failproofai` will offer to do it. Env-vars reference gets a new First-run prompt section for FAILPROOFAI_NO_FIRST_RUN. Chinese mirror (docs/zh/introduction.mdx) and the 14 translated env-vars files are intentionally left for the translation-sync PR pattern (see #371). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The rebase auto-merge for #376's Features entry left literal <<<<<<< markers around the two coexisting bullets. Both entries are valid; they're now side-by-side under 0.0.11-beta.2. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
Comment |
Summary
failproofai policies --install(~10% conversion, 89.7% drop-off). Median time-to-install when it does happen is ~4 min, so the funnel fails on awareness, not friction.failproofai(no-args) invocations: when no hooks are installed across any detected CLI, offer to run the existing interactive policy-selection inline. Covers all 7 supported CLIs (Claude Code, Codex, Copilot, Cursor, OpenCode, Pi, Gemini).FAILPROOFAI_NO_FIRST_RUN=1.!configured && !registered) that the existingprintHooksWarningdidn't cover.first_run_nudge_{shown,accepted,declined,skipped_noninteractive}. Funnel to query post-merge:package_installed → first_run_nudge_shown → first_run_nudge_accepted → hooks_installed.Files
src/hooks/first-run-nudge.ts,__tests__/hooks/first-run-nudge.test.ts,__tests__/scripts/postinstall.test.tsbin/failproofai.mjs(args.length===0 guard beforelaunch("start")),scripts/postinstall.mjs(Next steps block),README.md+docs/introduction.mdxquickstart snippets,docs/cli/environment-variables.mdx(new First-run prompt section),CHANGELOG.mdTest plan
bun run test:run— 1644/1644 pass (16 new)bunx tsc --noEmitcleanbun run lintclean (1 pre-existing unrelated warning)node bin/failproofai.mjs→ prompt appears;yrunsinstallHooksand exits 0;nfalls through to dashboardecho "" | node bin/failproofai.mjs→ 2-line hint then dashboardFAILPROOFAI_NO_FIRST_RUN=1 node bin/failproofai.mjs→ straight to dashboard, no prompt, no telemetryfailproofai policies --install, re-runfailproofai→ no promptpackage_installed → first_run_nudge_shown → first_run_nudge_accepted → hooks_installedconversion materially exceeds the current 10% baseline🤖 Generated with Claude Code