base on Compile shell scripts to static binaries. <div align="center">
<img width="200" src="./docs/public/logo.png"/>
# Bunster
</div>
<div align="center">
[](https://github.com/yassinebenaid/bunster/actions/workflows/ci.yml)
[](https://bunster.netlify.app)
</div>
A shell compiler that converts shell scripts into secure, portable and static binaries. Unlike other tools (ie. [shc](https://github.com/neurobin/shc)), Bunster does not just wrap your script within a binary. It literally compiles them to standalone shell-independent programs.
Under the hood, **Bunster** transpiles shell scripts into [Go](https://go.dev) code. Then uses the [Go Toolchain](https://go.dev/dl) to compile the code to an executable.
**Bunster** aims to be compatible with `bash` as a starting move. Expecting that most `bash` scripts will just work with bunster. Additional shells will be supported as soon as we release v1.
> [!WARNING]
> This project is in its early stages of development. [Only a subset of features are supported so far](https://bunster.netlify.app/features/simple-commands).
## Features
In addition to being compatible with bash. bunster offers a lot of additional features that empower its uniqueness:
- **Static binaries**: scripts compiled with bunster are not just wrappers around your script, nor do they rely on any external shells on your system.
- **Modular**: unlike traditional shells scripts that are written in a single file. bunster offers a module system that allows you to distribute code across as many files as needed. [learn more](https://bunster.netlify.app/workspace/modules)
- **Package Manager**: bunster has a buitlin package manager that makes it easy to publish and consume modules as libraries. [learn more](https://bunster.netlify.app/workspace/modules)
- **Native `.env` files support**: `.env` files are nativily supported in bunster. Allowing you to load variables from `.env` files at runtime. [learn more](https://bunster.netlify.app/features/environment-files)
- **Static assets embedding**: bunster allows you to embed files and directories within your compiled program at compile time. And use them as if they were normal files in the system at runtime. [learn more](https://bunster.netlify.app/features/embedding)
- **Builtin flags parsing**: You no longer have to bother your self parsing flags manually. Just declare what flags you expect, and let bunster do the rest. [learn more](https://bunster.netlify.app/features/functions#flags)
- **Static analysis**: bunster statically analizes your scripts and reports potential bugs at compile time. (_wip_)
## Get Started
<img src="./docs/public/bunster.gif"/>
[Learn more about the usage of bunster.](https://bunster.netlify.app)
## Installation
We have bash script that installs `bunster` and adds it to your `$PATH`.
```shell
curl -f https://bunster.netlify.app/install.sh | bash
```
The script will install bunster at `~/.local/bin/bunster` on linux. And `~/bin/bunster` on mac. If you want to install the binary system wide and make it accessible by all users.
```shell
curl -f https://bunster.netlify.app/install.sh | GLOBAL=1 bash
```
> [!WARNING]
> Do not trust scripts downloaded from the internet. A quick look at the code before running it won't hurt.
Checkout the [documentation](https://bunster.netlify.app/installation) for different ways of installation.
## Versioning
Bunster follows [SemVer](https://semver.org/) system for release versioning. On each minor release `v0.x.0`, you should expect adding new features, code optimization, and build improvements. On each patch release `v0.N.x`, you should expect bug fixes and/or other minor enhancements.
Once we reach the stable release `v1.0.0`, you must expect your bash scripts to be fully compatible with Bunster (there might be some caveats). All features mentioned above to be implemented unless the community agreed on skipping some of them.
Adding support for additional shells is not planned until our first stable release `v1`. All regarding contributions will remain open until then.
## Developers Guidline
If you are interested in this project and want to know more about it's underlying implementation. Or if you want to contribute back but you don't know where to start. [We have brief article](https://bunster.netlify.app/developers) that explains everything you need to get your hands dirty. Things like the project structure, packages and their concerns, how each component work and interact with other components, how to add new features, how to improve existing features, testing and anything else in this regard.
## Contributing
Thank you for considering contributing to the Bunster project! The contribution guide can be found in the [documentation](https://bunster.netlify.app/contributing).
This project is developed and maintained by the public community, which includes you. Anything in this repository is subject to criticism. Including features, the implementation, the code style, the way we manage code reviews, the documentation and anything else in this regard.
Hence, if you think that we're doing something wrong, or have a suggestion that can make this project better, please consider opening an issue.
## Code Of Conduct
In order to ensure that the Bunster community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/yassinebenaid/bunster/tree/master/CODE_OF_CONDUCT.md).
## Security
If you discover a security vulnerability within Bunster, please send an e-mail to Yassine Benaid via
[email protected]. All security vulnerabilities will be promptly addressed.
Please check out our [Security Policy](https://github.com/yassinebenaid/bunster/tree/master/SECURITY.md) for more details.
## License
The Bunster project is open-sourced software licensed under [The 3-Clause BSD License](https://opensource.org/license/bsd-3-clause).
", Assign "at most 3 tags" to the expected json: {"id":"12807","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"