CircleCI config SDK
On This Page
Notice
The SDK is no longer maintained, supported, or monitored by CircleCI. It will be archived in the next 90 days. It can be forked for those that would like to continue using it.
This SDK is provided on an ‘as-is’ and ‘as available’ basis without any warranties of any kind. CircleCI disclaims all warranties, express or implied, including, but not limited to, all implied warranties of merchantability, title, fitness for a particular purpose, and noninfringement.
Overview
The CircleCI Config SDK is a JavaScript package library (also compatible with TypeScript) for generating a CircleCI YAML configuration file. Use the SDK to:
-
Replace writing YAML configuration files
-
Generate a static YAML configuration file
-
Modularize and manage your configuration as JavaScript packages
-
Enhance CircleCI’s dynamic configuration
-
Build integrations with CLI tools or browser-based experiences
For example, generating a static configuration file can be useful for CLI tools where you want to create a CircleCI configuration, or browser-based tooling, such as a visual config editor.
Components created with the CircleCI Config SDK can be packaged and distributed as Node packages.
Install the SDK
Install the CircleCI Config SDK with npm or Yarn, and include it in your project via Node.js or the browser.
npm installation:
$ npm i @circleci/circleci-config-sdk
Yarn installation:
yarn add @circleci/circleci-config-sdk
Use in Node.js
import CircleCI from '@circleci/circleci-config-sdk';
Use in the browser:
const CircleCI = require('@circleci/circleci-config-sdk');
Visit the SDK page to view a full example of generating a CircleCI configuration.
Contribute
The CircleCI Config SDK is open source, and contributions are welcome. Visit the contributing guide to view the guidelines and release process.