{"id":21861105,"url":"https://github.com/deecewan/circle-config-creator","last_synced_at":"2025-07-15T19:09:17.378Z","repository":{"id":94844851,"uuid":"137956678","full_name":"deecewan/circle-config-creator","owner":"deecewan","description":"🔘 Generate composable, shareable CircleCI configs","archived":false,"fork":false,"pushed_at":"2018-07-25T00:20:12.000Z","size":160,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T06:02:42.644Z","etag":null,"topics":["circleci","circleci2","config","config-management","javascript","javascript-library"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deecewan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-19T23:38:00.000Z","updated_at":"2021-07-06T14:06:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0459ad8-7711-4af0-97fc-54b850f874b8","html_url":"https://github.com/deecewan/circle-config-creator","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"0e59e2ff4dd619fc1a00b1c396fa3b06d18ff932"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/deecewan/circle-config-creator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fcircle-config-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fcircle-config-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fcircle-config-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fcircle-config-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deecewan","download_url":"https://codeload.github.com/deecewan/circle-config-creator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fcircle-config-creator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265453078,"owners_count":23768070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circleci","circleci2","config","config-management","javascript","javascript-library"],"created_at":"2024-11-28T03:09:55.381Z","updated_at":"2025-07-15T19:09:17.031Z","avatar_url":"https://github.com/deecewan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# circle-config-creator\n\n\u003e A simple helper to create CircleCI configs\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://yarnpkg.com/en/package/circle-config-creator\"\u003e\n    \u003cimg\n      alt=\"NPM Version\"\n      src=\"https://img.shields.io/npm/v/circle-config-creator.svg\"\n    \u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://circleci.com/gh/deecewan/workflows/circle-config-creator\"\u003e\n    \u003cimg\n      alt=\"CircleCI Build Status\"\n      src=\"https://img.shields.io/circleci/project/github/deecewan/circle-config-creator.svg\"\n    \u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\"\u003e\n    \u003cimg\n      alt=\"code style: prettier\"\n      src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg\"\n    \u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/acdlite/status/974390255393505280\"\u003e\n    \u003cimg\n      alt=\"Blazing Fast\"\n      src=\"https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg\"\n    \u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nI noticed that a lot of my CircleCI config was repetitive. I had written a small\nlib to help generate the config, but it got messy quickly. So I thought it\nthrough a little more and wrote a decent config generation tool. This is the\nresult of that.\n\nIt allows the generation of workflows and jobs for CircleCI 2.0, and the sharing\nof parts of config.\n\n## Installation\n\nThis lib is written in JS. I'd recommend adding it to your `devDependencies` so\nthat everyone on your team can use it.\n\n```\nyarn add -D circle-config-creator\n```\n\n## Usage\n\n- create a file to generate your config. I use `.circleci/config.js`.\n- create a `Config`, `Workflow` and `Job` to get started\n  - see [API](#api) for details\n\n```js\nimport Config, { Workflow, Job, executors } from 'circle-config-creator';\n\nconst buildContainer = new executors.Docker('circleci/node:latest');\nconst config = new Config();\n\nconst build = new Job('build')\n  .executor(buildContainer)\n  .checkout()\n  .run('./my-build-script.sh')\n  .saveCache('v1-repo-{{ .Revision }}', '~/project');\n\nconst test = new Job('test')\n  .executor(buildContainer)\n  .restoreCache('v1-repo-{{ .Revision }}')\n  .run({ command: './tests.sh', workingDirectory: '~/project/test' });\n\nconst workflow = new Workflow('build-and-test')\n  .job(build)\n  .job(test, [build]);\n\nconfig\n  .workflow(workflow)\n  .writeSync();\n\n```\n\n- Ensure you add `Config#write` or `Config#writeSync` to put your config into\n  `.circleci/config.yml`\n\n## API\n\nMethods are designed to build out configs in a chain. All chainable methods\nreturn a copy (operations are immutable).\n\n### Config\n\n`constructor() =\u003e Config`;\n\n\u003chr /\u003e\n\n```\nworkflow(workflow: Workflow) =\u003e Config\n```\n\nAdd a workflow to the config\n\n\u003chr /\u003e\n\n```\nlocation(directory: string) =\u003e Config\n```\n\n**Params**\n\n| Name      | Type   | Default    | Description                                                                                  |\n|-----------|--------|------------|----------------------------------------------------------------------------------------------|\n| directory | string | (required) | The project directory this config is for. Saves to `.circleci/config.yml` of that directory. |\n\nChange the location that the config will be saved to. This will *always* save to\nthe directory you pass in, in the `.circleci/config.yml` file.\nDefaults to `__dirname` (the current directory)\n\n\u003chr /\u003e\n\n```\ncompose() =\u003e Object\n```\n\nGenerate a JavaScript object based on the `Job`s and `Workflow`s added\n\n\u003chr /\u003e\n\n```\ndump() =\u003e string\n```\n\nGenerate `yaml` from the `Job`s and `Workflow`s added\n\n\u003chr /\u003e\n\n```\nwrite(disclaimer: boolean, callback: ?((?ErrnoError) =\u003e mixed)) =\u003e Promise\u003cvoid\u003e\n```\n\nWrite the config to `.circleci/config.yml`\n\n**Params**\n\n| Name       | Type                            | Default   | Description                                                                                  |\n|------------|---------------------------------|-----------|----------------------------------------------------------------------------------------------|\n| disclaimer | boolean                         | true      | Add a disclaimer to the top of the generated file, warning that changes will be overwritten. |\n| callback   | (optional) (?ErrnoError) =\u003e any | undefined | Node-style callback for write completion                                                     |\n\n\u003chr /\u003e\n\n```\nwriteSync(disclaimer: boolean) =\u003e void\n```\n\nWrite the config synchronously to `.circleci/config.yml`\n\n**Params**\n\n| Name       | Type                            | Default   | Description                                                                                  |\n|------------|---------------------------------|-----------|----------------------------------------------------------------------------------------------|\n| disclaimer | boolean                         | true      | Add a disclaimer to the top of the generated file, warning that changes will be overwritten. |\n\n### Workflow\n\n`constructor(name: string) =\u003e Workflow`\n\n\u003chr /\u003e\n\n```\njob(\n  job: Job,\n  requires: ?Array\u003cJob\u003e,\n  filter: ?Branches,\n  type: ?'approval', // Deprecated - use [Job](#job)#type\n  context: ?string,\n) =\u003e Workflow\n```\n\nAdd a job to this workflow\n\n**Params**\n\n| Name     | Type                             | Default    | Description                                                                         |\n|----------|----------------------------------|------------|-------------------------------------------------------------------------------------|\n| job      | [Job](#job)                      | (required) | The job to add to the workflow                                                      |\n| requires | (optional) Array\u003c[Job](#job)\u003e    | []         | Any jobs that this job requires                                                     |\n| filter   | (optional) [Branches](#branches) | undefined  | Filter the branches that this job runs for                                          |\n| type     | (optional) oneOf('approval')     | undefined  | The job type. See CircleCI config docs for more (Deprecated - use [Job](#job)#type) |\n| context  | (optional) string                | undefined  | The context of the job. See CircleCI config docs for more                           |\n\n\u003chr /\u003e\n\n```\nschedule(cron: string, filter: Branches) =\u003e Workflow\n```\n\nAdd a schedule to run this job against (see triggers on CircleCI docs)\n\n**Params**\n\n| Name   | Type                  | Default    | Description                               |\n|--------|-----------------------|------------|-------------------------------------------|\n| cron   | string                | (required) | The cron string to run this job on        |\n| filter | [Branches](#branches) | (required) | The branches to run this schedule against |\n\n### Job\n\n`constructor(name: string) =\u003e Job`\n\n\u003chr /\u003e\n\n```\nupdateName(name: string) =\u003e Job\n```\n\nUpdate the name of a job. Useful if you want to take an existing job and modify\nit slightly to create a new job from it.\n\n**Params**\n\n| Name | Type   | Default    | Description                  |\n|------|--------|------------|------------------------------|\n| name | string | (required) | The shell to run this job in |\n\n\u003chr /\u003e\n\n```\nshell(shell: string) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#jobs)\n\nChange the shell this job runs with\n\n**Params**\n\n| Name  | Type   | Default    | Description                  |\n|-------|--------|------------|------------------------------|\n| shell | string | (required) | The shell to run this job in |\n\n\u003chr /\u003e\n\n```\nworkingDirectory(directory: string) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#jobs)\n\n**Params**\n\n| Name      | Type   | Default    | Description                    |\n|-----------|--------|------------|--------------------------------|\n| directory | string | (required) | The directory this job runs in |\n\n\u003chr /\u003e\n\n```\nparallelism(p: number) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#parallelism)\n\n**Params**\n\n| Name | Type   | Default    | Description                   |\n|------|--------|------------|-------------------------------|\n| p    | number | (required) | The number to run in parallel |\n\n\u003chr /\u003e\n\n```\nexecutor(executor: Executor) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#docker--machine--macosexecutor)\n\nThe executor to run the job in. This *must* be set.\n\n**Params**\n\n| Name     | Type                  | Default    | Description                     |\n|----------|-----------------------|------------|---------------------------------|\n| executor | [Executor](#executor) | (required) | The executor to run this job in |\n\n\u003chr /\u003e\n\n```\nenvironment(environment: { [key: string]: string }) =\u003e Job\nenvironment(key: string, value: string) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#environment)\n\nThis will *append* to any environment you've already added. Callable multiple times.\n\n**Params**\n\n| Name        | Type                 | Default    | Description                                           |\n|-------------|----------------------|------------|-------------------------------------------------------|\n| environment | { [string]: string } | (required) | A map of environment variables to inject into the job |\n|             |                      |            |                                                       |\n| key         | string               | (required) | The environment key                                   |\n| value       | string               | (required) | The environment value                                 |\n\n\u003chr /\u003e\n\n```\nbranches(branches: Branches) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#branches)\n\nThe branch filter config to apply to this job. Note that this will apply at the\nworkflow level, not at the job level. [See CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#branches-1).\nYou can take advantage of immutability by settings branches on a job as you pass\nit in to the workflow. This was, you have one `Job`, and can set branches\ndifferently per-workflow.\n\n**Params**\n\n| Name     | Type                  | Default    | Description                                     |\n|----------|-----------------------|------------|-------------------------------------------------|\n| branches | [Branches](#branches) | (required) | The branch config for this job to run inside of |\n\n\u003chr /\u003e\n\n```\nresourceClass(resourceClass: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge') =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#resource_class)\n\n**Params**\n\n| Name          | Type   | Default    | Description                                 |\n|---------------|--------|------------|---------------------------------------------|\n| resourceClass | string | (required) | The resource class for this job's container |\n\n\u003chr /\u003e\n\n```\nrun(command: string) =\u003e Job\nrun(config: {\n  background?: boolean,\n  command: string,\n  environment?: { [string]: string },\n  name?: string,\n  noOutputTimeout?: string,\n  shell?: string,\n  when?: 'always' | 'on_success' | 'on_fail',\n  workingDirectory?: string,\n}) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#run)\n\nSee [the docs](https://circleci.com/docs/2.0/configuration-reference/#run) for\nthe param meanings\n\n\u003chr /\u003e\n\n```\ncheckout(path: ?string) =\u003e Job\n```\n\n[CircleCi Docs](https://circleci.com/docs/2.0/configuration-reference/#checkout)\n\n**Params**\n\n| Name | Type              | Default   | Description                      |\n|------|-------------------|-----------|----------------------------------|\n| path | (optional) string | ~/project | The path to checkout the code to |\n\n\u003chr /\u003e\n\n```\nsetupRemoteDocker(dockerLayerCaching: boolean = false) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#setup_remote_docker)\n\n**Params**\n\n| Name               | Type               | Default | Description                 |\n|--------------------|--------------------|---------|-----------------------------|\n| dockerLayerCaching | (optional) boolean | false   | Enable docker layer caching |\n\n\u003chr /\u003e\n\n```\nsaveCache(\n  key: string,\n  paths: string | Array\u003cstring\u003e,\n  name: string = 'Saving Cache',\n  when: 'always' | 'on_success' | 'on_fail' = 'on_success',\n) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#save_cache)\n\n**Params**\n\n| Name  | Type                                     | Default        | Description                                                            |\n|-------|------------------------------------------|----------------|------------------------------------------------------------------------|\n| key   | string                                   | (required)     | The key to save the cache to                                           |\n| paths | string | Array\u003cstring\u003e                   | (required)     | The path (or paths) to save to that cache key                          |\n| name  | string                                   | 'Saving Cache' | The message to display when this step is running                       |\n| when  | oneOf('always', 'on_success', 'on_fail') | 'on_success'   | When to save this cache. Defaults to saving when the job is successful |\n\n\u003chr /\u003e\n\n```\nrestoreCache(key: string | Array\u003cstring\u003e, name: string = 'Restoring Cache') =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#restore_cache)\n\n**Params**\n\n| Name | Type   | Default           | Description                                      |\n|------|--------|-------------------|--------------------------------------------------|\n| key  | string | (required)        | The keys to (attempt) to restore from            |\n| name | string | 'Restoring Cache' | The message to display when this step is running |\n\n\u003chr /\u003e\n\n```\nprogressiveRestoreCache(key: string, base: ?string) =\u003e Job\n```\n\n*Experimental*: This will likely not work for everyone's existing config. It\nworks for most of my use-cases, and it's super handy.\n\nIt makes use the CircleCI ability to fallback on caches. It takes the key you\npass in, and sets the `restoreCache` job with each key, falling back to `base` (\nwhich defaults to two chunks). It *only* splits on `-`s.\n\nExample: with a key of `v1-dependencies-{{ checksum \"yarn.lock\" }}`, this will\nresult in attempting to restore the cache in the following order:\n\n- `v1-dependencies-{{ checksum \"yarn.lock\" }}`\n- `v1-dependencies-`\n\nIf you have a different base, you can specify it. For example, calling\n\n```\njob.progressiveRestoreCache(\n  'v1-yarn-deps-{{ checksum \"yarn.lock\" }}-{{ .Revision }}',\n  'v1-yarn-deps'\n)\n```\n\nWill result in trying to restore the following\n\n- `v1-yarn-deps-{{ checksum \"yarn.lock\" }}-{{ .Revision }}`\n- `v1-yarn-deps-{{ checksum \"yarn.lock\" }}-`\n- `v1-yarn-deps-`\n\n**Params**\n\n| Name | Type              | Default        | Description                        |\n|------|-------------------|----------------|------------------------------------|\n| key  | string            | (required)     | The full key to try restoring from |\n| base | (optional) string | (see examples) | The base key of the cache          |\n\n\u003chr /\u003e\n\n```\ndeploy(command: string) =\u003e Job\ndeploy(config: {\n  background?: boolean,\n  command: string,\n  environment?: { [string]: string },\n  name?: string,\n  noOutputTimeout?: string,\n  shell?: string,\n  when?: 'always' | 'on_success' | 'on_fail',\n  workingDirectory?: string,\n}) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#deploy)\n\n[See Job#run](#run) and [the related CircleCI docs](https://circleci.com/docs/2.0/configuration-reference/#run)\nfor param information.\n\n\u003chr /\u003e\n\n```\nstoreArtifacts(path: string, destination: ?string) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#store_artifacts)\n\n**Params**\n\n| Name        | Type              | Default    | Description                                             |\n|-------------|-------------------|------------|---------------------------------------------------------|\n| path        | string            | (required) | The directory to save as build artifacts                |\n| destination | (optional) string | undefined  | Prefix added to the artifact paths in the artifacts API |\n\n\u003chr /\u003e\n\n```\nstoreTestResults(path: string) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#store_test_results)\n\n**Params**\n\n| Name | Type   | Default    | Description                  |\n|------|--------|------------|------------------------------|\n| path | string | (required) | The path to the test results |\n\n\u003chr /\u003e\n\n```\npersistToWorkspace(root: string, paths: string | Array\u003cstring\u003e) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#persist_to_workspace)\n\n**Params**\n\n| Name  | Type                   | Default    | Description                                                 |\n|-------|------------------------|------------|-------------------------------------------------------------|\n| root  | string                 | (required) | An absolute path or one relative to the `working_directory` |\n| paths | string | Array\u003cstring\u003e | (required) | Paths to add to the shared workspace                        |\n\n\u003chr /\u003e\n\n```\nattachWorkspace(at: string) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#attach_workspace)\n\n**Params**\n\n| Name | Type   | Default    | Description                              |\n|------|--------|------------|------------------------------------------|\n| at   | string | (required) | The directory to attach the workspace at |\n\n\u003chr /\u003e\n\n```\naddSSHKeys(fingerprints: ?(string | Array\u003cstring\u003e)) =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#add_ssh_keys)\n\n**Params**\n\n| Name         | Type                              | Default        | Description                                         |\n|--------------|-----------------------------------|----------------|-----------------------------------------------------|\n| fingerprints | (optional) string | Array\u003cstring\u003e | (all SSH keys) | the fingerprint (or fingerprints) to add to the job |\n\n\u003chr /\u003e\n\n```\ntype(type: 'approval') =\u003e Job\n```\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#type)\n\nThis is technically a configuration setting for a [Workflow](#workflow), but is\nused in the workflow config as a job. If you apply this setting to a job, it\nwill *not* appear in your Job list (so it makes no sense to give it any other\nconfiguration options). Jobs with a `type` of `approval` also do not need to\nhave an executor set.\n\nAt this point, there is only one `type` supported by CircleCI: `approval`.\n\n**Params**\n\n| Name | Type       | Default    | Description          |\n|------|------------|------------|----------------------|\n| type | 'approval' | (required) | The type for the job |\n\n### Executors\n\nExecutors are the environment in which your job will run. Every job must be\nassigned *exactly* one environment. The generator will throw an error if none\nare specified. If you try and set more than one, the second will overwrite the\nfirst.\n\nIt is likely a good idea to create your standard executor as a variable, and\npass the same one into all the jobs that need it.\n\nYou can access the executors in the following way:\n\n`import { executors } from 'circle-config-generator';`\n\n#### Docker\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#docker)\n\n`constructor(): Docker`\n\nThere is an alternative constructor, which is likely the one you'll use. It\naccepts an image string which is a convenient way to instantiate the executor if\nyou don't need multiple images to run together.\n\n`constructor(image: string) =\u003e Docker`\n\n\u003chr /\u003e\n\nThe remainder of the `Docker` API is adding an image, configuring that image,\nand finally calling `.done()` on the image to close it and add it to the Docker\nexecutor. You can add as many images as you like to the `Docker` container.\n\nTo add an image,\n\n```\nimage(image: string) =\u003e Image\n```\n\n**Params**\n\n| Name  | Type   | Default    | Description                             |\n|-------|--------|------------|-----------------------------------------|\n| image | string | (required) | The name of the docker image to be used |\n\n\u003chr /\u003e\n\n##### Image\n\nSee the non-required fields of the [CircleCI Docker\nDocs](https://circleci.com/docs/2.0/configuration-reference/#docker) for the\nmeanings of the fields\n\n```\nauth(auth: { username: string, password: string }) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\nawsAuth(auth: {\n  aws_access_key_id: string,\n  aws_secret_access_key: string,\n}) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\ncommand(...command: Array\u003cstring\u003e) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\nentrypoint(...entrypoint: Array\u003cstring\u003e) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\nenvironment(env: { [key: string]: string }) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\nname(name: string) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\nuser(user: string) =\u003e Image\n```\n\n\u003chr /\u003e\n\n```\ndone() =\u003e Docker\n```\n\nThis closes up the image and returns back the parent `Docker` container.\n\n#### Machine\n\nCreates the machine executor.\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#machine)\n\n`constructor(enabled: ?boolean) =\u003e Machine`\n\n**Params**\n\n| Name    | Type    | Default | Description             |\n|---------|---------|---------|-------------------------|\n| enabled | boolean | true    | Is the machine enabled? |\n\n\u003chr /\u003e\n\n```\nenabled(enabled: boolean) =\u003e Machine\n```\n\n**Params**\n\n| Name    | Type    | Default    | Description             |\n|---------|---------|------------|-------------------------|\n| enabled | boolean | (required) | Is the machine enabled? |\n\n\u003chr /\u003e\n\n```\nimage(image: string) =\u003e Machine\n```\n\n**Params**\n\n| Name  | Type   | Default    | Description                      |\n|-------|--------|------------|----------------------------------|\n| image | string | (required) | The image to use for the machine |\n\n\u003chr /\u003e\n\n```\ndockerLayerCaching(enabled: boolean) =\u003e Machine\n```\n\n**Params**\n\n| Name    | Type    | Default    | Description                                     |\n|---------|---------|------------|-------------------------------------------------|\n| enabled | boolean | (required) | Should this machine enable Docker layer caching |\n\n#### MacOS\n\nCreates a macOS executor.\n\n[CircleCI Docs](https://circleci.com/docs/2.0/configuration-reference/#macos)\n\n`constructor(version: string) =\u003e MacOS`\n\n**Params**\n\n| Name    | Type   | Default    | Description                                                                                                               |\n|---------|--------|------------|---------------------------------------------------------------------------------------------------------------------------|\n| version | string | (required) | Version of macOS to run - check [here](https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions) for full list |\n\n### Branches\n\nThis is used to set which branches a particular `Job` or `Workflow` will run on.\n\n`constructor() =\u003e Branches`\n\n\u003chr /\u003e\n\n```\nignore(...branches: Array\u003cstring\u003e) =\u003e Branches\n```\n\nSets branches that should be ignored by the Job or Trigger using this instance\n*Note:* Setting this will override any `Branches#only` branches that have been\nset.\n\n\u003chr /\u003e\n\n```\nonly(...branches: Array\u003cstring\u003e) =\u003e Branches\n```\n\nFilter down to only run on the branches passed in.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeecewan%2Fcircle-config-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeecewan%2Fcircle-config-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeecewan%2Fcircle-config-creator/lists"}