DEV Community

Mr Vi
Mr Vi

Posted on • Edited on

ConfWatch v3.0.0: Configuration File Monitoring with Secure Authentication

ConfWatch Logo

What is ConfWatch?

ConfWatch 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.

πŸš€ Key Features

  • Monitor any configuration files (dotfiles, .env, /etc/*, etc.)
  • Automatic versioning (Git-based, per-file, with unique safe names)
  • History for every file (see all changes with date and comment)
  • Diff between any two snapshots (choose any two versions to compare)
  • Terminal-style web interface (for easy browsing and diff viewing)
  • Secure authentication (unique password per installation)

πŸ› οΈ Installation

Quick Install (Recommended)

curl -fsSL https://raw.githubusercontent.com/mrvi0/conf-watch/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

The installer automatically:

  • Installs to ~/.confwatch/
  • Adds confwatch to your PATH
  • Creates virtual environment, config, repo, web interface
  • Generates a unique password for the web interface

Development Install

git clone https://github.com/mrvi0/conf-watch.git
cd conf-watch
./install-dev.sh
Enter fullscreen mode Exit fullscreen mode

πŸ“ Configuration

Edit ~/.confwatch/config/config.yml:

# List of files to monitor
- ~/.bashrc
- ~/.zshrc
- ~/.ssh/config
- ~/.env
- /etc/nginx/nginx.conf
Enter fullscreen mode Exit fullscreen mode

πŸ’» CLI Usage

# List monitored files
confwatch list

# Create snapshot with comment
confwatch snapshot ~/.bashrc --comment "After installing nvm"

# Show differences
confwatch diff ~/.env

# Show file history
confwatch history /etc/nginx/nginx.conf

# Tag current version
confwatch tag ~/.bashrc "after-nvm-install"

# Rollback to specific version
confwatch rollback ~/.bashrc abc1234

# Start web interface
confwatch web --port 9000

# Reset web interface password
confwatch reset-password
Enter fullscreen mode Exit fullscreen mode

🌐 Web Interface

Run confwatch web and open http://localhost:8080

Features:

  • Secure authentication with unique password
  • Browse all monitored files
  • View change history with ability to compare any versions
  • Animated CLI demo
  • Terminal-style interface

πŸ” Security

New authentication system in v3.0.0:

  • Each installation gets a unique password
  • No default passwords
  • Easy reset via CLI
  • SHA-256 password hashing

πŸ“Š Project Structure

~/.confwatch/
β”œβ”€β”€ venv/                # Python virtual environment
β”œβ”€β”€ config/config.yml    # List of monitored files
β”œβ”€β”€ repo/                # Git repo with all file versions
β”œβ”€β”€ web/                 # Web UI static files
β”œβ”€β”€ confwatch            # Launcher script
└── confwatch-module/    # All Python code
Enter fullscreen mode Exit fullscreen mode

πŸ” Usage Examples

Monitoring dotfiles

confwatch snapshot ~/.bashrc ~/.zshrc --comment "Shell configuration update"
Enter fullscreen mode Exit fullscreen mode

Tracking service configurations

confwatch snapshot /etc/nginx/nginx.conf --comment "Nginx configuration changes"
Enter fullscreen mode Exit fullscreen mode

Comparing versions

confwatch diff ~/.env
confwatch history ~/.ssh/config
Enter fullscreen mode Exit fullscreen mode

πŸ†• What's New in v3.0.0

  • βœ… Secure authentication - unique password for each installation
  • βœ… Improved web interface - logout button and dynamic version
  • βœ… Password reset command - confwatch reset-password
  • βœ… Updated documentation - detailed README in English and Russian

🀝 Contributing

The project is open for contributions! If you have ideas or found bugs:

  1. Create an issue on GitHub
  2. Fork the repository
  3. Create a pull request

πŸ“š Documentation

Conclusion

ConfWatch is an excellent tool for system administrators, developers, and anyone who wants to control changes in configuration files. Simple installation, powerful functionality, and beautiful web interface make it an indispensable assistant in daily work.

Try ConfWatch and share your impressions in the comments!

Top comments (0)