{"id":35837052,"url":"https://github.com/adxmcollins/rulekeeper","last_synced_at":"2026-01-13T21:00:05.604Z","repository":{"id":332036947,"uuid":"1129706698","full_name":"adxmcollins/rulekeeper","owner":"adxmcollins","description":"A cross-platform CLI for syncing and managing Claude Code rules across multiple projects","archived":false,"fork":false,"pushed_at":"2026-01-09T15:50:10.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T14:36:07.844Z","etag":null,"topics":["claude","claude-code","claudecode","claudecode-config","cli"],"latest_commit_sha":null,"homepage":"https://rulekeeper.dev","language":"TypeScript","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/adxmcollins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-01-07T13:21:10.000Z","updated_at":"2026-01-09T15:50:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/adxmcollins/rulekeeper","commit_stats":null,"previous_names":["adxmcollins/rulekeeper"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/adxmcollins/rulekeeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxmcollins%2Frulekeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxmcollins%2Frulekeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxmcollins%2Frulekeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxmcollins%2Frulekeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adxmcollins","download_url":"https://codeload.github.com/adxmcollins/rulekeeper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxmcollins%2Frulekeeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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":["claude","claude-code","claudecode","claudecode-config","cli"],"created_at":"2026-01-08T01:14:42.724Z","updated_at":"2026-01-13T21:00:05.599Z","avatar_url":"https://github.com/adxmcollins.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RuleKeeper\n\nA cross-platform CLI tool for syncing and managing [Claude Code](https://docs.anthropic.com/en/docs/claude-code) rules across multiple projects.\n\n\u003e **Note:** Claude Code has [built-in memory features](https://code.claude.com/docs/en/memory) that may meet your needs. RuleKeeper is a community tool for specific use cases like multi-project syncing and divergence tracking that aren't covered by the official solutions.\n\n## Overview\n\nRuleKeeper helps teams and multi-project users maintain consistent Claude Code configurations by:\n\n- Syncing `.claude/rules/` directory files from a central source (local folder or git repository)\n- Tracking rule states: synced, outdated, diverged, or detached\n- Supporting selective rule installation per project\n- Handling conflicts when local changes exist\n\n## Installation\n\n```bash\nnpm install -g rulekeeper\n```\n\nThis installs both `rulekeeper` and the shorter `rk` alias.\n\n**Requirements:** Node.js 18.0.0 or higher\n\n## Quick Start\n\n```bash\n# 1. Initialize RuleKeeper with your rules source\nrk init\n\n# 2. Navigate to a project and add rules\ncd my-project\nrk add              # Interactive selection\nrk add -a           # Add all available rules\nrk add coding-style # Add specific rule by name\n\n# 3. Check status and keep rules updated\nrk status\nrk pull\n```\n\n## Configuration\n\n### Global Configuration\n\nRuleKeeper stores its global configuration in a platform-specific location:\n\n| Platform | Location |\n|----------|----------|\n| macOS    | `~/Library/Preferences/rulekeeper/config.yaml` |\n| Linux    | `~/.config/rulekeeper/config.yaml` |\n| Windows  | `%APPDATA%\\rulekeeper\\Config\\config.yaml` |\n\nExample configuration:\n\n```yaml\nversion: 1\nsource:\n  type: git\n  path: /Users/you/Documents/claude-rules\n  remote: https://github.com/team/claude-rules.git\nsettings:\n  autoPull: true\n  pullFrequency: daily\n  lastPull: '2024-01-15T10:30:00.000Z'\n```\n\n### Project Configuration\n\nEach project using RuleKeeper has a `.rulekeeper/manifest.yaml` file that tracks:\n\n- Which rules are installed\n- Their sync status (source and local hashes)\n- Detachment state for intentionally diverged rules\n\nExample manifest:\n\n```yaml\nversion: 1\nrules:\n  coding-style:\n    file: coding-style.md\n    status: synced\n    sourceHash: sha256:abc123...\n    localHash: sha256:abc123...\n  testing:\n    file: testing.md\n    status: detached\n    sourceHash: sha256:def456...\n    localHash: sha256:xyz789...\n    detachedAt: '2024-01-10T15:00:00.000Z'\n```\n\n## Commands\n\n### `rk init`\n\nInteractive setup wizard to configure your rules source.\n\n```bash\nrk init           # Start interactive setup\nrk init --force   # Overwrite existing configuration\n```\n\n\u003e **Tip:** Want to try RuleKeeper before setting up your own rules? Use our example repository: `https://github.com/adxmcollins/rulekeeper-rules.git`\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `-f, --force` | Overwrite existing configuration |\n\n**Source Types:**\n- **Local folder** - Path to a folder containing `.md` rule files (auto-detects if it's a git repo with remote)\n- **Git repository** - Clone a repository containing your rules\n\n---\n\n### `rk add [rules...]`\n\nAdd rules to the current project.\n\n```bash\nrk add                    # Interactive selection\nrk add coding-style       # Add specific rule (case-insensitive)\nrk add style testing api  # Add multiple rules\nrk add -a                 # Add all available rules\n```\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `-a, --all` | Add all available rules from source |\n\n**Behavior:**\n- Creates `.claude/rules/` directory if it doesn't exist\n- Rule names are case-insensitive (`Coding-Style` matches `coding-style.md`)\n- Prompts for confirmation if a file already exists with local changes\n- Options when conflict detected: overwrite, skip, or detach\n\n---\n\n### `rk remove \u003crules...\u003e`\n\nRemove rules from the project.\n\n```bash\nrk remove coding-style          # Remove rule and delete file\nrk remove style testing         # Remove multiple rules\nrk remove coding-style -k       # Remove from manifest but keep file\n```\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `-k, --keep-file` | Keep the local file, only remove from manifest |\n\n---\n\n### `rk status`\n\nShow the sync status of all tracked rules in the current project.\n\n```bash\nrk status\n```\n\n**Status indicators:**\n\n| Status | Description |\n|--------|-------------|\n| `synced` | Local file matches source |\n| `outdated` | Source has newer version |\n| `diverged` | Local changes detected (different from source) |\n| `detached` | Intentionally diverged, won't prompt for updates |\n\n---\n\n### `rk pull [rules...]`\n\nUpdate rules from source.\n\n```bash\nrk pull                    # Update all outdated rules\nrk pull coding-style       # Update specific rule\nrk pull -f                 # Force overwrite diverged rules\nrk pull --include-detached # Include detached rules in update\n```\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `-f, --force` | Overwrite diverged rules without prompting |\n| `--include-detached` | Include detached rules in the update |\n\n---\n\n### `rk diff [rule]`\n\nShow differences between local and source versions.\n\n```bash\nrk diff                # Show diff for all diverged rules\nrk diff coding-style   # Show diff for specific rule\nrk diff -a             # Show diff for all rules (including synced)\n```\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `-a, --all` | Show diff for all rules, not just diverged ones |\n\n---\n\n### `rk list`\n\nList available rules from your configured source.\n\n```bash\nrk list           # List all available rules\nrk list -i        # List only installed rules in current project\n```\n\n**Options:**\n\n| Option | Description |\n|--------|-------------|\n| `-i, --installed` | Show only rules installed in current project |\n\n---\n\n### `rk detach \u003crule\u003e`\n\nMark a rule as intentionally diverged. Detached rules won't trigger update prompts.\n\n```bash\nrk detach coding-style\n```\n\nUse this when you've made intentional local customizations that should be preserved.\n\n---\n\n### `rk attach \u003crule\u003e`\n\nResume tracking a previously detached rule.\n\n```bash\nrk attach coding-style\n```\n\nAfter attaching, the rule will be included in status checks and pull operations.\n\n---\n\n### `rk source`\n\nManage your rules source configuration.\n\n#### `rk source show`\n\nDisplay current source configuration.\n\n```bash\nrk source show\n```\n\nShows: source type, path, remote URL (if git), auto-pull settings, and last pull time.\n\n#### `rk source set \u003cpath-or-url\u003e`\n\nChange the source location.\n\n```bash\nrk source set /path/to/rules          # Local folder\nrk source set ~/Documents/my-rules    # Supports tilde expansion\nrk source set https://github.com/org/rules.git  # Git URL (will clone)\n```\n\n#### `rk source pull`\n\nManually pull latest changes from git remote.\n\n```bash\nrk source pull\n```\n\nOnly works if source is a git repository with a configured remote.\n\n#### `rk source config`\n\nView or update pull settings.\n\n```bash\nrk source config                                # View current settings\nrk source config --auto-pull on                 # Enable auto-pull\nrk source config --auto-pull off                # Disable auto-pull\nrk source config --frequency daily              # Set pull frequency\nrk source config --auto-pull on --frequency weekly  # Update both\n```\n\n**Options:**\n\n| Option | Values | Description |\n|--------|--------|-------------|\n| `--auto-pull` | `on`, `off`, `true`, `false` | Enable or disable automatic pulling |\n| `--frequency` | `always`, `daily`, `weekly` | How often to check for updates |\n\n---\n\n### `rk doctor`\n\nDiagnose setup issues and verify configuration.\n\n```bash\nrk doctor\n```\n\n**Checks performed:**\n- Global configuration exists and is valid\n- Source path exists and is accessible\n- Git remote is reachable (if applicable)\n- Current project has valid manifest (if in a project)\n\n## Rule States\n\n| State | Description | Behavior |\n|-------|-------------|----------|\n| `synced` | Local file matches source exactly | No action needed |\n| `outdated` | Source has been updated, local is behind | `rk pull` will update |\n| `diverged` | Local changes exist that differ from source | Prompted to overwrite or detach |\n| `detached` | Intentionally diverged, excluded from updates | Ignored by `rk pull` unless `--include-detached` |\n\n## Handling Existing `.claude/rules` Directories\n\nWhen adding rules to a project that already has a `.claude/rules` directory with existing files:\n\n1. **New rules** - Files that don't exist locally are copied from source\n2. **Existing untracked files** - You're prompted to: overwrite, skip, or detach\n3. **Existing tracked files** - Updated if unchanged locally, prompted if diverged\n\nThis allows you to:\n- Adopt RuleKeeper in projects with existing Claude configurations\n- Selectively sync some rules while keeping local customizations\n- Gradually migrate to centralized rule management\n\n## Cross-Platform Support\n\nRuleKeeper works on:\n\n| Platform | Shells |\n|----------|--------|\n| macOS | Terminal, iTerm, etc. |\n| Linux | Bash, Zsh, etc. |\n| Windows | CMD, PowerShell, Git Bash, WSL |\n\nOn Windows, RuleKeeper auto-detects your shell environment for optimal path handling.\n\n\u003e **PowerShell Users:** Windows security policy blocks npm global package scripts by default. Run this once to enable:\n\u003e ```powershell\n\u003e Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n\u003e ```\n\u003e This affects all npm global packages, not just RuleKeeper. CMD and Git Bash work without this step.\n\n## Source Repository Structure\n\nYour rules source should contain `.md` files at the root level:\n\n```\nrules-repo/\n├── coding-style.md\n├── testing.md\n├── api-guidelines.md\n└── security.md\n```\n\nEach `.md` file becomes an available rule that can be added to projects.\n\n## Example Workflows\n\n### Team Setup\n\n```bash\n# Team lead sets up shared rules repository\nmkdir team-rules \u0026\u0026 cd team-rules\ngit init\necho \"# Coding Standards\" \u003e coding-style.md\necho \"# Testing Guidelines\" \u003e testing.md\ngit add . \u0026\u0026 git commit -m \"Initial rules\"\ngit remote add origin https://github.com/team/claude-rules.git\ngit push -u origin main\n```\n\n### Developer Setup\n\n```bash\n# Developer configures RuleKeeper\nrk init\n# Select \"Git repository\" and enter the team's URL\n\n# In each project\ncd my-project\nrk add -a                    # Add all team rules\nrk status                    # Check sync status\n\n# When team rules are updated\nrk pull                      # Get latest changes\n\n# For project-specific customizations\nrk detach coding-style       # Keep local changes for this rule\n```\n\n### Checking and Updating\n\n```bash\n# See what's changed\nrk status\nrk diff\n\n# Update everything\nrk pull\n\n# Update specific rule\nrk pull testing\n\n# Force update (overwrite local changes)\nrk pull -f\n```\n\n### Managing Settings\n\n```bash\n# View current source and settings\nrk source show\n\n# Change source location\nrk source set ~/new-rules-location\n\n# Adjust auto-pull behavior\nrk source config --auto-pull off\nrk source config --frequency weekly\n\n# Manually update source repo\nrk source pull\n```\n\n## When to Use RuleKeeper\n\nFirst, check Claude Code's [official memory features](https://code.claude.com/docs/en/memory) - they may be all you need.\n\nRuleKeeper fills gaps not covered by official solutions:\n\n- **Multiple projects, same rules** - Manage once, distribute everywhere\n- **Multiple machines** - Source of truth in a git repo syncs across machines\n- **Small teams** - Share standards without enterprise infrastructure\n- **Claude Code web** - Rules must be real files (symlinks don't work)\n- **Divergence tracking** - Know when local rules have drifted\n- **Intentional variations** - Track that a project has deliberately different rules\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadxmcollins%2Frulekeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadxmcollins%2Frulekeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadxmcollins%2Frulekeeper/lists"}