{"id":29143869,"url":"https://github.com/nickjj/lcurl","last_synced_at":"2025-06-30T20:39:38.040Z","repository":{"id":146281560,"uuid":"437304613","full_name":"nickjj/lcurl","owner":"nickjj","description":"Visit a site every X seconds in a loop to help detect downtime while testing deployment strategies.","archived":false,"fork":false,"pushed_at":"2025-03-06T16:52:17.000Z","size":14,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T01:47:51.825Z","etag":null,"topics":["bash","curl","http"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/nickjj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-12-11T14:30:15.000Z","updated_at":"2025-03-06T16:52:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"03eaf69c-0997-4390-bcd2-72d7aa9ef691","html_url":"https://github.com/nickjj/lcurl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nickjj/lcurl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Flcurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Flcurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Flcurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Flcurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickjj","download_url":"https://codeload.github.com/nickjj/lcurl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Flcurl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262847700,"owners_count":23374055,"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":["bash","curl","http"],"created_at":"2025-06-30T20:39:34.381Z","updated_at":"2025-06-30T20:39:38.029Z","avatar_url":"https://github.com/nickjj.png","language":"Shell","readme":"# What is lcurl? ![CI](https://github.com/nickjj/lcurl/workflows/CI/badge.svg?branch=main)\n\nIt's a Bash script (yep it uses Bash features) that runs a specific curl\ncommand X number of times in a loop. It will report back the HTTP status code,\nhow long it took to get a response, a timestamp and the loop count.\n\nHere's an example of visiting \u003chttps://example.com\u003e every 250ms for a max of 5\ntimes:\n\n```sh\nlcurl https://example.com 0.25 5\n```\n\nRunning the above command will produce this output:\n\n```sh\n200 | 0.069927s | 2021-12-11T08:47:00 | 1/5\n200 | 0.063947s | 2021-12-11T08:47:00 | 2/5\n200 | 0.060945s | 2021-12-11T08:47:01 | 3/5\n200 | 0.068982s | 2021-12-11T08:47:01 | 4/5\n200 | 0.066179s | 2021-12-11T08:47:01 | 5/5\n```\n\nIf you omit the max number of times it will run `999999` times. The URL and\ndelay (in seconds) are required.\n\nYou can also combine lcurl with grep to filter out specific responses, such as\nonly outputting unexpected errors:\n\n```sh\n# This filters any non-200 response which could be useful to find 502/503/504s.\nlcurl https://example.com 0.25 5 | grep -v \"^2\"\n```\n\n## Demo Video\n\nThis video covers why I created the script, using it, installing it and how\nit's implemented using a bit of shell scripting.\n\n[![Demo\nVideo](https://img.youtube.com/vi/um24VlkkqGo/0.jpg)](https://www.youtube.com/watch?v=um24VlkkqGo)\n\n## Installation\n\nSince this script uses curl you'll need to have `curl` installed beforehand.\nIt's available with most package managers depending on your OS. For example you\ncan apt, brew, pacman or yum install curl.\n\nThen all you have to do is download this `lcurl` script, make sure it's\nexecutable and place it somewhere on your system path.\n\n#### 1 liner to get `lcurl` downloaded to `/usr/local/bin`:\n\n```sh\nsudo curl \\\n  -L https://raw.githubusercontent.com/nickjj/lcurl/0.1.1/lcurl \\\n  -o /usr/local/bin/lcurl \u0026\u0026 sudo chmod +x /usr/local/bin/lcurl\n```\n\nThat will download the latest release. If you want to download the bleeding\nedge version you can replace the *version number* with *main* in the above\ncommand.\n\nConfirm it works by running `lcurl`. You'll be greeted with a help menu that\nshows an example on how to use it.\n\n## FAQ\n\n### When would you use this script?\n\nThis could be useful to help make sure you're able to perform zero downtime\ndeployments of your application. As you roll-out a new version of your app you\ncan use this script to hit your site to make sure it always responds back with\n200s.  That's the exact use case of why I created this script but I'm sure\nthere's other use cases that you can use this for too.\n\n### When wouldn't you use this script?\n\nIf you want to get high precision benchmarks or are profiling an application\nthere are much better tools for this such as [wrk](https://github.com/wg/wrk).\n`lcurl` reports back how long it took to receive a response but that's mainly\nbecause \"why not\". It's nice to have and it took about a minute to implement\nbecause it's a value that's provided by curl.\n\n### Why did you name the script `lcurl` and not `curll`?\n\nI didn't want TAB completing `curl` to give you the option of running this\nscript because let's be real now, most of the time if you type out `cur` your\nintent is to run `curl` not this script.\n\n## About the Author\n\nI'm a self taught developer and have been freelancing for the last ~20 years.\nYou can read about everything I've learned along the way on my site at\n[https://nickjanetakis.com](https://nickjanetakis.com/). There's hundreds of\n[blog posts](https://nickjanetakis.com/blog/) and a couple of [video\ncourses](https://nickjanetakis.com/courses/) on web development and deployment\ntopics. I also have a [podcast](https://runninginproduction.com) where I talk\nto folks about running web apps in production.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjj%2Flcurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickjj%2Flcurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjj%2Flcurl/lists"}