{"id":43700855,"url":"https://github.com/xarunoba/ccoco","last_synced_at":"2026-02-05T05:05:28.460Z","repository":{"id":240760598,"uuid":"803371424","full_name":"xarunoba/ccoco","owner":"xarunoba","description":"🥥 — Change configurations on checkout","archived":false,"fork":false,"pushed_at":"2025-12-04T05:16:41.000Z","size":259,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T16:50:16.967Z","etag":null,"topics":["ccoco","cli","config-changer","developer-experience","git","nodejs","post-checkout"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/xarunoba/ccoco","language":"Go","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/xarunoba.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["xarunoba"]}},"created_at":"2024-05-20T15:39:55.000Z","updated_at":"2025-05-28T19:02:07.000Z","dependencies_parsed_at":"2024-05-20T19:56:40.924Z","dependency_job_id":"09051570-8a4f-4fe1-b986-f0f2dfcfd83f","html_url":"https://github.com/xarunoba/ccoco","commit_stats":null,"previous_names":["xarunoba/ccoco"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/xarunoba/ccoco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarunoba%2Fccoco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarunoba%2Fccoco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarunoba%2Fccoco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarunoba%2Fccoco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xarunoba","download_url":"https://codeload.github.com/xarunoba/ccoco/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarunoba%2Fccoco/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29113190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ccoco","cli","config-changer","developer-experience","git","nodejs","post-checkout"],"created_at":"2026-02-05T05:05:27.487Z","updated_at":"2026-02-05T05:05:28.447Z","avatar_url":"https://github.com/xarunoba.png","language":"Go","funding_links":["https://github.com/sponsors/xarunoba"],"categories":[],"sub_categories":[],"readme":"# @xarunoba/ccoco 🥥\n\n![Static Badge](https://img.shields.io/badge/Made_with-%E2%9D%A4%EF%B8%8F-red?style=for-the-badge) [![License](https://img.shields.io/npm/l/%40xarunoba%2Fccoco?style=for-the-badge)](https://github.com/xarunoba/ccoco?tab=MIT-1-ov-file#readme)\n[![NPM Version](https://img.shields.io/npm/v/%40xarunoba%2Fccoco?style=for-the-badge\u0026logo=npm)](https://www.npmjs.com/package/@xarunoba/ccoco?activeTab=readme)\n\n**`ccoco`** — change config on checkout\n\nChange your configurations on checkout for easy config environment change. Integrate with git hooks.\n\n\u003e [!WARNING]\n\u003e **`ccoco` is currently in experimental mode. Every release might have breaking changes before `v1.0.0`. Make sure to specify the version you'd like to use.**\n\n## Why\n\nMy team didn't want to populate the `package.json` too much with scripts so I created a tool that can easily replace the main config files whenever a branch changed.\n`ccoco` initially started as a tool specifically used for the Node.js ecosystem but has been rewritten to Go for platform independence. You can use `ccoco` for any kinds of projects as long as it is within a Git repository.\n\n## Installation\n\n### Download Binary\n\nDownload from the Release page, add it to your PATH, and then initialize `ccoco` in your project directory.\n\n### Go Install\n\n```bash\ngo install github.com/xarunoba/ccoco@latest\n```\n\n### npm/pnpm/yarn\n\nYou can install `ccoco` from the `npmjs` repository.\n\n```bash\nnpm install -D @xarunoba/ccoco\npnpm add -D @xarunoba/ccoco\nyarn add -D @xarunoba/ccoco\n\nnpx ccoco\npnpm ccoco\nyarn ccoco\n```\n\nThere's also an extra alias for `ccoco` for `npm/pnpm/yarn` where instead of `npx ccoco` you can simply do `npx cc`.\n\n### .gitignore\n\nPlease add `.ccoco` in your `.gitignore` file.\n\n## Usage\n\nInitialize `ccoco`\n\n```bash\nccoco init\n# or use alias: ccoco i\n```\n\nAdd file/s to `ccoco.config.json`\n\n```bash\nccoco add file1 file2 ...\n# ccoco add myconfiguration.yml another.json\n# or use alias: ccoco a\n```\n\nRemove file/s from `ccoco.config.json`\n\n```bash\nccoco remove file1 file2 ...\n# ccoco remove myconfiguration.yml another.json\n# or use alias: ccoco rm\n```\n\nGenerate per-branch config files based on your current repository's list of branches and the files mentioned in `ccoco.config.json`\n\n```bash\nccoco generate\n# or use alias: ccoco gen\n```\n\nInject `ccoco` in your `post-checkout` git hook.\n\n```bash\nccoco githook\n# or use alias: ccoco gh\n```\n\nManually run ccoco when not using the git hook injection OR when you want to integrate it with a git hook manager.\n\n```bash\nccoco run\n# or use alias: ccoco r\n# or use alias: ccoco start\n```\n\n### Using sub-branches\n\n`ccoco` will recursively check if a sub-branch has a config file until it reaches the \"root\" of the sub-branch.\n\n#### Example\n\n1. Branch `nested/one/two` does not have a config file created.\n2. `ccoco` will recursively check for the config file existing in `nested/one` up until the root `nested` and will fail if it cannot find one.\n\n## Configuring `ccoco`\n\n`ccoco` can be configured via `ccoco.config.json`\n\n```json\n{\n  \"files\": [\".env\"] // the file that will be generated by ccoco generate\n}\n```\n\n### Preflights\n\nYou can set your preflight scripts in the `.ccoco/preflights` directory. These scripts will execute before `ccoco`.\n\n\u003e This will only run when you have injected `ccoco` via the `ccoco githook` command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarunoba%2Fccoco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxarunoba%2Fccoco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarunoba%2Fccoco/lists"}