{"id":22246338,"url":"https://github.com/thgossler/webpagehost","last_synced_at":"2025-10-13T10:31:12.990Z","repository":{"id":59983685,"uuid":"495345802","full_name":"thgossler/WebPageHost","owner":"thgossler","description":"Simple Windows Command line (CLI) tool to open URLs in WebView2 (Microsoft Edge web browser control).","archived":false,"fork":false,"pushed_at":"2024-12-14T18:29:27.000Z","size":890,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-14T18:40:19.421Z","etag":null,"topics":["cli","hooks","javascript","webview2"],"latest_commit_sha":null,"homepage":"","language":"C#","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/thgossler.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":"2022-05-23T09:41:05.000Z","updated_at":"2024-12-14T18:29:31.000Z","dependencies_parsed_at":"2024-12-03T05:28:43.863Z","dependency_job_id":"1ae47c35-73eb-4623-a837-53548ad01ef7","html_url":"https://github.com/thgossler/WebPageHost","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FWebPageHost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FWebPageHost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FWebPageHost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FWebPageHost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thgossler","download_url":"https://codeload.github.com/thgossler/WebPageHost/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236332305,"owners_count":19132139,"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","hooks","javascript","webview2"],"created_at":"2024-12-03T05:27:12.949Z","updated_at":"2025-10-13T10:31:12.983Z","avatar_url":"https://github.com/thgossler.png","language":"C#","funding_links":["https://github.com/sponsors/thgossler","https://www.paypal.com/donate/?hosted_button_id=JVG7PFJ8DMW7J"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c/div\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eWebPageHost\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    Simple Windows Command line (CLI) tool to open URLs in WebView2 (Microsoft Edge web browser control).\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/thgossler/WebPageHost/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/thgossler/WebPageHost/issues\"\u003eRequest Feature\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/thgossler/WebPageHost#contributing\"\u003eContribute\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/sponsors/thgossler\"\u003eSponsor project\u003c/a\u003e\n    ·\n    \u003ca href=\"https://www.paypal.com/donate/?hosted_button_id=JVG7PFJ8DMW7J\"\u003eSponsor via PayPal\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About The Project\n\nThis is a Windows simple command line interface (CLI) tool for opening web page URLs in an embedded Microsoft WebView2 control. It has a variety of options to control the behavior of the window and the embedded web browser. Further, it supports customization of the output via JavaScript which allows, for example, to use it for letting the user select anything from the web page and return it as result on standard output.\n\n[![WebPageHost Screen Shot #1][product-screenshot]]([https://github.com/thgossler/WebPageHost/])\n\n[![WebPageHost Screen Shot #2][product-screenshot2]]([https://github.com/thgossler/WebPageHost/])\n\n\u003e _**Note:** This tool was written by me in my spare time and will be developed only sporadically._\n\n### Built With\n\n* [.NET 9 (C#)](https://dotnet.microsoft.com/en-us/)\n* [WinForms](https://github.com/dotnet/winforms)\n* [WebView2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)\n* [Spectre Console Cli](https://github.com/spectreconsole/spectre.console)\n* [InputSimulator.Core](https://github.com/cwevers/InputSimulatorCore)\n\n\u003e _**Note**: I would like to make this tool also available on Linux some day. I have chosen WinForms initially because it was the fasted way for me to put this tool together :smiley:, it is open source and is still supported by Microsoft. And, I still haven't given up hope that it will eventually be available on Linux including the WebView2 wrapper control. In case WPF or MAUI should be available on Linux earlier than WinForms, the source code should be migrated. Alternatively, [Avalonia UI](https://avaloniaui.net/) could be considered._\n\n## Getting Started\n\n### Prerequisites\n\n* Latest .NET SDK\n\n  ```sh\n  winget install -e --id Microsoft.dotnet\n  ```\n\n* Microsoft Edge WebView2 (if not already installed with the operating system)\u003cbr/\u003e\n  https://go.microsoft.com/fwlink/p/?LinkId=2124703\n\n### Installation as Tool for Use\n\n1. Download the [self-contained single executable file]([https://github.com/thgossler/WebPageHost/releases/download/v1.0.3/WebPageHost.exe) from the [releases](https://github.com/thgossler/WebPageHost/releases) section\n\n2. Copy it to a location where you can easily call it, perhaps in a folder which is in your PATH environment variable\n\n3. Open a command prompt or PowerShell and type `WebPageHost open --help`\n\n4. Try the following simple example:\n\n   ```shell\n   WebPageHost open https://github.com/thgossler/WebPageHost#readme\n   ```\n\n5. Try the following more complicated example:\n\n   ```shell\n   WebPageHost open \"https://github.com/trending?since=monthly\u0026spoken_language_code=en\" -z 0.7 -s 800x1024 -x \"const regex = new RegExp('github.com\\\\/([^\\\\/]+\\\\/[^\\\\/]+)', 'gm'); let m = regex.exec(window.location.host+window.location.pathname); 'Selected GitHub project: '+(m !== null ? m[1] : 'none');\" --ontop\n   ```\n\n### Installation from Source for Development\n\n1. Clone the repo\n\n   ```sh\n   git clone https://github.com/thgossler/WebPageHost.git\n   ```\n\n2. Build\n\n   ```sh\n   dotnet build\n   ```\n\n3. Run without arguments to get help\n\n   ```sh\n   dotnet run\n   ```\n\nAlternatively, you can open the folder in [VS Code](https://code.visualstudio.com/) or the solution (.sln file) in the [Microsoft Visual Studio IDE](https://visualstudio.microsoft.com/vs/) and press F5.\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star :wink: Thanks!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Donate\n\nIf you are using the tool but are unable to contribute technically, please consider promoting it and donating an amount that reflects its value to you. You can do so either via PayPal\n\n[![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=JVG7PFJ8DMW7J)\n\nor via [GitHub Sponsors](https://github.com/sponsors/thgossler).\n\n## License\n\nDistributed under the MIT License. See [`LICENSE`](https://github.com/thgossler/WebPageHost/blob/main/LICENSE) for more information.\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES (https://www.markdownguide.org/basic-syntax/#reference-style-links) --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/thgossler/WebPageHost.svg\n[contributors-url]: https://github.com/thgossler/WebPageHost/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/thgossler/WebPageHost.svg\n[forks-url]: https://github.com/thgossler/WebPageHost/network/members\n[stars-shield]: https://img.shields.io/github/stars/thgossler/WebPageHost.svg\n[stars-url]: https://github.com/thgossler/WebPageHost/stargazers\n[issues-shield]: https://img.shields.io/github/issues/thgossler/WebPageHost.svg\n[issues-url]: https://github.com/thgossler/WebPageHost/issues\n[license-shield]: https://img.shields.io/github/license/thgossler/WebPageHost.svg\n[license-url]: https://github.com/thgossler/WebPageHost/blob/main/LICENSE\n[product-screenshot]: images/screenshot.jpg\n[product-screenshot2]: images/screenshot2.jpg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthgossler%2Fwebpagehost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthgossler%2Fwebpagehost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthgossler%2Fwebpagehost/lists"}