> ## Documentation Index
> Fetch the complete documentation index at: https://checklyhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Intallation

> Creating a CLI project from scratch

To kickstart a new project with the CLI, we recommend running `npx checkly init`. But you can also add the CLI
from scratch with the following steps.

## Prerequisites

* Node.js `20.19+` or `22.12+`.
* A text editor like [Visual Studio Code](https://code.visualstudio.com/).

## Installation

First, install the CLI.

```bash Terminal theme={null}
npm i --save-dev checkly
```

<Note>
  Built-in TypeScript support requires Checkly CLI `v8` or later. On earlier versions, also install a TypeScript loader with `npm install --save-dev jiti` (preferred) or `npm install --save-dev ts-node typescript`.
</Note>

Create a minimal `checkly.config.ts` (or `checkly.config.js`) at the root of your project. We recommend using TypeScript.

<Tabs>
  <Tab title="TypeScript">
    ```ts {title="checkly.config.ts"} theme={null}
    import { defineConfig } from 'checkly'
    import { Frequency } from 'checkly/constructs'

    export default defineConfig({
     projectName: 'Website Monitoring',
     logicalId: 'website-monitoring-1',
     repoUrl: 'https://github.com/acme/website',
     checks: {
       activated: true,
       muted: false,
       runtimeId: '2025.04',
       frequency: Frequency.EVERY_5M,
       locations: ['us-east-1', 'eu-central-1'],
       tags: ['website', 'api'],
       checkMatch: '**/__checks__/**/*.check.ts',
       ignoreDirectoriesMatch: [],
       browserChecks: {
         frequency: Frequency.EVERY_10M,
         testMatch: '**/__checks__/**/*.spec.ts',
       },
     },
     cli: {
       runLocation: 'eu-central-1',
     }
    })
    ```
  </Tab>

  <Tab title="JavaScript">
    ```js {title="checkly.config.js"} theme={null}
    const defineConfig = require('checkly')
    const { Frequency } = require('checkly/constructs')

    const config = {
     projectName: 'Website Monitoring',
     logicalId: 'website-monitoring-1',
     repoUrl: 'https://github.com/acme/website',
     checks: {
       activated: true,
       muted: false,
       runtimeId: '2025.04',
       frequency: Frequency.EVERY_5M,
       locations: ['us-east-1', 'eu-central-1'],
       tags: ['website', 'api'],
       checkMatch: '**/__checks__/**/*.check.js',
       ignoreDirectoriesMatch: [],
       browserChecks: {
         frequency: Frequency.EVERY_10M,
         testMatch: '**/__checks__/**/*.spec.js',
       },
     },
     cli: {
       runLocation: 'eu-central-1',
     }
    }

    module.exports = config;
    ```
  </Tab>
</Tabs>

Use the CLI to [authenticate](/cli/authentication) and pick a Checkly account. Make sure you have [signed up for a free account on checklyhq.com](https://www.checklyhq.com/)
before hand or just sign up for a new account straight from the terminal.

```bash Terminal theme={null}
npx checkly login
```

## Direct download

If you cannot access the npm registry directly, you can also download the Checkly CLI via our CDN.

* [MacOS / Darwin](https://cdn.checklyhq.com/downloads/checkly-cli/4.9.0/darwin/checkly-cli.zip)
* [Windows](https://cdn.checklyhq.com/downloads/checkly-cli/4.9.0/windows/checkly-cli.zip)
* [Linux](https://cdn.checklyhq.com/downloads/checkly-cli/4.9.0/linux/checkly-cli.tar.gz)

The download is a zipped folder containing a full installation of [the boilerplate example project](https://github.com/checkly/checkly-cli/tree/main/examples/boilerplate-project).
You will find the following files and folders:

* a `checkly.config.ts` file.
* a `package.json` file including the necessary Typescript dependencies.
* a `node_modules` directory with all dependencies pre-installed.
* a `__checks__` folder with some example checks.

<Note>
  If you want to move the CLI and its constructs to a different, already existing Node.js project, just copy the full contents
  of the `node_modules` folder to your project and manually add a `checkly.config.ts` file.
</Note>

## Using a Proxy Server

The CLI respects the common `HTTP_PROXY` environment variable for any outbound traffic, like running `npx checkly test`
or `npx checkly deploy`.

```bash Terminal theme={null}
HTTP_PROXY=https://proxy-url npx checkly test
```

The CLI communicates with the following domains if you need to allow-list them in your proxy:

* `api.checklyhq.com`
* `events.checklyhq.com`
