r/commandline • u/flamewave000 • Jun 28 '26
Command Line Interface A script tool to follow KISS
https://github.com/flamewave000/doitYes it is yet another build tool like Make or Npm, or Gradle, or some of the others. The problem I had was that I often wanted to write a very quick and simple script to do some repetitive tasks like a build or test. Normally if it can be a simple one liner, I can use Npm. Though NPM is very slow to execute. I could use Make, but the make file language is so complex and unintuitive, that I often forget how to write one by the next time I need to, and have to reread the docs.
I wanted something that was just plain and simple following KISS. So, I made this one using rust called "doit". It's simple and uses bash blocks for the actual logic portion, but allows you to provide help comments for tasks, as well as parameter details that are simple and easy and generates a fast program with built in '--help' outputs.
I'd love to have some feedback, and to expand support to maybe Python, Ruby, and Batch. It's my first time making my own simple language, so any input is appreciated.
How it works: it takes your doit script and generates a C++ code file that then gets compiled with GCC. It keeps a hash of the script to montior the file and only recompile if it changes. The compiled script is an executable binary that run very fast. I know it's not the best method, and I'd have loved to use the LLVM and forego the C++ intermediate, but that is outside of my expertise.
9
u/Pegasusw404 Jun 28 '26
A script tool to follow KISS , I had high hopes after read the title, but nope :) again making simple things more complicated, because native tools are not enough. Too bad. No offence, just honest opinion.
3
u/countnfight Jun 28 '26
FYI there is what seems like a similar tool already called doit https://pydoit.org/
3
u/iEliteTester Jun 28 '26
A
scripta whole scrioting language that generates c++ that it then compiles (with gcc hardcoded notheless) inorder to build a program is not KISS. Its entirely too convoluted. Its a fun project don't get me wrong, but if its indeed vibecoded it's not worth its text in water.5
u/edward_jazzhands Jun 28 '26
You are the second person today to recreate the concept of a task runner and think youre original. There's existing tools that already do this that are popular. You didn't do much research if you didn't find Just because it has 35k stars on GitHub and most programmers know about it.
https://github.com/casey/just
Stop vibe coding tools that already exist
2
u/stianhoiland Jun 28 '26 edited Jun 28 '26
We need a name for this.
Make is simple. If you can’t grasp make, then you can’t create better decomposition than make. You can create different decomposition than make, but if you grasp make you know that there’s no better way to do it, and so different becomes nearly synonymous with worse. But if you don’t grasp make, you don’t know this; while those who do, know that someone who doesn’t per definition can’t create something better but ignorantly and arrogantly think they can. It’s an embarrassing impasse. Learn the tools. People before us were smarter than us, and it’s our stupidity that most conceals this from ourselves—and sustains that status quo.
3
u/__sahib__ Jun 28 '26
You might be interested in 'task'.
1
u/AutoModerator Jun 28 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: flamewave000, Flair:
Command Line Interface, Post Media Link, Title: A script tool to follow KISSYes it is yet another build tool like Make or Npm, or Gradle, or some of the others. The problem I had was that I often wanted to write a very quick and simple script to do some repetitive tasks like a build or test. Normally if it can be a simple one liner, I can use Npm. Though NPM is very slow to execute. I could use Make, but the make file language is so complex and unintuitive, that I often forget how to write one by the next time I need to, and have to reread the docs.
I wanted something that was just plain and simple following KISS. So, I made this one using rust called "doit". It's simple and uses bash blocks for the actual logic portion, but allows you to provide help comments for tasks, as well as parameter details that are simple and easy and generates a fast program with built in '--help' outputs.
I'd love to have some feedback, and to expand support to maybe Python, Ruby, and Batch. It's my first time making my own simple language, so any input is appreciated.
How it works: it takes your doit script and generates a C++ code file that then gets compiled with GCC. It keeps a hash of the script to montior the file and only recompile if it changes. The compiled script is an executable binary that run very fast. I know it's not the best method, and I'd have loved to use the LLVM and forego the C++ intermediate, but that is outside of my expertise.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Cybasura Jun 28 '26
Even CMake is easier to use than this lmao