//CyclopStarebyAnsh-Sarkar

CyclopStare

CyclopStare is a lightweight, cross-platform site change detection tool 🦀✨ written in Rust. It lets you 👁️ stare at one or more webpages 🌐, track their content over time ⏱️, and detect when something actually changes ⚠️ using hashes 🔐 instead of noisy diffs 📝❌.

1
0
1
Rust

CyclopStare 👁️

CyclopStare is a lightweight, cross-platform site change detection tool 🦀✨ written in Rust. It lets you 👁️ stare at one or more webpages 🌐, track their content over time ⏱️, and detect when something actually changes ⚠️ using hashes 🔐 instead of noisy diffs 📝❌.

✨ Features

  • 🔍 Monitor single URLs or a list of URLs
  • 🧠 Detect changes using SHA-256 hashes (content-based, not timestamp-based)
  • 📂 Per-site logging with automatic file management
  • 🪟 Fully Windows / Linux / macOS compatible
  • ⚡ Fast, minimal, and dependency-light

🛠 How it works

  1. Fetches webpage HTML
  2. Extracts readable content (currently <p> tags)
  3. Hashes the content using SHA-256
  4. Stores hashes with timestamps in per-site log files
  5. Compares the last two hashes to detect changes

📁 Project structure

cyclopstare/
├── src/
│ ├── main.rs # Entry point
│ ├── cli.rs # CLI argument parsing
│ ├── fetch.rs # HTTP fetching & HTML parsing
│ ├── hash.rs # SHA-256 utilities
│ ├── detect.rs # Change detection logic
│ ├── storage.rs # File I/O & logging
│ └── util.rs # Path resolution & timestamps
├── logs/ # Auto-created per-site logs
├── config/
│ └── starefile # List of URLs to monitor
└── Cargo.toml

🚀 Installation

undefinedRequirements: Rust (stable) + Cargo. Install Rust from: https://rustup.rs

▶️ Usage

  • undefinedBuild: cargo build
  • undefinedRun: cargo run -- <command>

📌 Commands

🔹 Stare at a single URL

cargo run -- --stare https://example.com

🔹 Stare at multiple URLs from a file

cargo run -- --starefile config/starefile

config/starefile should contain one URL per line.

🔹 Reset a single site’s log

cargo run -- --reset <site_hash>

🔹 Reset all sites listed in a starefile

cargo run -- --resetstarefile config/starefile

📂 Logs

  • Logs are stored in the logs/ directory
  • Each file is named using the SHA-256 hash of the URL
  • Log format:
<URL>
<timestamp> <content_hash>
<timestamp> <content_hash>

🧪 Example output

Resolved starefile path: C:\...\CyclopStare\config\starefile
[Opening File]: C:\...\CyclopStare\config\starefile
⭕ Site change detected: https://example.com
✅ No change detected: https://another-site.com

🔮 Roadmap ideas

  • Async mode with Tokio
  • Configurable selectors (CSS-based)
  • Email / webhook notifications
  • JSON / CSV export
  • Diff previews

🤝 Contributing

PRs welcome. Keep it simple, readable, and Rusty.

[beta]v0.14.0