checkly import
Import existing checks from Checkly UI to code.
Quick start
# Import all checks from your account
npx checkly import plan
# Review generated files
git diff
# Commit imported checks
git add .
git commit -m "Import existing monitoring checks"
How it works
- ✅ Connects to your Checkly account
- ✅ Fetches all existing checks
- ✅ Generates TypeScript/JavaScript code
- ✅ Creates directory structure
- ✅ Writes files to disk
Workflow
1. Prepare project
# Create new project if needed
npm create checkly@latest
cd my-monitoring-project
# Or use existing project
cd existing-project
npm install --save-dev checkly
2. Run import
npx checkly import plan
Output:
Importing checks from account "Acme Corp"...
Found 15 checks to import:
- 8 API checks
- 5 Browser checks
- 2 Heartbeat monitors
Generating files...
✓ __checks__/api-status.check.ts
✓ __checks__/homepage.spec.ts
✓ __checks__/login.spec.ts
...
Import complete! Next steps:
1. Review generated files
2. Test locally: npx checkly test
3. Commit to version control
3. Review imported code
# Review what was generated
git status
git diff
# Test imported checks
npx checkly test
4. Sync with UI
# Deploy to sync state
npx checkly deploy --force
Post-import workflow
Option 1: Keep UI and code in sync
# Deploy keeps checks updated from code
npx checkly deploy --force
Option 2: Disable UI management
After import, manage everything from code:
- Import existing checks
- Deploy from code
- Disable UI editing (Checkly account settings)
- All changes via code + CI/CD
Troubleshooting
Import conflicts
If you have existing check files:
# Backup existing
git commit -m "Backup before import"
# Import
npx checkly import plan
# Resolve conflicts manually
git diff
Missing dependencies
Generated code may reference packages:
npm install @playwright/test
Related Skills
- See
checkly-deployto deploy imported checks - See
checkly-testto validate imported checks