{"id":13552819,"url":"https://github.com/smallhadroncollider/brok","last_synced_at":"2025-10-21T13:52:51.983Z","repository":{"id":62435645,"uuid":"165045130","full_name":"smallhadroncollider/brok","owner":"smallhadroncollider","description":"Find broken links in text documents","archived":false,"fork":false,"pushed_at":"2023-03-06T10:48:55.000Z","size":964,"stargazers_count":427,"open_issues_count":13,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-17T22:49:54.565Z","etag":null,"topics":["broken-links","command-line","text-files"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smallhadroncollider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"roadmap.md","authors":null},"funding":{"github":["smallhadroncollider"],"custom":["https://www.buymeacoffee.com/shc"]}},"created_at":"2019-01-10T11:06:30.000Z","updated_at":"2025-06-25T18:57:57.000Z","dependencies_parsed_at":"2024-01-12T20:03:50.990Z","dependency_job_id":null,"html_url":"https://github.com/smallhadroncollider/brok","commit_stats":{"total_commits":102,"total_committers":1,"mean_commits":102.0,"dds":0.0,"last_synced_commit":"bf62288d913af5fc694e683cc247f66426025400"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/smallhadroncollider/brok","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhadroncollider%2Fbrok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhadroncollider%2Fbrok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhadroncollider%2Fbrok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhadroncollider%2Fbrok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhadroncollider","download_url":"https://codeload.github.com/smallhadroncollider/brok/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhadroncollider%2Fbrok/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280166627,"owners_count":26283783,"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","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["broken-links","command-line","text-files"],"created_at":"2024-08-01T12:02:11.033Z","updated_at":"2025-10-21T13:52:51.951Z","avatar_url":"https://github.com/smallhadroncollider.png","language":"Haskell","readme":"# brök\n\nFind broken links in text documents\n\n![Demo](docs/brok-0.1.gif)\n\nSimilar idea to [awesome_bot](https://github.com/dkhamsing/awesome_bot), but with different output options.\n\nCurrently only supports `http://` and `https://` prefixed URLs\n\n## Install\n\n[Binaries for Mac and Linux are available](https://github.com/smallhadroncollider/brok/releases). Add the binary to a directory in your path (such as `/usr/local/bin`).\n\n### Docker\n\nTo build the latest version:\n\n```bash\ndocker build -t brok https://github.com/smallhadroncollider/brok.git\n```\n\nTo run brök:\n\n```bash\ndocker run brok\n```\n\n\n### Cabal\n\nIf you have `cabal` installed:\n\n```bash\ncabal install brok\n```\n\nMake sure you run `cabal update` if you haven't run it recently.\n\n### Building\n\n**Requirements**: [Stack](https://docs.haskellstack.org/en/stable/README/)\n\nThe following command will build brök and then install it in `~/.local/bin`:\n\n```bash\nstack build \u0026\u0026 stack install\n```\n\n## Usage\n\n### Basic Usage\n\nCheck all links in a single text file:\n\n```bash\nbrok test.md\n```\n\nOr in multiple files:\n\n```bash\nbrok test.md links.tex\n```\n\nIf you're using this as part of a test suite, you probably only need the errors:\n\n```\nbrok text.md links.tex \u003e /dev/null\n```\n\n### Options\n\n#### Cache\n\nBy default brök will cache successes for a day in a `.brokdb` file. It will always recheck errors.\n\nIf you want to adjust the cache length, you can enter the number of seconds after which the cache invalidates:\n\n```bash\n# cache for a week\nbrok --cache 604800 test.md links.tex\n```\n\nIf you want to avoid creating the `.brokdb` file or ignore the cache entirely you can use the `--no-cache` option:\n\n```bash\n# do not cache results\n# and don't use previously generated cache\nbrok --no-cache test.md links.tex\n```\n\n#### Check Certificates\n\nMost browsers will display a website even if it has certificate issues (such as an incomplete certificate chain). By default Brök will not check certificates, so replicate this behaviour.\n\nIf you would like to enforce certificate checking, you can turn this on:\n\n```bash\nbrok --check-certs test.md\n```\n\nAny sites with certificate issues will then return a `Could not connect` error.\n\n#### Ignore URLs\n\nYou can tell brök to ignore URLs with specified prefixes:\n\n```bash\n# ignore facebook and amazon URLS\nbrok --ignore \"http://facebook.com\" \"http://amazon.com\" test.md links.tex\n```\n\n#### Interval\n\nBy default brök waits for 100ms between URL checks. You can change the delay:\n\n```bash\n# wait for 1 second between checks\nbrok --interval 1000 test.md links.tex\n```\n\n#### Only Show Failures\n\nIf you want to see what's going on, but you're not interested in successes, then you can use the `--only-failures` option:\n\n```bash\n# see what's going on, but only show failures\nbrok --only-failures test.md links.tex\n```\n\nIf you're using brök as part of a script then you should [redirect `stdout`](#basic-usage).\n\n### Colour Output\n\nBy default the output uses bash colour codes. You can turn this off using the `--no-color` setting.\n\n\n### Git Pre-Commit Hook\n\nIf you want to check all the links in your Git repo are valid before being able to commit then add something like the following to `.git/hooks/pre-commit`.\n\n#### `bash`\n\n```bash\n#! /bin/bash\n\n# cache for 1 week\n# use find to check all *.md files\n# only show errors (if there are any)\nbrok --cache 604800 $(find . -type f -name \"*.md\") \u003e /dev/null\n```\n\n#### `zsh`\n\n```bash\n#! /bin/zsh\n\n# cache for 1 week\n# using a zsh glob to check all *.md files\n# only show errors (if there are any)\nbrok --cache 604800 */**/*.md \u003e /dev/null\n```\n","funding_links":["https://github.com/sponsors/smallhadroncollider","https://www.buymeacoffee.com/shc"],"categories":["Haskell","Quality Assurance","others","Other","\u003ca name=\"text-processing\"\u003e\u003c/a\u003eText processing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhadroncollider%2Fbrok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhadroncollider%2Fbrok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhadroncollider%2Fbrok/lists"}