{"id":30896889,"url":"https://github.com/jpcaparas/rulesync","last_synced_at":"2025-09-08T23:47:27.164Z","repository":{"id":302998056,"uuid":"1014019147","full_name":"jpcaparas/rulesync","owner":"jpcaparas","description":"Easily sync all of your favourite AI assistant instruction files","archived":false,"fork":false,"pushed_at":"2025-07-05T23:36:35.000Z","size":32560,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-06T03:40:58.700Z","etag":null,"topics":["ai","claude-code","cline","codex","gemini-cli","rules","windsurf"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/jpcaparas/rulesync","language":"PHP","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/jpcaparas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2025-07-04T22:18:37.000Z","updated_at":"2025-07-17T17:13:39.000Z","dependencies_parsed_at":"2025-07-05T15:46:14.719Z","dependency_job_id":null,"html_url":"https://github.com/jpcaparas/rulesync","commit_stats":null,"previous_names":["jpcaparas/rulesync"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jpcaparas/rulesync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Frulesync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Frulesync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Frulesync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Frulesync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpcaparas","download_url":"https://codeload.github.com/jpcaparas/rulesync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcaparas%2Frulesync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231140,"owners_count":25245675,"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-09-08T02:00:09.813Z","response_time":121,"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":["ai","claude-code","cline","codex","gemini-cli","rules","windsurf"],"created_at":"2025-09-08T23:47:24.870Z","updated_at":"2025-09-08T23:47:27.146Z","avatar_url":"https://github.com/jpcaparas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rulesync\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/307c2333-d2a0-449d-a5a8-50919e66746d\" width=\"250\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/jpcaparas/rulesync/actions/workflows/tests.yml\"\u003e\n        \u003cimg src=\"https://github.com/jpcaparas/rulesync/actions/workflows/tests.yml/badge.svg\" alt=\"Tests\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/jpcaparas/rulesync\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/jpcaparas/rulesync/branch/main/graph/badge.svg\" alt=\"Coverage\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nEasily sync all of your favourite AI instruction files (e.g. `.cursorrules`, `copilot-instructions.md`, `GEMINI.md`, `CLAUDE.md`, `AGENTS.md`, `.clinerules/project.md`).\n\nhttps://github.com/user-attachments/assets/98604814-c0aa-450a-83a4-be522c1e4d72\n\n## Installation\n\n**Requirements:** PHP 8.2+ is required for all installation options.\n\nChoose the method that works best for your workflow:\n\n### Option 1: Standalone Executable (Recommended)\n\nDownload the pre-built executable - **no Composer required!**\n\n```bash\n# Download from GitHub releases\ncurl -L -o rulesync https://github.com/jpcaparas/rulesync/releases/latest/download/rulesync\nchmod +x rulesync\n./rulesync --help\n\n# Optional: Add to PATH for global access\nsudo mv rulesync /usr/local/bin/\nrulesync --help\n```\n\n### Option 2: Global Composer Binary\n\nInstall globally via Composer (adds to your `$PATH` automatically):\n\n```bash\ncomposer global require jpcaparas/rulesync\nrulesync --help\n```\n\n### Option 3: Development Dependency\n\nAdd to your project's development dependencies:\n\n```bash\ncomposer require --dev jpcaparas/rulesync\n./vendor/bin/rulesync --help\n```\n\n## Quick Start\n\n1. Create a `rulesync.md` file with your rules\n2. Run `rulesync generate` to create all AI assistant rule files\n3. Your rules are now synced across Claude, Cursor, Windsurf, Gemini CLI, GitHub Copilot, OpenAI Codex, Cline, and Junie!\n\n## Commands\n\n- `rulesync rules:list` - Show available AI assistants\n- `rulesync generate` - Generate rule files from rulesync.md\n- `rulesync gitignore:generate` - Add AI assistant rule files to .gitignore\n- `rulesync config` - View current configuration\n- `rulesync disable \u003cname\u003e` - Disable specific AI assistant\n- `rulesync enable \u003cname\u003e` - Enable specific AI assistant\n- `rulesync base \u003cpath\u003e` - Set base rules (URL or file path)\n\n## Supported AI Assistants\n\n- **Claude** → `CLAUDE.md`\n- **Cline** → `.clinerules/project.md`\n- **Cursor** → `.cursorrules`\n- **Gemini CLI** → `GEMINI.md`\n- **GitHub Copilot** → `.github/copilot-instructions.md`\n- **Junie** → `.junie/guidelines.md`\n- **OpenAI Codex** → `AGENTS.md`\n- **Windsurf** → `.windsurfrules`\n\n## FAQ\n\n### Rule Augmentation\n\n**Q: How does local and global rule augmentation work?**\n\nA: Rulesync automatically detects whether you're in a local project (with `composer.json`) or global context. When both local (`./rulesync.md`) and global (`~/.config/rulesync/rulesync.md`) rule files exist, the system prompts you to:\n- **Combine both files**: Local rules first, then global rules separated by `---`\n- **Use local only**: Ignore global rules entirely\n\nYour preference is saved for future `generate` calls, but can be changed anytime.\n\n**Q: Can I disable certain AI assistants?**\n\nA: Yes! Use these commands:\n- `rulesync disable \u003cname\u003e` - Disable specific AI assistant (e.g., `rulesync disable claude`)\n- `rulesync enable \u003cname\u003e` - Re-enable a disabled assistant\n- `rulesync rules:list` - View all assistants and their enabled/disabled status\n\nDisabled assistants won't have their rule files generated during `rulesync generate`.\n\n**Q: How does overwrite protection work?**\n\nA: By default, Rulesync protects existing rule files by:\n- Comparing content using MD5 hashing\n- Prompting for confirmation when files exist and differ\n- Skipping files that already have identical content\n\nYou can override this behaviour with:\n- `--overwrite` - Force overwrite existing files\n- `--force` - Skip all prompts and force generation\n\n**Q: Can I use base rules from external sources?**\n\nA: Yes! The base rules system allows you to:\n- Set base rules from URLs: `rulesync base https://example.com/rules.md`\n- Set base rules from local files: `rulesync base ./shared-rules.md`\n- Disable base rules: `rulesync base --disable`\n- View current base rules: `rulesync base`\n\nBase rules are appended to your final rule files after local/global augmentation.\n\n## Building Standalone Executable\n\nYou can build Rulesync as a standalone PHAR executable that doesn't require Composer on the target system (PHP 8.2+ is still required).\n\n### Prerequisites\n\nInstall Box globally:\n```bash\ncomposer global require humbug/box\n```\n\n### Build Commands\n\n**Basic build:**\n```bash\nphp rulesync build\n```\n\n**Build with specific version:**\n```bash\nphp rulesync build 1.0.0\n```\n\n**Create full release (with tests):**\n```bash\nphp rulesync release 1.0.0\n```\n\n**Build with verbose output (for debugging):**\n```bash\nphp rulesync build 1.0.0 --verbose\n```\n\n### Output\n\nThe standalone executable is created at `builds/rulesync` and includes all dependencies. You can distribute this single file without requiring users to install Composer or manage dependencies (PHP 8.2+ is still required).\n\n**Test the build:**\n```bash\n./builds/rulesync --version\n./builds/rulesync --help\n```\n\n### Notes\n\n- The version argument updates the version in `config/app.php` before building\n- Use `--verbose` flag to see detailed Box compilation output for debugging\n- The build process includes all dependencies (including dev dependencies) in the final PHAR\n- The `release` command runs tests, builds the PHAR, but no longer creates a tarball\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcaparas%2Frulesync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpcaparas%2Frulesync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcaparas%2Frulesync/lists"}