kasperhesthaven / checkly-cli

Checkly command-line interface.

Repository from Github https://github.comkasperhesthaven/checkly-cliRepository from Github https://github.comkasperhesthaven/checkly-cli

🚨 This project is still in very early stages and is not stable, use at your own risk! 🚨

checkly-cli

oclif Version Downloads/week

Table of Contents

Getting Started

This CLI enables a monitoring as code workflow where your checks live side-by-side with your code in your source control system.

To get started, install the CLI globally. You can also run it in an ad-hoc manner via npx every time.

  1. npm install -g @checkly/cli

Next, cd to a project you'd like to monitor with Checkly.

  1. cd /opt/checkly/checklyhq.com

You can now authenticate via the CLI and initialise the .checkly subdirectory.

  1. checkly login

  2. checkly init

The init command will walk you through a short wizard to get your project setup with an example check.

Now you should have a .checkly subdirectory in your project, which you should commit to source control, and a check yaml file like .checkly/checks/exammple-browser.yml.

After inspecting the check definition, making any changes, etc. you can deploy the local checks to our backend via deploy.

  1. checkly deploy

Your checks are now synced and running on checkly!

Checkout app.checklyhq.com to see your checks in the web application.

Usage

$ npm install -g @checkly/cli
$ checkly COMMAND
running command...
$ checkly (-v|--version|version)
@checkly/cli/0.0.2 darwin-x64 node-v14.17.3
$ checkly --help [COMMAND]
USAGE
  $ checkly COMMAND
...

Commands

checkly add RESOURCE

Add a new group or check file

USAGE
  $ checkly add RESOURCE

ARGUMENTS
  RESOURCE  (check|group) [default: check] What do you want to create?

See code: src/commands/add.js

checkly checks ACTION [ID]

Manage Checks

USAGE
  $ checkly checks ACTION [ID]

ARGUMENTS
  ACTION  (list|info) [default: list] Specify the type of checks action to run
  ID      Specify the checkId

OPTIONS
  -o, --output=plain|human|json  [default: json] output type

See code: src/commands/checks.js

checkly conf [KEY] [VALUE]

manage configuration

USAGE
  $ checkly conf [KEY] [VALUE]

ARGUMENTS
  KEY    key of the config
  VALUE  value of the config

OPTIONS
  -d, --cwd=cwd          config file location
  -d, --delete           delete?
  -h, --help             show CLI help
  -k, --key=key          key of the config
  -n, --name=name        config file name
  -p, --project=project  project name
  -v, --value=value      value of the config

See code: conf-cli

checkly deploy

Deploy and sync your ./checkly directory

USAGE
  $ checkly deploy

OPTIONS
  -o, --output=plain|human|json  [default: json] output type
  -x, --dryRun                   Do not actually write any changes

See code: src/commands/deploy.js

checkly groups ACTION [ID]

Manage Groups

USAGE
  $ checkly groups ACTION [ID]

ARGUMENTS
  ACTION  (list|info) [default: list] Specify the type of group action to run
  ID      Specify the groupId

OPTIONS
  -o, --output=plain|human|json  [default: json] output type

See code: src/commands/groups.js

checkly help [COMMAND]

display help for checkly

USAGE
  $ checkly help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

checkly init PROJECTNAME

Initialise a new Checkly Project

USAGE
  $ checkly init PROJECTNAME

ARGUMENTS
  PROJECTNAME  [default: checkly-cli] Project name

OPTIONS
  -f, --force=force  force mode

See code: src/commands/init.js

checkly login

Login with a Checkly API Key [WIP]

USAGE
  $ checkly login

OPTIONS
  --apiKey=apiKey  Checkly API Key.
                   If you did not have one, create it at: https://app.checklyhq.com/account/api-keys

See code: src/commands/login.js

checkly logout

Logout and clear local conf

USAGE
  $ checkly logout

See code: src/commands/logout.js

checkly projects

Manage Checks

USAGE
  $ checkly projects

OPTIONS
  -o, --output=text|json  [default: json] output type

See code: src/commands/projects.js

checkly run

Run and test your checks on Checkly

USAGE
  $ checkly run

OPTIONS
  -c, --checkName=checkName      (required) Check upon which to execute action
  -o, --output=plain|human|json  [default: json] output type

See code: src/commands/run.js

checkly status ACTION

Status dashboard

USAGE
  $ checkly status ACTION

ARGUMENTS
  ACTION  [default: info] Specify the type of checks action to run

OPTIONS
  -o, --output=plain|human|json  [default: json] output type

See code: src/commands/status.js

Troubleshooting

You can enable global debug output by setting the DEBUG=*.

For example:

DEBUG=* checkly init

Contributing

All contributions are welcome, please stick to the eslint and prettier settings.

License

Apache 2.0

About

Checkly command-line interface.

License:Apache License 2.0


Languages

Language:JavaScript 99.9%Language:Batchfile 0.1%