{"id":21252690,"url":"https://github.com/atomicptr/crab","last_synced_at":"2025-07-11T01:33:07.251Z","repository":{"id":57562255,"uuid":"250316013","full_name":"atomicptr/crab","owner":"atomicptr","description":"🦀 A versatile tool to crawl dozens of URLs from a given source, like a sitemap or an URL list.","archived":false,"fork":false,"pushed_at":"2024-07-24T09:56:31.000Z","size":86,"stargazers_count":20,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-24T11:31:52.766Z","etag":null,"topics":["cache-warmer","cache-warmup","go","golang","sitemap","sitemap-check","url-monitor","web"],"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/atomicptr.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}},"created_at":"2020-03-26T16:45:35.000Z","updated_at":"2024-07-24T09:56:35.000Z","dependencies_parsed_at":"2024-07-24T11:22:04.700Z","dependency_job_id":null,"html_url":"https://github.com/atomicptr/crab","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Fcrab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Fcrab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Fcrab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Fcrab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomicptr","download_url":"https://codeload.github.com/atomicptr/crab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669642,"owners_count":17505386,"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":["cache-warmer","cache-warmup","go","golang","sitemap","sitemap-check","url-monitor","web"],"created_at":"2024-11-21T03:48:26.801Z","updated_at":"2024-11-21T03:48:27.385Z","avatar_url":"https://github.com/atomicptr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crab\n\n[![.github/workflows/build.yml](https://github.com/atomicptr/crab/actions/workflows/build.yml/badge.svg)](https://github.com/atomicptr/crab/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/atomicptr/crab)](https://goreportcard.com/report/github.com/atomicptr/crab)\n[![Coverage Status](https://coveralls.io/repos/github/atomicptr/crab/badge.svg?branch=master)](https://coveralls.io/github/atomicptr/crab?branch=master)\n\nA versatile tool to crawl dozens of URLs from a given source, like a sitemap or an URL list.\n\nUseful for:\n\n* Warming site caches\n* Checking response times\n* Identifying dead or broken pages\n\n## Install\n\n### Binaries\n\n[You can download the newest release from here for Linux (including .deb and .rpm), macOS and Windows.](https://github.com/atomicptr/crab/releases/)\n\n### Build Command (Personal \u0026 Development Usage)\n\n```bash\n#Linux (Debian/Ubuntu) \u0026 MacOS\n$ go build -o crab cmd/crab/main.go\n\n#Windows\n$ go build -o crab.exe cmd/crab/main.go\n```\n\n### Docker\n\n[Docker Hub](https://hub.docker.com/r/atomicptr/crab)\n\n```bash\n$ docker pull atomicptr/crab\n# Example\n$ docker run --rm atomicptr/crab --help\n$ docker run --rm atomicptr/crab crawl:sitemap https://domain.com/sitemap.xml\n```\n\n### Arch Linux\n\n[AUR](https://aur.archlinux.org/packages/crab-bin)\n\n### Nix\n\nNot available in nixpkgs but I have my own nix repository which you can use:\n\n```nix\nlet\n  atomicptr = import (fetchTarball \"https://github.com/atomicptr/nix/archive/refs/heads/master.tar.gz\") {};\nin\n{\n  environment.systemPackages = with pkgs; [\n    atomicptr.crab\n  ];\n}\n````\n\n### Homebrew\n\n```bash\n$ brew install atomictr/tools/crab\n```\n\n### Scoop\n\n```bash\n$ scoop bucket add atomicptr https://github.com/atomicptr/scoop-bucket\n$ scoop install crab\n```\n\n## Usage\n\nCrawl singular URLs:\n\n```bash\n$ crab crawl https://domain.com https://domain.com/test\n{\"status\": 200, \"url\": \"https://domain.com\", ...}\n...\n```\n\nCrawl through a sitemap:\n\n```bash\n$ crab crawl:sitemap https://domain.com/sitemap.xml\n```\n\nReplace all URLs with a different one:\n\n```bash\n$ crab crawl:sitemap https://domain.com/sitemap.xml --prefix-url=https://staging.domain.com\n```\n\nAdd some cookies/headers:\n\n```bash\n$ crab crawl:sitemap https://domain.com/sitemap.xml --cookie auth_token=12345 --header X-Bypass-Cache=1\n```\n\n### Filter by Status Code\n\nYou can filter the output by it's status code\n\n```bash\n# This will only return responses with a 200 OK\n$ crab crawl:sitemap https://domain.com/sitemap.xml --filter-status=200\n# This will only return responses that are not OK\n$ crab crawl:sitemap https://domain.com/sitemap.xml --filter-status=!200\n# This will only return responses between 500-599 (range)\n$ crab crawl:sitemap https://domain.com/sitemap.xml --filter-status=500-599\n# This will only return responses with 200 or 404 (multiple, be aware if one condition is true they all are)\n$ crab crawl:sitemap https://domain.com/sitemap.xml --filter-status=200,404\n# This will only return responses with a code greater than 500\n$ crab crawl:sitemap https://domain.com/sitemap.xml --filter-status=\u003e500\n```\n\n### Save Url List in File\n\nYou can save the url list to a file\n\n```bash\n# This will save the output to a file called output.txt\n$ crab crawl:sitemap https://domain.com/sitemap.xml --output-file ./output/output.txt\n```\n\n### Save Output to JSON\n\nYou can save the output to a JSON file\n\n```bash\n# This will save the output to a file called output.json\n$ crab crawl:sitemap https://domain.com/sitemap.xml --output-json ./output/output.json\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicptr%2Fcrab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomicptr%2Fcrab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicptr%2Fcrab/lists"}