feat(cli): add checkly init command with skill-first onboarding#1267
feat(cli): add checkly init command with skill-first onboarding#1267thebiglabasky merged 64 commits intomainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
MichaelHogers
left a comment
There was a problem hiding this comment.
LGTM
Looks quite alright, not a ton of time to look at details
| successMessage: vi.fn((msg: string) => `OK ${msg}`), | ||
| })) | ||
| vi.mock('prompts', () => ({ default: vi.fn() })) | ||
| vi.mock('fs', async importOriginal => { |
There was a problem hiding this comment.
critical to ensure we don't overwrite stuff during tests
| return [ | ||
| ...playwrightBlock(), | ||
| '', | ||
| chalk.cyan(` An AI agent can help configure this — run ${chalk.bold('npx checkly skills install')}`), |
There was a problem hiding this comment.
If I get the context correctly, this message isn't great. An "empty this" is never great and I'm unsure how npx checkly skills install helps directly. Shouldn't we be more explicit here?
There was a problem hiding this comment.
I need to re-review in context, but believe it might be related to some content above and as I refactored for reuse of messaging that made things look disconnected. But that likely can be improved, I agree 👍🏻
| "clean": "npm run clean:dist && npm run clean:gen", | ||
| "prepack": "npx oclif manifest", | ||
| "prepare:ai-context": "cross-env CHECKLY_SKIP_AUTH=1 CHECKLY_CLI_VERSION=99.0.0 ./bin/run import plan --root gen --debug-import-plan-input-file ./src/ai-context/context.fixtures.json && ts-node ./scripts/prepare-ai-context.ts", | ||
| "prepare:ai-context": "cross-env CHECKLY_SKIP_AUTH=1 CHECKLY_CLI_VERSION=99.0.0 ./bin/run import plan --root gen --debug-import-plan-input-file ./src/ai-context/context.fixtures.json && ts-node ./scripts/prepare-ai-context.ts && cp -r src/ai-context/onboarding-boilerplate dist/ai-context/onboarding-boilerplate && cp -r src/ai-context/onboarding-prompts dist/ai-context/onboarding-prompts", |
There was a problem hiding this comment.
Could we have the copy logic in prepare-ai-context? I think it already copies stuff around. :) Would also keep the package.json cleaner.
There was a problem hiding this comment.
I thought that was done already, as I had that remark before. Good catch, thanks!
stefanjudis
left a comment
There was a problem hiding this comment.
I've spent 30min reviewing the code. I'll play around with it to see how it feels and approve if everything feels great.
I now realized I was only seeing the inline comments. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… installation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mode hint - npx checkly init --target claude: installs skill non-interactively - CI mode now hints about skills install at the end - Examples in --help show --target and CI=true usage Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Stefan Judis <stefanjudis@gmail.com>
- Fix "AI-native Monitoring as Code" casing in skill install prompt - Add explanatory comment to url.check.ts for consistency with other boilerplate checks - Add direct URL to API keys page in initialize.md - Rename detectPM to detectPackageManager for clarity - Replace vague "this" with "Playwright checks" in playwrightHint message - Move onboarding asset cp commands from package.json into prepare-ai-context.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ge.json - Add skipUserAgent option to detectPackageManager — when invoked via npx, the user agent always reports npm regardless of the project's actual package manager. Lockfile/config detection is reliable. - Always add checkly and jiti to package.json before prompting for install. Previously, declining install left deps missing from package.json entirely, making a later manual install ineffective. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dividers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… init flow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…htHint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d existing flow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
878f0c4 to
217090c
Compare
|
🎉 Experimental release successfully published on npm |
2nd round✅ Going without AI This feels great!
Well done! This is great too!
I think we should sneak something into the PCS configure skill (or wherever). I could totally see how questions like this could cause confusion. Later on:
Yes, it doesn't understand that dependencies will be handled by Playwright in Checkly and tries to support that. We should def add some sentences. We also need to document somewhere that
I assume the branch is outdated? 🤔 Alright. I've run through the process twice and I think it feels great. @thebiglabasky Feel free to assign me a ticket with the PWT / PCS things I pointed out. Some sentences in the skills should probably do the trick. :) |
|
Thanks! |














Summary
Adds
npx checkly init— a new onboarding command that replacesnpm create checkly@latestwith a streamlined, AI-agent-aware flow. The skill installation is front and center: install the skill, get a tailored prompt copied to your clipboard, hand off to your agent.npm create checkly@latestnow shows a deprecation notice pointing tonpx checkly initnpx checkly(no args) nudges towardinitandskills installwhen no config is detected.mdfiles insrc/ai-context/onboarding-prompts/— easy to review and tweak without touching TypeScriptpbcopy/xclip/xsel/clip) with silent fallback — no external dependencySupported paths (all tested)
Reuses existing CLI utilities
findPlaywrightConfigPathfromservices/util.ts(extended with.mts/.mjs)defaultFilenamesfromcheckly-config-loader.tsdetectPackageManagerfor robust PM detection (lockfiles, config, runtime, user agent)promptForPlatformTargetshared betweenskills installandinitlogSymbolsvia sharedsuccessMessage()helperPLATFORM_TARGETS— skill directories derived from it to prevent driftPoints of attention for reviewers
messages.ts(shared blocks) andonboarding-prompts/*.md(agent prompts). Easy to change in one place.src/ai-context/onboarding-boilerplate/are excluded from tsconfig (not compiled) and vitest (not test files) — they're copied to dist at build time.npm create checklyreferences updated tonpx checkly init.Test plan
CLAUDECODE=1 npx checkly initnpx checklywith no config — should show nudgenpm create checkly@latest— should show deprecation noticenpx vitest run— 740+ tests pass🤖 Generated with Claude Code