Bash is a powerful tool (and widly available), but it's also a language that is easy to write in a way that is hard to read and maintain. As such Bash is used often but used as little as possible, resulting in poor quality scripts that are hard to maintain and understand.
Not only is this happaning as Bash is seen as a "glue" language, but also because there is no hardend styleguide, easy testing and good documentation around it.
The Google Shell Style Guide says it itself:
If you are writing a script that is more than 100 lines long, or that uses non-straightforward control flow logic, you should rewrite it in a more structured language now.
You can write bad code in every other language too, but there is lots of effort to make it better. So let's make it better for bash too. Let's make Bash a more structured language.
This is what argsh is trying to do. Check out the Quickstart to see how you can use it.
- First class citizen: Treat your scripts as first class citizens. They are important and should be treated as such.
- Be Consistent: Consistency is key. It makes your scripts easier to read and maintain.
- Perfect is the enemy of good: Don't try to make your scripts perfect. Make them good and maintainable.
- Write for the next person: Write your scripts for the next person that has to read and maintain them. This person might be you.
This project is in a very early stage. It's not even alpha. It's more like a concept. It's not even a concept, it's more like a thought. It's not even a thought, it's more like a dream. It's not even a dream, it's more like a wish.
Quote by Copilot
That beeing said, most of it is quite rough. But it's a start. The best time that you join the conversation and try to refine the concept.
- Make
.bin/argsh
more generic for other projects to use - Clean up the
www/
folder from unused medusajs files - Design a logo
- Provide a set of code snippets
- A complete styleguide
- Best practices (like error handling, logging, json, etc.)
- Generate and easy integration of tests
- Generate documentation
- Easy use of bash debugger
- Write a language server to lint and format bash code acording to the styleguide
- VSCode extension for the language server
- Easy bootstrap, minimal dependencies, easy to implement
- Convert shdoc to rust
- Convert obfus to rust or rewrite it in rust/shfmt, at least make it more robust (remove sed)
Argsh is released under the MIT license, which grants the following permissions:
- Commercial use
- Distribution
- Modification
- Private use
For more convoluted language, see the LICENSE. Let's build a better Bash experience together.
Thanks to the following tools and projects developing this project is possible:
- medusajs: From where the base of this docs, github and more is copied.
- Google Styleguide: Google's Shell Style Guide used as base for the argsh styleguide.
- Catppuccin: Base for the readme.md and general nice color palettes.
- bash-it: A Bash shell - autocompletion, themes, aliases, custom functions, and more.
Copyright © 2024-present Jan Guth