Welcome to the Stack CLI, a fun and interactive command-line stack implementation written entirely in C. This project supports a bunch of operations like push, pop, find, sort, and more — all from your terminal. Perfect for C learners who wanna sharpen their data structure skills with a lil' spice.
- Stack implemented using a fixed-size array
- Easy command-line interaction
- Support for:
push <value>poppeekdel <value>find <value>countswaphistorysortreverseprintcls(clears terminal)help(shows command list)exit
Make sure you have a C compiler and makefile tools from gnu.
- clone the reposetory
git clone git@github.com:skinwalker3654/stack-cli.git #ssh key required
cd stack-cli- compile and run the program
make
make runWhen you want to delete the executable file run:
make clean✅ You must have all three files: main.c, stack.c, and stack.h
Run it in your terminal:
./bin/main📂 stack-cli
├── .github/
| ├── dark_image.png
| ├── light_image.png
| └── CONTRIBUTING.md
|
├── bin/
| ├── main #executable file
| └── history.txt #contains the commands history
|
├── explanation/
| └── explain.txt
|
├── src/
| ├── main.c
| ├── stack.c
| └── stack.h
|
├── README.md
├── Makefile
└── LICENSE
- The stack is fixed-size (
max_nums = 100) you can change the size by changing the #define MAX_STACK_SIZE from the src/stack.h - Sorting uses quicksort
- The
swapcommand swaps the top 2 elements (if available) - The program colors are changing if you have a diffrent terminal theme
This project is great for:
- Practicing C structs and arrays
- Learning CLI parsing with
sscanfandfgets - Getting comfy with stack operations in a low-level language
Just the vibes of coding raw C like a boss 😎 Ideal for beginners, students, or anyone trying to flex with terminal tools.
MIT License. Feel free to fork and remix ✨
Made with caffeine ☕ and C By skinwalker

