{"id":51524883,"url":"https://github.com/dovahkiinyuzuko/gitignoresoc","last_synced_at":"2026-07-08T20:01:51.534Z","repository":{"id":368941730,"uuid":"1287216596","full_name":"DovahkiinYuzuko/gitignoreSoC","owner":"DovahkiinYuzuko","description":"[ENG]A CLI tool for separating concerns in .gitignore files, featuring automated merging and Git tracking cleanup. / [JPN].gitignoreファイルを分割管理し、自動結合とGit追跡のクリーンアップを行うCLIツールです。","archived":false,"fork":false,"pushed_at":"2026-07-02T21:40:14.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-02T23:24:50.991Z","etag":null,"topics":["cli","developer-tools","dotfiles","git","gitignore","l21m","nodejs","separation-of-concerns","whitelist"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/DovahkiinYuzuko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-02T13:37:45.000Z","updated_at":"2026-07-02T21:40:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DovahkiinYuzuko/gitignoreSoC","commit_stats":null,"previous_names":["dovahkiinyuzuko/gitignoresoc"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/DovahkiinYuzuko/gitignoreSoC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DovahkiinYuzuko%2FgitignoreSoC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DovahkiinYuzuko%2FgitignoreSoC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DovahkiinYuzuko%2FgitignoreSoC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DovahkiinYuzuko%2FgitignoreSoC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DovahkiinYuzuko","download_url":"https://codeload.github.com/DovahkiinYuzuko/gitignoreSoC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DovahkiinYuzuko%2FgitignoreSoC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35276781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"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","developer-tools","dotfiles","git","gitignore","l21m","nodejs","separation-of-concerns","whitelist"],"created_at":"2026-07-08T20:01:49.820Z","updated_at":"2026-07-08T20:01:51.526Z","avatar_url":"https://github.com/DovahkiinYuzuko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitignoreSoC\n\n`.gitignore`ファイルを分割管理し、自動結合とGit追跡のクリーンアップを行うCLIツールです。 / A CLI tool for separating concerns in `.gitignore` files, featuring automated merging and Git tracking cleanup.\n\n![Node.js](https://img.shields.io/badge/node-%3E%3D14.0.0-green?style=flat-square\u0026logo=node.js\u0026logoColor=white)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=flat-square\u0026logo=opensourceinitiative\u0026logoColor=white)](LICENSE)\n![JavaScript](https://img.shields.io/badge/language-JavaScript-yellow?style=flat-square\u0026logo=javascript\u0026logoColor=white)\n![Git](https://img.shields.io/badge/git-%23F05033?style=flat-square\u0026logo=git\u0026logoColor=white)\n\n[日本語](#日本語) | [English](#english)\n\n## 日本語\n\n\u003e [!NOTE]\n\u003e 本ツールは、`.gitignore`において一度すべてのファイルを対象外（`*`）にした上で、必要なファイルやフォルダのみを例外（`!`）として許可する「ホワイトリスト方式」で管理したいユーザー向けに設計されています。\n\n### 概要\ngitignoreSoC（コマンド名: `mushi`）は、1つのファイルに肥大化しがちな `.gitignore` の設定を、機能やディレクトリごとに分割して管理（関心の分離）するためのCLIツールです。また、`.gitignore` を更新した際に、すでにGitの追跡対象になってしまっているファイルが自動で反映されないという仕様上の問題を、インデックスの自動クリーンアップ機能によって解決します。\n\n### 特徴\n* **関心の分離（SoC）**: `.gitignores/` ディレクトリ配下に `{役割名}.gitignore` として設定を分割して配置することで、可読性と保守性を向上させます。サブディレクトリを作って階層的に整理することも可能です。\n* **Git追跡の自動クリーンアップ**: 新しいルールによって無視対象となった既存の追跡ファイルを `git check-ignore` で自動抽出し、インデックスから安全に除外（`git rm --cached`）します。\n* **安全な検証モード**: `--dry-run` オプションを使用することで、実際のファイル書き込みや追跡解除を行う前に、変更される差分と対象ファイルの一覧をコンソール上で事前に確認できます。\n* **競合防止のためのファイル命名**: 分割ファイルの拡張子を `{名前}.gitignore` とすることで、ルートのGitが意図しない挙動を起こすのを防ぎ、人間やAIにとっても役割が理解しやすくなります。\n\n### インストール方法\n以下のコマンドを実行し、グローバル環境にインストールしてください。\n```bash\nnpm install -g DovahkiinYuzuko/gitignoreSoC\n```\n\n### 使用方法\n\n#### 1. 初期化\nプロジェクトのルートディレクトリで以下のコマンドを実行します。\n```bash\nmushi init\n```\n`.gitignores/` ディレクトリが作成され、ルートにホワイトリスト方式のベースとなる `.gitignore` テンプレートが生成されます（既に `.gitignore` が存在する場合は上書きされません）。\n\n#### 2. 設定ファイルの分割配置\n`.gitignores/` ディレクトリ配下に、任意のファイル名で分割した設定ファイル（例: `src.gitignore`, `tests.gitignore`）を作成し、例外許可したいルールを記述します。\n\n#### 3. 事前確認（ドライラン）\n実際の変更を行う前に、以下のコマンドで適応される差分とクリーンアップ対象のファイルを確認できます。\n```bash\nmushi --dry-run\n```\n\n#### 4. 結合とクリーンアップの実行\nオプションなしでコマンドを実行すると、分割された設定がルートの `.gitignore` に自動結合され、同時に追跡のクリーンアップが実行されます。\n```bash\nmushi\n```\n\n#### 5. 分割ファイルの一覧表示\n現在 `.gitignores/` 配下に存在する設定ファイルの一覧と、それぞれの行数を確認できます。\n```bash\nmushi --list\n```\n\n#### 6. ヘルプの表示\n利用可能なコマンドとオプションの一覧を確認できます。\n```bash\nmushi --help\n```\n\n### LICENSE\nこのプロジェクトのライセンスはMITです。詳しくは[LICENSE](LICENSE)をお読みください。\n\n---\n\n## English\n\n\u003e [!NOTE]\n\u003e This tool is specifically designed for users who prefer to manage their `.gitignore` using a \"whitelist approach,\" where all files are ignored by default (`*`) and only specific files or folders are allowed as exceptions (`!`).\n\n### Overview\n`gitignoreSoC` (Command name: `mushi`) is a CLI tool designed to separate concerns in `.gitignore` configurations by dividing them into smaller, manageable files based on features or directories. It also solves a common Git limitation where newly added `.gitignore` rules do not automatically apply to files that are already being tracked, by providing an automated index cleanup feature.\n\n### Features\n* **Separation of Concerns (SoC)**: Enhances readability and maintainability by allowing you to split configurations into `{role}.gitignore` files under the `.gitignores/` directory. Fragment files can also be nested in subdirectories for further organization.\n* **Automated Git Tracking Cleanup**: Automatically identifies tracked files that should now be ignored under the new rules using `git check-ignore`, and safely removes them from the index (`git rm --cached`).\n* **Safe Verification Mode**: By using the `--dry-run` option, you can preview the changes to be made and the list of affected files in the console before any actual file writes or untracking occur.\n* **Conflict-Preventing Naming Convention**: Naming the fragment files as `{name}.gitignore` prevents the root Git repository from reacting unexpectedly to them, while remaining easily understandable for both humans and AI.\n\n### Installation\nRun the following command to install the tool globally:\n```bash\nnpm install -g DovahkiinYuzuko/gitignoreSoC\n```\n\n### Usage\n\n#### 1. Initialization\nRun the following command in your project's root directory:\n```bash\nmushi init\n```\nThis creates the `.gitignores/` directory and generates a base `.gitignore` template optimized for the whitelist approach at the root (existing `.gitignore` files will not be overwritten).\n\n#### 2. Creating Configuration Fragments\nCreate separated configuration files (e.g., `src.gitignore`, `tests.gitignore`) under the `.gitignores/` directory with arbitrary names, and describe the rules you want to allow as exceptions.\n\n#### 3. Previewing Changes (Dry-Run)\nBefore applying actual changes, you can verify the diffs and the files to be cleaned up by running:\n```bash\nmushi --dry-run\n```\n\n#### 4. Execution of Merge and Cleanup\nRunning the command without any options automatically merges the split configurations into the root `.gitignore` and executes the tracking cleanup simultaneously.\n```bash\nmushi\n```\n\n#### 5. Listing Configuration Fragments\nYou can display a list of the configuration files currently existing under `.gitignores/` along with their respective line counts by running:\n```bash\nmushi --list\n```\n\n#### 6. Displaying Help\nYou can view a list of available commands and options.\n```bash\nmushi --help\n```\n\n### LICENSE\nThis project is licensed under the MIT License. Please read the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdovahkiinyuzuko%2Fgitignoresoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdovahkiinyuzuko%2Fgitignoresoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdovahkiinyuzuko%2Fgitignoresoc/lists"}