Learn more about importing existing Checkly resources in the “Importing Existing Resources” guide.
checkly import
command imports existing resources from your Checkly account into your CLI-managed project. This allows you to bring existing checks, alert channels, and other resources under code management using a structured three-phase workflow.
Prerequisites
Prerequisites
Before using
checkly import
, ensure you have:- An initialized Checkly CLI project
- A Checkly account with existing resources to import
- Valid Checkly account authentication (run
npx checkly login
if needed)
Usage
Import all resources from your account into the current project.Terminal
Terminal
check
- Individual monitoring checkscheck-group
- Collections of related checksalert-channel
- Notification channelsmaintenance-window
- Scheduled maintenance periodsprivate-location
- Custom monitoring locationsdashboard
- Public status dashboardssnippet
- Reusable code snippetsstatus-page
- Status page configurationsstatus-page-service
- Status page service definitions
npx checkly import
starts an interactive process that generates an import plan, applies it to create Check files, and commits the changes to mark resources as managed by your CLI project.
Option | Description | |
---|---|---|
--config, -c | The Checkly CLI configuration file. If not passed, uses the `checkly.config.ts | js` file in the current directory. |
--root | The root folder in which to write generated code files. |
Command Options
Specify a particular configuration file to use instead of the default Examples:
checkly.config.ts
or checkly.config.js
.Usage:Terminal
Terminal
Preview generated code without creating an actual import plan.Usage:Examples:
Terminal
Terminal
Import Workflow
The import process follows a three-phase workflow for safe resource migration:1. Plan Generation
Analyze your account, generate an import plan and create code files for your resources.Terminal
2. Plan Application
Apply the generated plan and link the imported resources to your CLI project, but keeps the mapping in a pending state.Terminal
3. Plan Commitment
Commit the applied changes and mark resources as CLI-managed.Terminal
Subcommands
checkly import apply
Apply a previously generated import plan to create the actual code files in your project structure.
Terminal
checkly import commit
Commit an applied import plan to finalize the import and mark resources as managed by your CLI project.
Terminal
checkly import cancel
Cancel a generated plan that hasn’t been committed to discard any pending import operations.
Terminal
Best Practices
Before Importing
- Rely on version control and git to track changes
- Review your account resources to understand what will be imported
- Plan directory structure using
--root
if needed - Import specific resources using
resource-type:id
syntax
After Importing
- Review generated code for accuracy and style consistency
- Test imported checks using
checkly test
- Commit to version control to track changes
- Deploy to verify everything works as expected
Related Commands
checkly deploy
- Deploy imported resourcescheckly test
- Test imported checks locally