-
🔤 Custom Lexical Analyzer & Recursive Descent Parser
-
🌲 AST Construction & Traversal for Execution
-
🧵 Token Support:
TOKEN_WORD,TOKEN_STRING|,||,&&,>,>>,<,&
-
🔌 Pipe chaining, redirection, background execution, etc
-
🧠 Built-in AI assistant with
komicommand -
🧪 Environment Detection:
- C or C++ Makerfile (🖇️)
- Python venv (📦)
- Git repo (🔧)
- Node.js (📁
package.json) - Rust (🦀
Cargo.toml) - Go (🐹
go.mod)
-
✅ Git branch detection, help page(
komi -h), and history (komi --past) -
🎨 Minimalist Komi-themed prompt, emoji-aware if terminal supports
-
⚙️ Signal handling for arrow keys to move up and down the history
-
📝 Tilde(~) support for max efficiency.
git clone https://github.com/kush1jpeg/komi.sh.git
cd komi.sh
make run --to Run after compilingTo use AI, insert your Groq API key in the file (komiCmds.c):
eg - Authorization: Bearer gsk_...
[ The shit moves like ]
|
+------------+------------+
| |
[ BG / FG ] [ BG / FG ]
| |
[ PIPE Node ] [ PIPE Node ]
| |
+-------+-------+ +-------+-------+
| | | |
[ REDIRECT Node ] [ CMD ] [ CMD ] [ REDIRECT Node ]
| | | |
[ FILE Node ] [ ARGS ] [ ARGS ] [ FILE Node ]
Input --> Lexer --> Parser --> AST --> Interpreter --> Execution
└--> komi AI (if used)
bottom to top !
COMMAND→ words like `ls`, `echo`, etc.
PIPE-> cmd | cmd
SEQ-> cmd ; cmd OR && OR ||
REDIRECT-> >,>>, <
SEQUENCE-> && , ||
BG→ &
All of the shell components are written from scratch in C. Handles input parsing, tokenizing, AST creation, execution, and talking to Groq’s LLM.
I hated mern cuz everything felt like a copy of a copy of a copy. Connecting different libraries and calling it a creation is just pure idiocy.
I needed a break, komi.sh was my way to get free from abstractions, understand the internals of a shell and rebel against languages full of libraries. Not just run commands but build some and fork majority of them.lol.
I made it just because i want to make a compiler in the future and the parser and lexical Analyzer serves the basics for the latter. C is too much tbh, code in C is a beautiful tradgedy, it punishes u with nothing except a SIGSEGV and leaves you questioning your futile existence......though valgrind, objdump, gdb or strace are there but i can't truly understand shit, cuz its majorly asm.
Now that i have made a working shell, I am more confused than ever before, I am more depressed than before and this feeling of incompetency is rising up. I know after making this shell, I know nothing. I feel like i am standing on the pinnacle of impotency. I realized how beautiful and dumb the world full of abstraction was.
..the only good thing that happened after making this project was that, I found a love, C is her name she shines hellishly, like Nastenka, but we all know the end...!
Now i really wanted to make a webserver in C from scratch but it felt like a diff drag so i used libcurl the og library and copied the whole example to make it work along with some gpt. I lowkey want to add some language inside this shell like in bash is bash.....wow!.... lua or bash. let's see if i get bored i would try to do it cuz i think it would be not that difficult as i have the whole Token and ast struct ready. I wanted to make some video renderer inside terminal but it was again a seperate project idea. and yeah also give voice to komi but writing it in barebone c would be soooo difficult...... So yeah i know this shell is not good, and nobody even me would rarely use it, except to flex! lol;
This project is licensed under the BSD 2-Clause License.
See LICENSE file for full details.
" The shell cant talk much like our girl Komi ! "








