{"id":23138128,"url":"https://github.com/roman-koshchei/live-sh","last_synced_at":"2026-05-10T19:10:20.652Z","repository":{"id":226627773,"uuid":"769217413","full_name":"roman-koshchei/live-sh","owner":"roman-koshchei","description":"Live reloading with Bash for any language and any framework","archived":false,"fork":false,"pushed_at":"2024-03-09T08:14:42.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-17T13:09:48.209Z","etag":null,"topics":["bash","hot-reload","javascript","language-agnostic","live-reload"],"latest_commit_sha":null,"homepage":"https://github.com/roman-koshchei/live-sh","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/roman-koshchei.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}},"created_at":"2024-03-08T15:28:27.000Z","updated_at":"2024-03-09T08:16:19.000Z","dependencies_parsed_at":"2024-03-08T16:50:47.542Z","dependency_job_id":"9c6cdb2e-dca3-4172-bffb-2ae43f1ce1a4","html_url":"https://github.com/roman-koshchei/live-sh","commit_stats":null,"previous_names":["roman-koshchei/live-sh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman-koshchei%2Flive-sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman-koshchei%2Flive-sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman-koshchei%2Flive-sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman-koshchei%2Flive-sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roman-koshchei","download_url":"https://codeload.github.com/roman-koshchei/live-sh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157123,"owners_count":20893204,"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","hot-reload","javascript","language-agnostic","live-reload"],"created_at":"2024-12-17T13:09:51.098Z","updated_at":"2026-05-10T19:10:20.624Z","avatar_url":"https://github.com/roman-koshchei.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Live shell\n\n```\n __    ____  _  _  ____    ___  _   _\n(  )  (_  _)( \\/ )( ___)  / __)( )_( )\n )(__  _)(_  \\  /  )__)   \\__ \\ ) _ (\n(____)(____)  \\/  (____)()(___/(_) (_)\n```\n\nLive reloading with Bash for any language and any framework\n\n## Get started\n\nCopy [live.sh](./live.sh) into your project directory\n\n```bash\ncurl -o live.sh https://raw.githubusercontent.com/roman-koshchei/live-sh/main/live.sh\n```\n\nChange instructions inside of `run` function.\nNotice **long running process should be run in background and saved to previous_pid**.\nHere is example to run Gleam project, where `gleam run` is long running process:\n\n```bash\nrun() {\n  gleam run \u0026\n  previous_pid=$!\n  gleam format \u0026\n}\n```\n\nRun script with `./live.sh`. If you are on **Windows** then use `Git Bash` or `WSL`.\n\n## Browser reloading\n\nIf you are building web app you may want to automatically reload browser tab after live reloading project. For it you need to add javascript script to your site, don't forget to **disable it in production**.\n\nJust embed [live.js](./live.js) into your `head` like this:\n\n```html\n\u003chead\u003e\n  \u003cscript\u003e\n    document.addEventListener(\"visibilitychange\", function () {\n      \"visible\" === document.visibilityState \u0026\u0026\n        setTimeout(function () {\n          location.assign(location.href)\n        }, 250)\n    })\n  \u003c/script\u003e\n\u003c/head\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froman-koshchei%2Flive-sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froman-koshchei%2Flive-sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froman-koshchei%2Flive-sh/lists"}