{"id":27775754,"url":"https://github.com/nemuizzz/hawkeye","last_synced_at":"2025-09-02T22:38:03.109Z","repository":{"id":290431180,"uuid":"974410818","full_name":"nemuizzz/hawkeye","owner":"nemuizzz","description":"A simple yet powerful URL monitoring tool. Track changes in multiple websites with a single command or integrate with your Go applications.","archived":false,"fork":false,"pushed_at":"2025-04-28T19:20:32.000Z","size":1050,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T20:26:33.990Z","etag":null,"topics":["cli","detection","devops","go","monitoring","url-monitoring","web-change","website-monitor"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nemuizzz.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-04-28T18:27:17.000Z","updated_at":"2025-04-28T19:24:24.000Z","dependencies_parsed_at":"2025-04-28T20:27:43.728Z","dependency_job_id":"daf7f150-5e1b-4b77-a7af-19f70934dc6e","html_url":"https://github.com/nemuizzz/hawkeye","commit_stats":null,"previous_names":["nemuizzz/hawkeye"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemuizzz%2Fhawkeye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemuizzz%2Fhawkeye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemuizzz%2Fhawkeye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemuizzz%2Fhawkeye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nemuizzz","download_url":"https://codeload.github.com/nemuizzz/hawkeye/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251639652,"owners_count":21619809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","detection","devops","go","monitoring","url-monitoring","web-change","website-monitor"],"created_at":"2025-04-30T04:21:34.436Z","updated_at":"2025-04-30T04:21:35.191Z","avatar_url":"https://github.com/nemuizzz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hawkeye\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"Hawkeye Logo\" width=\"100\" height=\"100\"\u003e\n\u003c/p\u003e\n\nA simple yet powerful URL monitoring tool that helps you track changes in web content. Use it as a Go package in your code or as a command-line tool. Monitor multiple URLs simultaneously with a single command.\n\n## What Can Hawkeye Do?\n\n- Watch multiple websites for changes at once\n- Alert you when content changes on any monitored URL\n- Run as a program or use in your Go code\n- Customize how and what to monitor for each URL\n\n## Quick Start\n\n### Install\n\n```bash\n# Install the command-line tool\ngo install github.com/nemuizzz/hawkeye/cmd/hawkeye@latest\n\n# Or use as a Go package\ngo get github.com/nemuizzz/hawkeye\n```\n\n### Basic Usage\n\n```bash\n# Watch a single website\nhawkeye watch https://example.com\n\n# Watch multiple websites\nhawkeye watch https://example1.com https://example2.com https://example3.com\n\n# Watch with custom settings\nhawkeye watch https://example.com --interval 1m --ignore \".ads,#footer\"\n\n# Ignore whitespace changes\nhawkeye watch https://example.com --normalize\n\n# Ignore timestamp changes\nhawkeye watch https://example.com --ignore-timestamps\n```\n\n### Use in Go Code\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/nemuizzz/hawkeye\"\n    \"time\"\n    \"context\"\n)\n\nfunc main() {\n    // List of URLs to monitor\n    urls := []string{\n        \"https://example1.com\",\n        \"https://example2.com\",\n        \"https://example3.com\",\n    }\n\n    // Create a cancellable context\n    ctx, cancel := context.WithCancel(context.Background())\n    defer cancel() // Ensure we cancel when done\n\n    // Monitor each URL\n    for _, url := range urls {\n        // Check every 5 minutes\n        monitor := hawkeye.NewMonitor(url, time.Minute*5)\n\n        // Start monitoring in a goroutine\n        go func(m *hawkeye.Monitor, url string) {\n            // Channel to receive change notifications\n            changes := m.Start()\n\n            // Watch for changes\n            for {\n                select {\n                case change := \u003c-changes:\n                    if change.HasChanged {\n                        fmt.Printf(\"Change detected on %s at %s\\n\",\n                            url,\n                            change.Timestamp.Format(time.RFC3339))\n                    }\n                case \u003c-ctx.Done():\n                    // Stop monitoring when context is cancelled\n                    fmt.Printf(\"Stopped monitoring %s\\n\", url)\n                    return\n                }\n            }\n        }(monitor, url)\n    }\n\n    // Simple user interaction\n    fmt.Println(\"Monitoring started. Press Enter to stop...\")\n    fmt.Scanln()\n}\n```\n\n**Simplified Example (Single URL)**:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/nemuizzz/hawkeye\"\n    \"time\"\n)\n\nfunc main() {\n    // Monitor a single URL every 5 minutes\n    monitor := hawkeye.NewMonitor(\"https://example.com\", time.Minute*5)\n\n    // Start monitoring and display changes\n    changes := monitor.Start()\n    fmt.Println(\"Monitoring started. Press Ctrl+C to exit...\")\n\n    for change := range changes {\n        if change.HasChanged {\n            fmt.Printf(\"Change detected at %s\\n\",\n                change.Timestamp.Format(time.RFC3339))\n\n            // You can access more details about the change\n            if change.StatusCode \u003e 0 {\n                fmt.Printf(\"  Status code: %d\\n\", change.StatusCode)\n            }\n            if change.Details != \"\" {\n                fmt.Printf(\"  Details: %s\\n\", change.Details)\n            }\n        }\n    }\n}\n```\n\n## Features\n\n### Core Features\n\n- Watch multiple URLs simultaneously\n- Set how often to check (1 second to 24 hours)\n- Get alerts when content changes on any URL\n- Choose output format (text or JSON)\n\n### Advanced Features\n\n- Ignore specific parts of the page\n- Add custom headers (like authentication)\n- Save results to a file\n- Different settings for each URL\n- Group URLs for easier management\n- Normalize whitespace to avoid false positives\n- Ignore timestamp changes to prevent false alerts\n- View detailed change information including what exactly changed\n\n## Command Line Options\n\n```bash\nhawkeye watch [URLs...] [options]\n\nOptions:\n  -i, --interval     How often to check (default: 5m)\n  -f, --format      Output format (text/json)\n  -t, --timeout     How long to wait for response\n  -h, --header      Add custom headers\n  -ig, --ignore     Parts of page to ignore\n  -o, --output      Save results to file\n  -g, --group       Group name for URLs\n  -r, --retries     Number of retry attempts\n  -R, --retry-interval Time between retries\n  -n, --normalize   Normalize whitespace to ignore insignificant changes\n  -T, --ignore-timestamps Ignore timestamps when comparing content\n      --help        Show help\n\nhawkeye list [options]\n\nOptions:\n  -f, --format      Output format (text/json)\n  -g, --group       Filter by group name\n```\n\n## Examples\n\n### Watch Multiple News Sites\n\n```bash\n# Check multiple news sites every minute\nhawkeye watch \\\n    https://news1.example.com \\\n    https://news2.example.com \\\n    https://news3.example.com \\\n    --interval 1m \\\n    --ignore \".ads\" \\\n    --group \"news-sites\"\n```\n\n### Watch Different Types of Sites\n\n```bash\n# Watch news and API endpoints\nhawkeye watch \\\n    --group \"news\" \\\n    https://news.example.com \\\n    --interval 1m \\\n    --ignore \".ads\" \\\n    --group \"api\" \\\n    https://api.example.com/data \\\n    --header \"Authorization: Bearer token\" \\\n    --interval 5m\n```\n\n### Save Results for Multiple Sites\n\n```bash\n# Watch multiple pages and save results\nhawkeye watch \\\n    https://example.com/page1 \\\n    https://example.com/page2 \\\n    --output changes.json \\\n    --format json\n```\n\n## Development\n\n### Setup\n\n1. Get the code: `git clone https://github.com/nemuizzz/hawkeye.git`\n2. Install: `go mod download`\n3. Test: `go test ./...`\n4. Build: `go build ./...`\n\n### Project Structure\n\n```\nhawkeye/\n├── .github/           # GitHub Actions workflows\n├── cmd/               # Command-line interface\n│   └── hawkeye/       # Hawkeye CLI implementation\n│       ├── commands/  # Command implementations\n│       └── main.go    # Entry point\n├── pkg/               # Public packages\n│   ├── http/          # HTTP utilities\n│   ├── monitor/       # Core monitoring functionality\n│   ├── utils/         # Common utilities\n│   └── version/       # Version information\n└── internal/          # Private implementation details\n```\n\n### Building and Releasing\n\n```bash\n# Build from source with version information\nmake build\n\n# Run tests\nmake test\n\n# Install locally\nmake install\n\n# Create a new release (tag must be in vX.Y.Z format)\nmake release TAG=v0.1.0\n```\n\nThe project uses GitHub Actions for CI/CD:\n\n- Automatic testing and building on every pull request\n- Automatic releases when a new tag is pushed\n- Cross-platform binaries built for Linux, macOS, and Windows\n\n### Contributing\n\n1. Fork the repo\n2. Make your changes\n3. Run tests\n4. Send a pull request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemuizzz%2Fhawkeye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnemuizzz%2Fhawkeye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemuizzz%2Fhawkeye/lists"}