{"id":13903074,"url":"https://github.com/yoav-lavi/crispr","last_synced_at":"2025-08-24T03:34:16.257Z","repository":{"id":38330263,"uuid":"338573986","full_name":"yoav-lavi/crispr","owner":"yoav-lavi","description":"A scaffolding CLI","archived":false,"fork":false,"pushed_at":"2022-06-17T01:45:37.000Z","size":208,"stargazers_count":30,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T04:24:09.991Z","etag":null,"topics":["cli","command-line","replace","rust","scaffold","template"],"latest_commit_sha":null,"homepage":"https://yoav-lavi.github.io/crispr/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoav-lavi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-13T12:51:19.000Z","updated_at":"2025-02-22T11:17:33.000Z","dependencies_parsed_at":"2022-08-25T03:53:36.879Z","dependency_job_id":null,"html_url":"https://github.com/yoav-lavi/crispr","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/yoav-lavi/crispr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fcrispr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fcrispr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fcrispr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fcrispr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoav-lavi","download_url":"https://codeload.github.com/yoav-lavi/crispr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fcrispr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271785997,"owners_count":24820579,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","command-line","replace","rust","scaffold","template"],"created_at":"2024-08-06T22:01:36.156Z","updated_at":"2025-08-24T03:34:16.228Z","avatar_url":"https://github.com/yoav-lavi.png","language":"Rust","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# CRISPR 🧬\n\n`crispr` is a CLI tool allowing to scaffold a project from a template with a `.crispr.{toml,json}` configuration file.\n\nThe template uses tokens that need to be replaced per scaffolded project (e.g. `{{REPO_NAME}}`), which are set in the configuration file as either user replaceable or with predetermined values.\n\n`crispr` reads the configuration, asks the user for any needed values and makes the replacements as needed, showing a diff in the process.\n\n`crispr` respects `.gitignore` files and only changes files that should be committed.\n\nThe `.crispr.{toml,json}` configuration file itself is automatically ignored when replacing tokens.\n\n![usage](https://github.com/yoav-lavi/crispr/raw/main/usage.png)\n\n## Name\n\nNamed after the [CRISPR-cas9](https://wikipedia.org/wiki/CRISPR_gene_editing) genetic engineering technique used for targeted gene editing\n\n## Supported Platforms\n\n`crispr` is currently built for and tested on the following platforms:\n\n- `x86_64-apple-darwin` (Intel macOS)\n\n## Install\n\n### Homebrew\n\n```sh\nbrew install yoav-lavi/tap/crispr\n```\n\n### Binary\n\nBinaries can be downloaded from the [releases page](https://github.com/yoav-lavi/crispr/releases)\n\n## Usage\n\n```sh\ncrispr [FLAGS] [PATH]\n```\n\n### Arguments\n\n- `\u003cPATH\u003e`    The path to run `crispr` (`'.'` by default)\n\n### Flags\n\n- `-c, --config`     The path to an alternative configuration file (`'.crispr.{toml,json}'` by default)\n\n- `-d, --dry`        Dry run - prints output without making changes\n\n- `-h, --help`       Prints help information\n\n- `-V, --version`    Prints version information\n\n## Configuration File\n\n`crispr` uses a TOML or JSON configuration file detailing the tokens to be replaced.\n\nIn case both file types are found, the priority is as follows:\n- `.crispr.toml`\n- `.crispr.json`\n\n### Fields\n\n- `replacements` - a map (`Option\u003cHashMap\u003cString, String\u003e\u003e`) of replacement tokens to values\n- `user_replacements` - an array (`Option\u003cVec\u003cString\u003e\u003e`) of replacements for which the user will be asked to supply a value\n\n### Example\n\n- `.crispr.toml`\n\n```toml\nuser_replacements = [\n    \"{{REPO_NAME}}\"\n]\n\n[replacements]\n\"{{YEAR}}\" = \"2021\"\n```\n\n- `.crispr.json`\n\n```json\n{\n  \"replacements\": {\n    \"{{YEAR}}\": \"2021\"\n  },\n  \"userReplacements\": [\"{{REPO_NAME}}\"]\n}\n```\n\n## Limitations\n\n- `crispr` reads files line-by-line, so a token broken into multiple lines (e.g. by formatting) will not be replaced\n\n## Prior Art\n\n- `crispr` takes some inspiration and ideas from [Ruplacer](https://github.com/TankerHQ/ruplacer) but does not intend to replace (pun may be intended) Ruplacer as the use case and goal are different.\n\n## Acknowledgements\n\n`crispr` uses the following dependencies:\n\n- [`clap`](https://github.com/clap-rs/clap) (Apache 2.0)\n- [`difference`](https://github.com/johannhof/difference.rs) (MIT)\n- [`colored`](https://github.com/mackwic/colored) (MPL)\n- [`ignore`](https://github.com/BurntSushi/ripgrep/tree/master/crates/ignore) (MIT)\n- [`serde`](https://github.com/serde-rs/serde) (Apache 2.0)\n- [`serde_json`](https://github.com/serde-rs/json) (Apache 2.0)\n- [`toml`](https://github.com/alexcrichton/toml-rs) (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoav-lavi%2Fcrispr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoav-lavi%2Fcrispr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoav-lavi%2Fcrispr/lists"}