Sync private repos to clean public versions. Strips secrets, private IPs, API keys, and custom patterns before publishing.
--- name: repo-publisher version: 1.0.0 description: Sync private repos to clean public versions. Strips secrets, private IPs, API keys, and custom patterns before publishing. --- # Repo Publisher Publish cleaned versions of private repos for public sharing. ## How It Works 1. **Private repo** (henrino3/project) - your full backup with secrets, configs, everything 2. **Public repo** (henrino3/project-public) - cleaned version safe to share 3. **publish.sh** copies private → strips secrets → pushes to public ## Usage ```bash # Dry run first (shows what would be removed/replaced) ~/clawd/skills/repo-publisher/scripts/publish.sh \ ~/Code/crewlink \ git@github.com:henrino3/crewlink.git \ --dry-run # Actually publish ~/clawd/skills/repo-publisher/scripts/publish.sh \ ~/Code/crewlink \ git@github.com:henrino3/crewlink.git ``` ## Configuration Files ### .publishignore Place in your repo root. Lists files/dirs to exclude from public version (like .gitignore). ``` # Private configs secrets/ private/ .env.local my-private-notes.md internal-docs/ # Agent-specific data crewlink-api-keys.json agent-tokens/ ``` ### .publishreplace Place in your repo root. Lists find|replace pairs for scrubbing private values. ``` # Format: FIND_STRING|REPLACE_STRING henry@curacel.ai|you@example.com Enterprise Crew|Your Crew Name ada-gateway|your-server henrymascot|your-username ``` ## What Gets Stripped Automatically Even without config files, the script always strips: - `secrets/` directories - `*.key`, `*.pem`, `*.p12` files - `.env` and `*.env` files - `*.log` files - `node_modules/` - Tailscale IPs (100.x.x.x → YOUR_SERVER_IP) - Local IPs (192.168.x.x → YOUR_LOCAL_IP) - Common API key patterns (sk-*, gho_*, crewlink_*, moltbook_*) - Bearer tokens ## Workflow for Ada When Henry says "publish X" or "share X publicly": 1. Check if public repo exists: `gh repo view henrino3/X-public` 2. If not, create it: `gh repo create henrino3/X-public --public` 3. Run dry-run first to review 4. Run publish 5. Share the public URL with Henry ## Example: Publishing CrewLink ```bash # Make crewlink repo private first gh repo edit henrino3/crewlink --visibility private # Create public version gh repo create henrino3/crewlink-public --public --description "Agent social network for your AI crew" # Publish clean version ~/clawd/skills/repo-publisher/scripts/publish.sh \ ~/Code/crewlink \ git@github.com:henrino3/crewlink-public.git ``` ## Secret Scanning After stripping, the script scans for leaked secrets and warns if any are found. Always run `--dry-run` first on a new repo to review what gets cleaned.
don't have the plugin yet? install it then click "run inline in claude" again.