{
  "markdown": "# Claudebase\n\n[![CI](https://github.com/rohithzr/claudebase/actions/workflows/test.yml/badge.svg)](https://github.com/rohithzr/claudebase/actions/workflows/test.yml)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-0.2.0-green.svg)](CHANGELOG.md)\n\nYour Claude Code setup is infrastructure. Agents, skills, rules, hooks, memory — these accumulate over weeks of work and represent real investment. Losing them to a disk wipe, or manually recreating them on a new machine, shouldn't happen.\n\n**Claudebase syncs your entire Claude Code environment to a private GitHub repo.** Profiles let you switch between work, personal, and team configurations instantly. Secret scanning, automatic backups, and multi-machine conflict detection keep things safe.\n\n<!-- TODO: Add asciinema demo GIF here -->\n<!-- [![demo](docs/demo.gif)](#quick-start) -->\n\n## Install\n\n```bash\nclaude plugin marketplace add rohithzr/claudebase\nclaude plugin install claudebase@rohithzr\n```\n\nThen restart Claude Code or run `/reload-plugins`.\n\n<details>\n<summary>Update / Uninstall</summary>\n\n```bash\n# Update\nclaude plugins marketplace update\nclaude plugin update claudebase@rohithzr\n\n# Uninstall\nclaude plugin uninstall claudebase@rohithzr\nclaude plugin marketplace remove rohithzr\n```\n</details>\n\n## Quick Start\n\n```\n/sync-setup          # One-time: create private GitHub repo + first push\n/sync-push           # Back up current config\n/sync-pull           # Restore config from GitHub\n/sync-status         # Compare local vs remote\n/sync-profiles list  # Manage named profiles\n/sync-config         # View/change settings\n```\n\n> Type `/sync` to see all commands. Full namespaced form (`/claudebase:sync-push`) also works.\n\n## Why Not Just Copy the Folder?\n\n| | Manual copy | Claudebase |\n|---|---|---|\n| Secret scanning | No | Blocks API keys, PEM files, tokens |\n| Multi-machine safety | No | Detects conflicting pushes |\n| Profiles | No | Switch work/personal/team instantly |\n| Shared team layer | No | Base config + per-person overlay |\n| Automatic backups | No | Timestamped backup before every pull |\n| Dry run preview | No | See what changes before committing |\n\n## Examples\n\n### Sync between machines\n\n```\nLaptop:  /sync-push               # Push your config\nDesktop: /sync-pull               # Pull it down\nDesktop: # ... tweak agents, add rules ...\nDesktop: /sync-push --force       # Push from second machine\nLaptop:  /sync-pull               # Get desktop's changes\n```\n\n### Switch contexts during the day\n\n```\n/sync-profiles switch work        # Load work config\n# ... deep coding session ...\n/sync-push                        # Save work state\n/sync-profiles switch personal    # Load personal config\n```\n\n### Preview before committing\n\n```\n/sync-push --dry-run              # See what would be pushed\n/sync-pull --dry-run              # See what would change locally\n/sync-profiles diff work personal # Compare two profiles\n```\n\n<details>\n<summary>More examples</summary>\n\n### Onboard a teammate\n\n```\n# You: push your team config to a shared profile\n/sync-profiles create team-defaults --from work\n/sync-push\n\n# Teammate: on their machine\n/sync-setup\n/sync-pull --profile team-defaults\n```\n\n### Recover from a bad change\n\n```\n/sync-pull                        # Restores from last push\n                                        # Old config saved to backups/\n```\n\n### Three-machine round-robin\n\n```\nLaptop:   /sync-push\nDesktop:  /sync-pull && /sync-push --force\nCI Box:   /sync-pull && /sync-push --force\nLaptop:   /sync-pull              # Gets everything\n```\n</details>\n\n## What Gets Synced\n\n| Path | Description |\n|------|-------------|\n| `.mcp.json` | MCP server configurations |\n| `.claude/settings.json` | Team-shared settings |\n| `.claude/agents/` | Subagent definitions |\n| `.claude/commands/` | Slash command templates |\n| `.claude/skills/` | Reusable knowledge modules |\n| `.claude/hooks/` | Lifecycle hooks |\n| `.claude/rules/` | Organization rules |\n| `.claude/agent-memory/` | Persistent agent memory |\n| `.auto-memory/` | Auto-memory files |\n\n**Opt-in:** Global `~/.claude/settings.json` (`--include-global`), `skills-lock.json` (`/claudebase:config set sync_agent_skills true` — syncs the lock file; prints install commands on pull, does not auto-execute).\n\n**Never synced:** `settings.local.json`, conversations, sessions, shell snapshots, logs.\n\n## How It Works\n\n```\n           ┌──────────────┐\nMachine A  │ .claude/     │──push──┐\n           │ .mcp.json    │        │     ┌──────────────────────┐\n           │ .auto-memory/│        ├────>│  GitHub (private)    │\n           └──────────────┘        │     │  profiles/default/   │\n                                   │     │  profiles/work/      │\n           ┌──────────────┐        │     │  shared/             │\nMachine B  │ .claude/     │<─pull──┘     └──────────────────────┘\n           │ .mcp.json    │\n           │ .auto-memory/│\n           └──────────────┘\n```\n\nWhen you pull, **shared/** is applied first as a base layer, then **profiles/\\<name\\>/** overlays on top. This lets you maintain organization-wide defaults while customizing per context.\n\nPush is blocked if a different machine pushed since your last sync — pull first or use `--force` to override.\n\n## Safety\n\n| Protection | How it works |\n|-----------|-------------|\n| Backup before pull | Every pull creates a timestamped backup (last 10 kept) |\n| Confirmation prompt | Pull shows a diff and asks before overwriting (`--yes` to skip) |\n| Secret scanning | Blocks API keys, PEM keys, Bearer tokens (`--force` to override) |\n| Multi-machine detection | Blocks push if another machine pushed since your last sync |\n| Private repo | Created private by default |\n| Dry run | `--dry-run` on push/pull shows changes without applying |\n| Never-sync list | Conversations, sessions, logs excluded by design |\n\n## Configuration\n\n```\n/sync-config show                      # View all settings\n/sync-config set auto_push true        # Auto-push on session end\n/sync-config set include_global true   # Always sync global settings\n/sync-config set machine_id my-laptop  # Custom machine identifier\n/sync-config reset auto_push           # Reset to default\n```\n\nClaudebase also registers two lifecycle hooks:\n- **SessionStart** — quiet diff check (tells you if config is out of sync)\n- **SessionEnd** — auto-pushes if `auto_push` is enabled\n\n## Requirements\n\n[GitHub CLI (`gh`)](https://cli.github.com/) | [`jq`](https://jqlang.github.io/jq/) | [`git`](https://git-scm.com/) | `bash`\n\nClaudebase uses `gh` for all GitHub operations — no tokens to manage, no OAuth, no stored credentials.\n\n<details>\n<summary>Platform-specific install instructions</summary>\n\n**macOS**\n```bash\nbrew install gh jq git\ngh auth login\n```\n\n**Linux (Debian/Ubuntu)**\n```bash\n# GitHub CLI (https://github.com/cli/cli/blob/trunk/docs/install_linux.md)\n(type -p wget >/dev/null || sudo apt-get install wget -y) \\\n  && sudo mkdir -p -m 755 /etc/apt/keyrings \\\n  && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \\\n  && cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \\\n  && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \\\n  && echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \\\n  && sudo apt update \\\n  && sudo apt install gh -y\n\nsudo apt-get install -y jq git\ngh auth login\n```\n\n**Windows** — Install [Git for Windows](https://git-scm.com/download/win) (includes Git Bash), then:\n```powershell\nwinget install GitHub.cli\nwinget install jqlang.jq\ngh auth login\n```\n</details>\n\n## Contributing\n\nContributions welcome. See the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n```bash\ngit clone https://github.com/rohithzr/claudebase.git\ncd claudebase\ngit submodule update --init --recursive\n```\n\n### Running tests\n\n```bash\n./tests/bats/bin/bats tests/                 # All 158 tests\n./tests/bats/bin/bats tests/unit/            # 57 unit tests\n./tests/bats/bin/bats tests/integration/     # 72 integration tests\n./tests/bats/bin/bats tests/e2e/             # 29 E2E tests\n```\n\nCI runs on every push across macOS, Linux, and Windows.\n\n### Local development\n\n```bash\nclaude --plugin-dir ./\n```\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 8421,
  "sha": "10693ce2bb755db9a5fa53b0f0aa503fc98514b7896f7cc9164b52b00a2a9778",
  "repo_slug": "rohithzr/claudebase",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_rohithzr_claudebase_claudebase_ae83fea8/readme"
}