CircleCI Ideas

CLI `config create` command for generating new project configs

I think it'll be useful to add a create subcommand to config that allows the user to create new configs from scratch. Here's examples of how this might be use:


circleci config create [flags]

--executor string Can be 'docker', 'machine', or 'macos'. Defaults to 'docker'.
--template string Path to a template file to be used when creating config.

I would image running `circleci config create` with defaults would:

1. Create the `./circleci` directory if it doesn't exists.
2. Create the file ./circleci/config.yml` if it doesn't exists.
3. Create a starting config like below:

version: 2.1
- build

- image: cibuilds/base:2018.10
- checkout
- run:
name: "First Step"
command: echo "Run a Bash command."

When adding a new project to CircleCI, the webapp shows a config (very verbose though) that the user could use for that project based on language. In addition to or instead of `--template`, we could have a language keyboard that pulls that same config for the user to use it as a staring point.


This idea was originally proposed here:

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Feb 12 2019
  • Taking votes
  • Attach files