crispr is a CLI tool allowing to scaffold a project from a template with a .crispr.{toml,json} configuration file.

The template uses tokens that need to be replaced per scaffolded project, which are set in the configuration file as either user replaceable or with predetermined values.

crispr reads the configuration, asks the user for any needed values and makes the replacements as needed, showing a diff in the process.

crispr respects .gitignore files and only changes files that should be committed.

The .crispr.{toml,json} configuration file itself is automatically ignored when replacing tokens.

usage

Name

Named after the CRISPR-cas9 genetic engineering technique used for targeted gene editing

Supported Platforms

crispr is currently built for and tested on the following platforms:

Install

Homebrew

brew install yoav-lavi/tap/crispr

Binary

Binaries can be downloaded from the releases page

Usage

crispr [FLAGS] [PATH]

Arguments

Flags

Configuration File

crispr uses a TOML or JSON configuration file detailing the tokens to be replaced.

In case both file types are found, the priority is as follows:

Fields

Example

user_replacements = [
    "{{REPO_NAME}}"
]

[replacements]
"{{YEAR}}" = "2021"
{
  "replacements": {
    "{{YEAR}}": "2021"
  },
  "userReplacements": ["{{REPO_NAME}}"]
}

Limitations

Prior Art

Acknowledgements

crispr uses the following dependencies: