{"id":14235782,"url":"https://github.com/chris-rock/vesper","last_synced_at":"2025-07-12T05:10:28.635Z","repository":{"id":145632725,"uuid":"223768695","full_name":"chris-rock/vesper","owner":"chris-rock","description":"🍸Vesper - HTTP Framework for Bash Shell","archived":false,"fork":false,"pushed_at":"2019-11-28T08:25:22.000Z","size":455,"stargazers_count":210,"open_issues_count":1,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-12T02:51:19.436Z","etag":null,"topics":["bash","bourne-shell","framework","http","shell"],"latest_commit_sha":null,"homepage":"https://lollyrock.com/posts/vesper-intro-bash-shell-http-framework/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chris-rock.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}},"created_at":"2019-11-24T15:47:24.000Z","updated_at":"2025-03-02T16:46:34.000Z","dependencies_parsed_at":"2023-07-12T11:31:40.056Z","dependency_job_id":null,"html_url":"https://github.com/chris-rock/vesper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-rock%2Fvesper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-rock%2Fvesper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-rock%2Fvesper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-rock%2Fvesper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-rock","download_url":"https://codeload.github.com/chris-rock/vesper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249006523,"owners_count":21197289,"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","bourne-shell","framework","http","shell"],"created_at":"2024-08-20T21:02:21.057Z","updated_at":"2025-04-15T04:32:18.597Z","avatar_url":"https://github.com/chris-rock.png","language":"Shell","readme":"# Vesper - HTTP Framework for Bash Shell\n\n![Vesper Logo](assets/logo.png)\n\n`vesper` is a collection of shell functions to make it super easy to generate valid http responses. Vesper is not a web server itself, its just the framework to parse http requests and generate valid responses. \n\n## This is crazy, who needs a http framework for unix shell?\n\nThat is a very good question! If you would have asked me that question a year ago, I would have argued: nobody. Now, I am not sure anymore. How will sh/bash scripts work in the future of cloud and serverless? Consider reading my blog [Introducing Vesper - HTTP Framework for Unix Shell](https://lollyrock.com/posts/vesper-intro-bash-shell-http-framework/).\n\n## Get Started\n\n**Hello World**\n\n```bash\nsource \"vesper.sh\"\n\n# parses the http request\nhttp_request\n\n# generate the response\nhttp_response StatusOK \"text/plain\"\necho 'Hello World'\necho $HTTP_REQUEST_URI\n```\n\n**Generate an Image**\n\n```bassh\nsource \"vesper.sh\"\n\nhttp_response StatusOK \"image/jpeg\"\necho \"James Bond\" | convert -font Arial -pointsize 72 -fill white -background black text:- -trim png:- \u003e\u00261\n```\n\n**Seeing is believing**\n\n```bash\n# hello world example\nncat -lk -p 8081 --sh-exec examples/helloworld.sh\n\n# json example\nncat -lk -p 8081 --sh-exec examples/json.sh\n\n# image example\nncat -lk -p 8081 --sh-exec examples/image.sh\n\n# pdf example\nncat -lk -p 8081 --sh-exec examples/pdf.sh\n\n# file streaming example\nncat -lk -p 8081 --sh-exec examples/file_stream.sh\n\n# router example\nncat -lk -p 8081 --sh-exec examples/router.sh\n```\n\n## Examples\n\n * [Text](./examples/helloworld.sh)\n * [JSON](./examples/json.sh)\n * [Image](./examples/image.sh)\n * [PDF](./examples/pdf.sh)\n * [File Stream](./examples/file_stream.sh)\n * [Router](./examples/router.sh)\n\nTo see all the examples in place justs run:\n\nStart the server\n\n```bash\n# download the test pdf\nwget http://tiswww.case.edu/php/chet/bash/rose94.pdf\n\n# start the server\nncat -lk -p 8081 --sh-exec ./examples/router.sh\n```\n\n![vesper cli](assets/vesper_cli.png)\n\nVisit the url localhost:8081\n\n![vesper browser output](assets/vesper_browser.png)\n\n## Dependencies\n\n- `ncat` - used to execute the bash scripts on incoming requests\n- `cat` - used to pipe file content\n- `file` - used to determine the mime type\n- `stat` -  used to determine the file size\n\n**Debian**\n\n```bash\napt-get install ncat\napt-get install file\n```\n\n**Centos**\n\n```bash\nyum install nmap\nyum install file\n```\n\n**Mac**\n\n```bash\nbrew install nmap\n```\n\n## FAQ\n\n**Why is the project named vesper?**\n\nPopular web frameworks like [martini](https://github.com/go-martini/martini) and [gin](https://github.com/gin-gonic/gin) are named after cocktails and one of James Bond's famous cocktails is called vesper.\n\n**Is vesper production ready?**\n\nIts build on tooling that is around for decades. The foundation is battle-tested. While this is the case, its not designed for web-scale workloads.\n\n**Should I switch from my popular http framework X to vesper?**\n\nMost likely not\n\n**Are there limitations**\n\nAt this point, its only tested with http GET methods\n\n## Open questions\n\n* What is the best way to handle execution errors?\n* What is the stable way to verify http query params?\n\n## Authors\n\n* **Christoph Hartmann** - *Research \u0026 Prototype* - [chris-rock](https://github.com/chris-rock)\n\nSee also the list of [contributors](https://github.com/chris-rock/vesper/contributors) who participated in this project.\n\n## Sponsors\n\nThe research and the development was sponsored by [mondoo](https://mondoo.io/)\n\n## License\n\nThis project is licensed under the Apache 2 License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n[shinatra](https://github.com/benrady/shinatra) and [bashttpd](https://github.com/avleen/bashttpd) also prototyped around http in bash.\n","funding_links":[],"categories":["Shell","Downloading and Serving"],"sub_categories":["Directory Navigation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-rock%2Fvesper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-rock%2Fvesper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-rock%2Fvesper/lists"}