{"id":49576873,"url":"https://github.com/mrvi0/conf-watch","last_synced_at":"2026-05-03T17:36:16.164Z","repository":{"id":303788083,"uuid":"1016645850","full_name":"mrvi0/conf-watch","owner":"mrvi0","description":"🔐 Secure configuration file monitoring with Git-based versioning and terminal-styled web interface. Each installation gets a unique password for enhanced security.  Monitor dotfiles, configs, and system files with automatic snapshots, diff viewing, and rollback capabilities","archived":false,"fork":false,"pushed_at":"2025-09-05T17:50:09.000Z","size":176,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T17:51:44.576Z","etag":null,"topics":["backup-tool","bash","cli-tool","config-backup","configuration-management","developer-tools","diff-viewer","dotfiles","file-monitoring","git-based","python","snapshots","terminal-ui","version-control","web-interface"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mrvi0.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2025-07-09T10:10:20.000Z","updated_at":"2025-09-05T17:50:13.000Z","dependencies_parsed_at":"2025-07-09T12:48:38.306Z","dependency_job_id":"1a601f29-4707-4afe-b457-14a9525eb89d","html_url":"https://github.com/mrvi0/conf-watch","commit_stats":null,"previous_names":["mrvi0/conf-watch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrvi0/conf-watch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrvi0%2Fconf-watch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrvi0%2Fconf-watch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrvi0%2Fconf-watch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrvi0%2Fconf-watch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrvi0","download_url":"https://codeload.github.com/mrvi0/conf-watch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrvi0%2Fconf-watch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["backup-tool","bash","cli-tool","config-backup","configuration-management","developer-tools","diff-viewer","dotfiles","file-monitoring","git-based","python","snapshots","terminal-ui","version-control","web-interface"],"created_at":"2026-05-03T17:36:15.639Z","updated_at":"2026-05-03T17:36:16.158Z","avatar_url":"https://github.com/mrvi0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfWatch - Configuration File Monitor\n\n[![Python](https://img.shields.io/badge/Python-3.7+-blue.svg)](https://python.org)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n```\n ██████╗ ██████╗ ███╗   ██╗███████╗██╗    ██╗ █████╗ ████████╗ ██████╗██╗  ██╗\n██╔════╝██╔═══██╗████╗  ██║██╔════╝██║    ██║██╔══██╗╚══██╔══╝██╔════╝██║  ██║\n██║     ██║   ██║██╔██╗ ██║█████╗  ██║ █╗ ██║███████║   ██║   ██║     ███████║\n██║     ██║   ██║██║╚██╗██║██╔══╝  ██║███╗██║██╔══██║   ██║   ██║     ██╔══██║\n╚██████╗╚██████╔╝██║ ╚████║██║     ╚███╔███╔╝██║  ██║   ██║   ╚██████╗██║  ██║\n ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝      ╚══╝╚══╝ ╚═╝  ╚═╝   ╚═╝    ╚═════╝╚═╝  ╚═╝\n```\n\nConfWatch is a Python-based tool for monitoring and versioning configuration files. It provides a powerful CLI and a terminal-style web interface for managing configuration file changes, history, and diffs. **Now with secure authentication - each installation gets a unique password!**\n\n---\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n  - [One-line install (recommended)](#one-line-install-recommended)\n  - [Development install](#development-install)\n- [Configuration](#configuration)\n- [CLI Usage](#cli-usage)\n- [Web Interface](#web-interface)\n- [Snapshots, Safe Name, and File Storage](#snapshots-safe-name-and-file-storage)\n- [Directory Structure](#directory-structure)\n- [Troubleshooting](#troubleshooting)\n- [FAQ](#faq)\n- [Development](#development)\n- [License](#license)\n\n---\n\n## Features\n- **Monitor any config files** (dotfiles, .env, /etc/*, etc.)\n- **Automatic versioning** (Git-based, per-file, with unique safe names)\n- **History for every file** (see all changes, with date and comment)\n- **Diff between any two snapshots** (choose any two versions to compare)\n- **Terminal-style web interface** (for easy browsing and diff viewing)\n- **Custom checkboxes and controls** (all styled for terminal look)\n- **Animated CLI demo in web** (see usage examples live)\n- **Secure authentication** (unique password per installation)\n- **Automatic file monitoring** (watchdog + polling modes with daemon)\n- **Remote web access** (accessible from any IP, not just localhost)\n- **Easy install/uninstall** (user and dev modes)\n- **Isolated virtualenv** (no system Python pollution)\n\n---\n\n## Installation\n\n### One-line install (recommended for users)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/mrvi0/conf-watch/main/install.sh | bash\n```\n\n- Installs to `~/.confwatch/`\n- Adds `confwatch` to your PATH (via .bashrc/.zshrc)\n- Creates virtualenv, config, repo, web, launcher\n- All dependencies are installed automatically\n\n### Development install (for contributors)\n\n```bash\ngit clone https://github.com/mrvi0/conf-watch.git\ncd conf-watch\n./install-dev.sh\n```\n- Installs to `~/.confwatch/` (but uses local sources)\n- For development, testing, and PRs\n\n---\n\n## Configuration\n\nEdit `~/.confwatch/config/config.yml` to specify which files to monitor:\n\n```yaml\n# List of files to monitor (one per line, starting with -)\n- ~/.bashrc\n- ~/.zshrc\n- ~/.ssh/config\n- ~/.env\n- /etc/nginx/nginx.conf\n```\n\n- You can use `~` and environment variables in paths.\n- After editing config, run `confwatch snapshot` to create initial versions.\n\n---\n\n## CLI Usage\n\n```bash\nconfwatch list                    # List monitored files\nconfwatch snapshot [files...]     # Create snapshots (all or specific files)\nconfwatch snapshot --comment \"msg\" # Create snapshot with comment\nconfwatch diff \u003cfile\u003e             # Show diff (latest vs previous)\nconfwatch history \u003cfile\u003e          # Show file history (with commit hashes)\nconfwatch tag \u003cfile\u003e \u003ctag\u003e        # Tag current version\nconfwatch rollback \u003cfile\u003e \u003cver\u003e   # Rollback to specific version\nconfwatch web [options]           # Start web interface (one-time)\nconfwatch web-daemon start        # Start persistent web server daemon\nconfwatch web-daemon stop         # Stop persistent web server daemon\nconfwatch web-daemon status       # Show web daemon status\nconfwatch daemon start            # Start automatic file monitoring\nconfwatch daemon stop             # Stop automatic file monitoring\nconfwatch daemon status           # Show daemon status\nconfwatch completion --install    # Install shell autocompletion\nconfwatch reset-password          # Reset web interface password\nconfwatch update                  # Update ConfWatch to latest version\nconfwatch --help                  # Show all commands\n```\n\n#### Examples\n```bash\nconfwatch snapshot ~/.bashrc --comment \"After installing nvm\"\nconfwatch snapshot --comment \"Daily backup\" --force\nconfwatch diff ~/.env\nconfwatch history /etc/nginx/nginx.conf\nconfwatch tag ~/.bashrc \"after-nvm-install\"\nconfwatch rollback ~/.bashrc abc1234\nconfwatch web --port 9000                # One-time web server\nconfwatch web-daemon start --port 8080  # Persistent web daemon\nconfwatch web-daemon config --port 9000 # Configure web daemon\nconfwatch daemon start --foreground     # Start monitoring in foreground\nconfwatch daemon start --polling        # Use polling instead of watchdog\nconfwatch daemon restart\nconfwatch completion bash --install     # Install bash completion\nconfwatch completion zsh --install      # Install zsh completion\nconfwatch update --force                # Force update without confirmation\nconfwatch reset-password --force\n```\n\n---\n\n## Web Interface\n\n- Start with `confwatch web` (default: http://0.0.0.0:8080)\n- **Remote access** - accessible from any IP address, not just localhost\n- **Secure authentication** - each installation gets a unique password\n- Browse all monitored files, see status and history\n- Click [HISTORY] to see all snapshots for a file\n- Select any two snapshots and click [SHOW DIFF] to compare them\n- All controls (checkboxes, buttons) styled as in a terminal\n- Animated CLI demo at the top (shows usage examples)\n- Logout button in the terminal header\n\n**[SCREENSHOT PLACEHOLDER: Main web interface with file list, status, and animated CLI demo]**\n**[SCREENSHOT PLACEHOLDER: File history view with custom checkboxes and [SHOW DIFF] button]**\n**[SCREENSHOT PLACEHOLDER: Diff view between two arbitrary snapshots]**\n\n---\n\n## Persistent Web Daemon\n\nFor production use, you can run a persistent web server daemon that starts automatically and remembers its configuration:\n\n### Setup and Start\n```bash\nconfwatch web-daemon config --host 0.0.0.0 --port 8080  # Configure settings\nconfwatch web-daemon start                              # Start in background\n```\n\n### Management\n```bash\nconfwatch web-daemon status      # Check if running\nconfwatch web-daemon stop        # Stop daemon  \nconfwatch web-daemon restart     # Restart with saved config\n```\n\n### Features\n- **Configuration persistence** - settings saved in `~/.confwatch/web_daemon.conf`\n- **Background operation** - runs as daemon with PID file management\n- **Automatic restart** - remembers host, port, debug settings\n- **Logging** - output goes to `~/.confwatch/web_daemon.log`\n- **Process management** - proper start/stop/restart with PID tracking\n\n### Difference from regular web command\n- **`confwatch web`** - one-time server with command-line parameters\n- **`confwatch web-daemon`** - persistent daemon with saved configuration\n\n---\n\n## Shell Autocompletion\n\nConfWatch supports intelligent autocompletion for bash and zsh shells:\n\n### Automatic Installation\nAutocompletion is installed automatically during ConfWatch setup. If you need to reinstall or install manually:\n\n```bash\nconfwatch completion --install          # Auto-detect shell and install\nconfwatch completion bash --install     # Install for bash\nconfwatch completion zsh --install      # Install for zsh\n```\n\n### Features\n- **Command completion** - `confwatch \u003cTAB\u003e` shows all available commands\n- **Subcommand completion** - `confwatch web-daemon \u003cTAB\u003e` shows start, stop, restart, etc.\n- **Option completion** - `confwatch daemon start --\u003cTAB\u003e` shows available flags\n- **File path completion** - `confwatch snapshot \u003cTAB\u003e` completes file paths\n- **Context-aware** - different options for different commands and subcommands\n\n### Manual Setup\nIf automatic installation fails, you can install manually:\n\n```bash\n# Generate completion files\nconfwatch completion --output /tmp/completion\n\n# Install manually\nsudo cp /tmp/completion/confwatch-completion.bash /usr/share/bash-completion/completions/confwatch\nsudo cp /tmp/completion/_confwatch /usr/share/zsh/site-functions/_confwatch\n```\n\nAfter installation, restart your shell or run:\n- **Bash**: `source ~/.bashrc`\n- **Zsh**: `compinit`\n\n---\n\n## Automatic File Monitoring\n\nConfWatch can automatically monitor your configuration files and create snapshots when they change:\n\n### Start Monitoring\n```bash\nconfwatch daemon start              # Start in background (recommended)\nconfwatch daemon start --foreground # Start in foreground for debugging\nconfwatch daemon start --polling    # Use polling instead of watchdog\n```\n\n### Monitor Status\n```bash\nconfwatch daemon status             # Check if daemon is running\n```\n\n### Stop Monitoring\n```bash\nconfwatch daemon stop               # Stop background monitoring\nconfwatch daemon restart            # Restart daemon\n```\n\n### How it Works\n- **Watchdog mode** (default): Uses system file events (inotify on Linux) for instant detection\n- **Polling mode** (fallback): Checks files every 30 seconds using hash comparison\n- **Debouncing**: Waits 5 seconds after last change before creating snapshot\n- **Auto comments**: Snapshots get `[AUTO]` prefix with timestamp\n- **Smart filtering**: Ignores temporary files (.swp, .tmp, .bak, etc.)\n\n### Logs\n- **PID file**: `~/.confwatch/daemon.pid`\n- **Log file**: `~/.confwatch/daemon.log`\n- **Background mode**: All output goes to log file\n- **Foreground mode**: Output to terminal\n\n---\n\n## Snapshots, Safe Name, and File Storage\n\n- **Every file** is tracked by its absolute path, but stored in the repo as a unique \"safe name\":\n  - `safe_name = sha256(abs_path) + '_' + filename`\n  - This prevents conflicts for files with the same name in different folders.\n- **In the UI and CLI** you always see the original file path and short git commit hashes.\n- **In the repo** you may see long filenames — this is normal and ensures uniqueness.\n- **Snapshots** are git commits, each with a hash, date, and optional comment.\n- **Diff** can be shown between any two snapshots (not just latest vs previous).\n\n---\n\n## Directory Structure\n\nAfter install, you will have:\n\n```\n~/.confwatch/\n├── venv/                # Python virtual environment\n├── config/config.yml    # List of monitored files\n├── repo/                # Git repo with all file versions (safe names)\n├── web/                 # Web UI static files\n├── confwatch            # Launcher script (added to PATH)\n└── confwatch-module/    # All Python code (core, cli, web)\n```\n\n---\n\n## Troubleshooting\n\n- **confwatch: command not found**\n  - Run `source ~/.bashrc` or restart your terminal\n  - Make sure `~/.confwatch/` is in your PATH\n- **Python/pip/git not found**\n  - Install Python 3.7+, pip, and git\n- **Web interface not opening**\n  - Make sure nothing else is using port 8080 (or use `confwatch web --port 9000`)\n  - Check if firewall is blocking the port for remote access\n- **Permission errors**\n  - Ensure you have write access to `~/.confwatch`\n- **How to uninstall?**\n  - Run `./uninstall.sh` from the repo or remove `~/.confwatch` and clean up PATH in your shell config\n\n---\n\n## FAQ\n\n**Q: Why are some files in the repo named with a long hash?**\nA: This is the \"safe name\" — a unique identifier for each file, based on its absolute path. It prevents conflicts between files with the same name in different folders. In the UI and CLI you always see the original file path and short commit hashes.\n\n**Q: How do I compare any two snapshots?**\nA: In the web interface, open HISTORY for a file, select any two versions, and click [SHOW DIFF].\n\n**Q: How do I update ConfWatch?**\nA: Pull the latest code and run `./install.sh` again.\n\n**Q: How do I add/remove files from monitoring?**\nA: Edit `~/.confwatch/config/config.yml` and run `confwatch snapshot`.\n\n**Q: How do I use a different port for the web interface?**\nA: `confwatch web --port 9000`\n\n**Q: How do I reset the web interface password?**\nA: `confwatch reset-password` (with confirmation) or `confwatch reset-password --force`\n\n**Q: What if I forgot my web interface password?**\nA: Use `confwatch reset-password` to generate a new one.\n\n**Q: How does automatic monitoring work?**\nA: Run `confwatch daemon start` to monitor files. It uses watchdog (inotify) for instant detection or falls back to polling every 30 seconds. Creates snapshots automatically with `[AUTO]` prefix.\n\n**Q: Can I access the web interface from another computer?**\nA: Yes! The web server binds to `0.0.0.0:8080` by default, making it accessible from any IP. Just make sure your firewall allows the port.\n\n**Q: How do I update ConfWatch?**\nA: Run `confwatch update` to automatically update to the latest version. Your configuration and file history are preserved during updates.\n\n**Q: What's the difference between web and web-daemon?**\nA: `confwatch web` starts a one-time server, while `confwatch web-daemon` runs a persistent daemon that remembers its configuration and can be managed like a system service.\n\n**Q: How do I enable autocompletion?**\nA: Autocompletion is installed automatically. If it's not working, run `confwatch completion --install` and restart your shell.\n\n**Q: How do I develop or contribute?**\nA: See [Development](#development) below.\n\n---\n\n## Development\n\n- Clone the repo and run `./install-dev.sh` (see above)\n- All code is in `confwatch-module/` (core, cli, web)\n- Web UI is in `confwatch/web/static/`\n- To run tests: `python -m pytest`\n- To run web in dev mode: `python -m confwatch.cli.main web --debug`\n- PRs and issues welcome!\n\n---\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrvi0%2Fconf-watch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrvi0%2Fconf-watch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrvi0%2Fconf-watch/lists"}