[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80838":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":12,"forks30d":12,"starsTrendScore":16,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":12,"starSnapshotCount":12,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},80838,"Replibook","AlexRosbach\u002FReplibook","AlexRosbach","Scan a server. Generate an Ansible playbook. Reproduce it anywhere.",null,"Python",41,0,36,9,1,3,5,44,"MIT License",false,"main",[],"2026-06-12 04:01:30","\u003Cdiv align=\"center\">\n\n# Replibook\n\n**Scan a server. Generate an Ansible playbook. Reproduce it anywhere.**\n\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-1.1.0-6366f1)](https:\u002F\u002Fgithub.com\u002FAlexRosbach\u002FReplibook\u002Freleases\u002Ftag\u002Fv1.1.0)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%2B-0ea5e9)](https:\u002F\u002Fwww.python.org\u002F)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-Linux%20%7C%20macOS%20%7C%20Windows%20App-22c55e)](docs\u002Fdocumentation.md)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-22c55e)](LICENSE)\n[![Follow on X](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FX-@itneedtoknow-000000)](https:\u002F\u002Fx.com\u002Fitneedtoknow)\n\nReplibook takes a snapshot of what's installed and running on your machine — packages, services, Docker containers, Compose deployments — and turns it into a ready-to-use Ansible playbook that recreates the same setup on another host.\n\nProject updates, release notes, and occasional build notes are posted on [X \u002F @itneedtoknow](https:\u002F\u002Fx.com\u002Fitneedtoknow).\n\nWorks on **Linux** (apt + systemd), **macOS** (Homebrew), and **Windows** (installed programs, services, network settings and scheduled tasks as review-first inventory). The Windows desktop app provides a branded UI for creating and applying playbooks through an Ansible-capable backend such as WSL.\n\n\u003Cimg src=\"replibook\u002Fassets\u002Freplibook-logo-light.png\" alt=\"Replibook logo\" width=\"520\">\n\n\u003C\u002Fdiv>\n\n> [!IMPORTANT]\n> Generated playbooks can contain sensitive information, especially Docker environment variables and host-specific paths. Review generated output before committing, sharing, or applying it to another host.\n>\n> Replibook does **not** back up Docker volumes, bind-mounted files, databases, uploads, application data or arbitrary files. It generates reproduction tasks from discovered configuration metadata; handle data backups separately.\n\n---\n\n## Features\n\n- Automatic OS detection for Linux, macOS and Windows\n- System configuration scanning for hostname, timezone and locale\n- Network configuration scanning for interfaces, addresses, gateway and DNS\n- Scheduled task scanning for cron, `\u002Fetc\u002Fcron.*` and macOS launchd plist locations\n- Windows scanning for installed programs, services, network configuration and Task Scheduler entries\n- Package scanning for apt\u002Fdpkg and Homebrew\n- Service scanning for systemd and Homebrew services\n- Docker container scanning via the Docker SDK\n- Docker Compose deployment discovery\n- Ansible playbook and matching inventory generation\n- Role-oriented scan profiles for practical reproduction workflows, including workstation, web server, database server, automation node, terminal server, container host and full audit\n- Guided CLI with explained profile and module prompts\n- Local and SSH target inventory configuration\n- Optional guided `apply` command for generated playbooks, including Ansible dependency setup\n- Windows desktop app (`Replibook.exe`) for local scanning, playbook creation and applying playbooks through WSL or another Ansible command\n- Commander-friendly CLI controls for automation, including module listing and comma-separated scanner selection\n- Review preview with safety classes before playbook generation\n- Optional scan snapshots and drift comparison via `replibook diff`\n\n---\n\n## Documentation\n\n- [Knowledge Base \u002F FAQ](docs\u002Fknowledgebase.md)\n- [Extended documentation](docs\u002Fdocumentation.md)\n- [Report a bug](..\u002F..\u002Fissues\u002Fnew?template=bug_report.yml)\n\nUse the Knowledge Base for common setup problems and generated-playbook warnings. Use the extended documentation for installation, scanner details, output format, and troubleshooting.\n\n---\n\n## Quick Start\n\n### 1. Install\n\n```bash\npipx install git+https:\u002F\u002Fgithub.com\u002FAlexRosbach\u002FReplibook.git@v1.1.0\n```\n\n> No `pipx`? Install it once: `brew install pipx` (macOS) or `apt install pipx` (Linux).\n>\n> To install a different release tag, replace `@v1.1.0` in the command above.\n> To install the latest development version instead, omit the `@\u003Ctag>` suffix.\n\n### 2. Run it\n\n```bash\nreplibook\n```\n\nThat's it. The interactive menu guides you through:\n- Choosing whether you want to scan or apply an existing playbook\n- Selecting what to scan, with a short explanation for each module\n- Confirming where to save the playbook (default: `.\u002Fplaybooks`)\n- Choosing whether the inventory should target the local machine or another host over SSH\n\nYou end up with two files:\n\n```\nplaybooks\u002F\n├── myserver_playbook.yml   # The Ansible playbook\n└── inventory.ini           # Matching inventory file\n```\n\n### 3. Apply it to another machine\n\nRun the playbook from the machine where Replibook is installed:\n\n```bash\nreplibook apply myserver_playbook.yml --inventory inventory.ini\n```\n\nIf Ansible is missing, Replibook offers to install Ansible and the common collections it needs. You can also request that directly:\n\n```bash\nreplibook apply myserver_playbook.yml --inventory inventory.ini --install-deps\n```\n\nReplibook shows the selected playbook and inventory before handing off to `ansible-playbook`. If a playbook appears to contain network settings, Replibook asks for an extra confirmation because a bad network change can break remote access.\n\n### Windows desktop app\n\nDownload `Replibook.exe` from release assets when a Windows build is published. Developers can build the same executable with `scripts\u002Fbuild-windows.ps1`; the script fails if `dist\\Replibook.exe` is not created.\n\nThe app keeps the Python backend intact and adds a desktop UI for:\n- creating a playbook and inventory from the shared generator backend\n- scanning Linux, macOS or Windows with platform-specific scanners and role-oriented profiles\n- applying playbooks from Windows through `wsl ansible-playbook` or a custom Ansible command\n- opening the GitHub repository or bug report form directly from the app\n\nWindows items that do not expose a reliable unattended installer command are still shown as review facts in the generated playbook instead of being silently dropped.\n\n---\n\n## What gets scanned\n\nReplibook detects your OS and picks the right tools automatically. The default scan is **Role reproduction**, which is meant for rebuilding a configured host without scanning unrelated Docker\u002FCompose state. Use **Container host** or **Full audit** when that extra inventory is actually relevant.\n\n| Module | Linux | macOS | Windows |\n|---|---|---|---|\n| **System** | hostname, timezone, locale | hostname, timezone, locale | hostname, timezone, locale |\n| **Network** | `ip`, `resolvectl`, optional `nmcli` | `networksetup` | `Get-NetIPConfiguration` |\n| **Scheduled Tasks** | user crontab, `\u002Fetc\u002Fcrontab`, `\u002Fetc\u002Fcron.d`, periodic cron directories | user crontab, LaunchAgents, LaunchDaemons | non-Microsoft Task Scheduler entries |\n| **Packages** | `apt-mark` \u002F `dpkg` | `brew` formulas + casks | installed-program registry inventory |\n| **Services** | `systemctl` (enabled + active) | `brew services` | running and automatic Windows services |\n| **Docker** | Docker socket | Docker Desktop socket | Docker Desktop socket |\n| **Compose** | `\u002Fopt`, `\u002Fsrv`, `\u002Fhome`, `\u002Froot`, `\u002Fdocker` | `\u002FUsers`, `\u002Fopt`, `\u002Fusr\u002Flocal` | `C:\\Docker`, `C:\\Projects`, user profile |\n\nIf a tool isn't present (e.g. no Docker, no Homebrew), that module just returns nothing — no errors.\n\nNetwork tasks are generated conservatively. Replibook records the discovered configuration and emits disabled NetworkManager example tasks when enough information is available. Review and explicitly enable network tasks before applying them.\nScheduled tasks are also generated conservatively. Replibook records cron and launchd entries for review, and cron recreation tasks are disabled until you explicitly enable them.\nWindows programs and some scheduler details are represented as review-first facts when there is no safe generic Ansible install task.\n\n---\n\n## Common commands\n\n```bash\n# Interactive (default)\nreplibook\n\n# Skip the menu, scan everything\nreplibook --all\n\n# List automation-friendly scanner keys\nreplibook modules\n\n# List practical scan profiles\nreplibook profiles\n\n# Role-oriented scan for rebuilding a configured server\u002Fworkstation\nreplibook scan --profile role --output .\u002Fplaybooks\n\n# Terminal server style scan: system, programs, services, tasks and network context\nreplibook scan --profile terminal_server --output .\u002Fplaybooks\n\n# Other role-oriented scans\nreplibook scan --profile web_server --output .\u002Fplaybooks\nreplibook scan --profile database_server --output .\u002Fplaybooks\nreplibook scan --profile workstation --output .\u002Fplaybooks\nreplibook scan --profile automation_node --output .\u002Fplaybooks\n\n# Run selected scanner modules without prompts\nreplibook scan --modules system,network,scheduled_tasks --output .\u002Fplaybooks\n\n# Exclude generated sections after scan review\nreplibook scan --all --exclude-sections network,scheduled_tasks\n\n# Save raw scan data for review or drift comparison\nreplibook scan --all --save-snapshot .\u002Fsnapshots\u002Fserver-a.json\n\n# Compare two snapshots\nreplibook diff .\u002Fsnapshots\u002Fserver-a-before.json .\u002Fsnapshots\u002Fserver-a-after.json\n\n# Print a remote scan workflow for SSH targets\nreplibook remote-recipe server-a.example.com --user admin\n\n# Custom output directory\nreplibook --all --output \u002Fopt\u002Fplaybooks\n\n# Generate an SSH inventory without the interactive wizard\nreplibook --all \\\n  --target-connection ssh \\\n  --target-host 192.168.1.50 \\\n  --target-user ubuntu \\\n  --target-key ~\u002F.ssh\u002Fid_rsa\n\n# Dry-run a generated playbook\nreplibook apply .\u002Fplaybooks\u002Fmyserver_playbook.yml --inventory .\u002Fplaybooks\u002Finventory.ini --check\n\n# Apply and install missing Ansible dependencies if needed\nreplibook apply .\u002Fplaybooks\u002Fmyserver_playbook.yml --inventory .\u002Fplaybooks\u002Finventory.ini --install-deps\n\n# Help\nreplibook --help\n```\n\n---\n\n## Example Output\n\nInteractive run:\n\n```\n╭─────────────────────────────────────────────────────╮\n│  Replibook v1.1.0                                   │\n│  Ansible Playbook Generator · detected: macos       │\n╰─────────────────────────────────────────────────────╯\n\nScan modules\n\n╭─ Installed Packages (Homebrew) ─────────────────────╮\n│ Reads Homebrew formulas and casks installed on this │\n│ Mac.                                                │\n╰─────────────────────────────────────────────────────╯\n? [ ] Include Installed Packages (Homebrew)? Yes\n\n╭─ Homebrew Services ─────────────────────────────────╮\n│ Reads services managed through brew services.       │\n╰─────────────────────────────────────────────────────╯\n? [ ] Include Homebrew Services? Yes\n\n? Output directory for playbooks: .\u002Fplaybooks\n? Generate inventory for another host over SSH? No\n\n  Scanning...\n  → Installed Packages (Homebrew)\n  → Homebrew Services\n  → Docker Containers & Images\n  → Docker Compose Deployments\n\n  Installed Packages (Homebrew): 47 found\n  Homebrew Services:              3 found\n  Docker Containers & Images:     2 found\n  Docker Compose Deployments:     1 found\n\n  Generating playbook...\n\n✓ Playbook written to: .\u002Fplaybooks\u002Fmymac_playbook.yml\n✓ Inventory written to: .\u002Fplaybooks\u002Finventory.ini\n```\n\nGenerated playbook snippet (macOS):\n\n```yaml\n---\n# Generated by Replibook on 2025-05-18 14:32:00\n# Source host: mymac (macos)\n\n- name: Replibook — Reproduce mymac\n  hosts: replibook\n  become: false\n  tasks:\n\n    # ── Homebrew Formulas ─────────────────────────────────────\n    - name: Install Homebrew formulas\n      community.general.homebrew:\n        name:\n          - git\n          - htop\n          - jq\n        state: present\n        update_homebrew: true\n\n    # ── Homebrew Casks ────────────────────────────────────────\n    - name: Install Homebrew casks\n      community.general.homebrew_cask:\n        name:\n          - visual-studio-code\n          - rectangle\n        state: present\n\n    # ── Docker Containers ──────────────────────────────────────\n    - name: Run container my-app\n      community.docker.docker_container:\n        name: my-app\n        image: nginx:latest\n        state: started\n        restart_policy: unless-stopped\n```\n\n---\n\n## Permissions\n\n| Platform | Sudo needed? |\n|---|---|\n| **Linux** | Only for Docker socket — either run with `sudo` or add yourself to the `docker` group |\n| **macOS** | No — Homebrew refuses to run as root |\n\nThe package and service scanners don't need elevated privileges on either OS.\n\n---\n\n## Architecture\n\n```\nreplibook\u002F\n├── scanner\u002F          # Scanner modules (packages, services, docker, deployments)\n├── generator\u002F        # Playbook assembler + Jinja2 template\n├── models\u002F           # Data models\n└── utils\u002F            # OS detection\n```\n\n| Component | Responsibility |\n|---|---|\n| `main.py` | Typer CLI entry point |\n| `cli.py` | Interactive menu, scan orchestration |\n| `profiles.py` | Role-oriented scan profiles such as role reproduction, terminal server, container host and full audit |\n| `scanner\u002F` | One module per scan domain — auto-detects Linux, macOS and Windows |\n| `generator\u002Fplaybook.py` | Renders scan results into Ansible YAML via Jinja2 |\n| `utils\u002Fos_detect.py` | Returns `linux` \u002F `macos` \u002F `windows` \u002F `unknown` |\n\n**Dependencies:** Python 3.10+, Typer, Rich, questionary, Jinja2, docker-py\n\n---\n\n## Documentation\n\n- [Knowledge Base \u002F FAQ](docs\u002Fknowledgebase.md)\n- [Extended documentation](docs\u002Fdocumentation.md)\n\n---\n\n## Contributing\n\nBug reports, feature requests and questions are welcome via [GitHub Issues](..\u002F..\u002Fissues).\nPlease use the provided issue templates — blank issues are disabled.\n\nSecurity vulnerabilities should be reported via [GitHub Security Advisories](..\u002F..\u002Fsecurity\u002Fadvisories\u002Fnew).\n\n---\n\n## License\n\nMIT License — see [LICENSE](LICENSE) for details.\n","Replibook 是一个用于扫描服务器并生成 Ansible playbook 的工具，以便在其他主机上重现相同的配置。其核心功能包括自动检测操作系统、扫描系统和网络配置、识别已安装的软件包和服务、以及发现 Docker 容器和 Compose 部署。它支持 Linux（apt + systemd）、macOS（Homebrew）和 Windows 系统，并通过生成的 Ansible playbook 和匹配的库存文件来简化环境复制过程。此外，Replibook 提供了一个适用于 Windows 的桌面应用程序，方便用户创建和应用 playbook。该工具适合需要快速部署或迁移服务器配置的场景，如开发测试环境搭建、生产环境复现等。",2,"2026-06-11 04:02:31","CREATED_QUERY"]