---
title: CKTool JS
framework: CKTool JS
role: collection
role_heading: Framework
platforms: [cktool js 1.2.15+]
path: cktooljs
---

# CKTool JS

Manage your CloudKit containers and databases from JavaScript.

## Overview

Overview CKTool JS gives you access to features provided in the CloudKit Console API, facilitating CloudKit setup operations for local development and integration testing. It’s a JavaScript client library alternative to the macOS cktool command-line utility distributed with Xcode. To learn more about cktool, see Automating CloudKit Development. With this library, you can: Apply a CloudKit schema file to Sandbox databases (for more information about CloudKit schema files, see Integrating a Text-Based Schema into Your Workflow). Populate databases with test data. Reset Sandbox databases to the production configuration. Write scripts for your integration tests to incorporate. The library consists of three main modules: CKToolDatabaseModule: This package contains all the CloudKit related types and methods, operations to fetch teams and containers for the authorized user, and utility functions and types to communicate with the CloudKit servers. This package also contains operations to work with CloudKit records. You include @apple/cktool.database as a dependency in your package.json file to access this package. CKToolNodeJsModule: This package contains a createConfiguration function you use in projects intended to run in Node.js. You include @apple/cktool.target.nodejs as a dependency in your package.json file to access this package. CKToolBrowserModule: This package contains a createConfiguration function for use in browser-based projects. You include @apple/cktool.target.browser as a dependency in your package.json file to access this package.

## Topics

### Essentials

- [Integrating CloudKit access into your JavaScript automation scripts](cktooljs/integrating-cloudkit-access-into-your-javascript-automation-scripts.md)

### Promises API

- [PromisesApi](cktooljs/promisesapi.md)
- [CancellablePromise](cktooljs/cancellablepromise.md)
- [CKToolDatabaseModule](cktooljs/cktooldatabasemodule.md)

### Configuration

- [Configuration](cktooljs/configuration.md)
- [CKToolNodeJsModule](cktooljs/cktoolnodejsmodule.md)
- [CKToolBrowserModule](cktooljs/cktoolbrowsermodule.md)

### Global Structures and Enumerations

- [Container](cktooljs/container.md)
- [ContainersResponse](cktooljs/containersresponse.md)
- [CKEnvironment](cktooljs/ckenvironment.md)
- [ContainersSortByField](cktooljs/containerssortbyfield.md)
- [SortDirection](cktooljs/sortdirection.md)

### Errors

- [ErrorBase](cktooljs/errorbase.md)
- [Database, Length, Validation, and Value Errors](cktooljs/database-length-validation-and-value-errors.md)

### Classes

- [Blob](cktooljs/blob.md)
- [File](cktooljs/file.md)
