A lightweight shell implementation in Go with pipe support and builtin commands.
| Command | Description | Example |
|---|---|---|
cd <path> |
Change directory | cd /tmp, cd ~, cd |
pwd |
Print working directory | pwd |
echo [args...] |
Print arguments | echo hello world |
ps |
List running processes | ps |
kill <pid> |
Remove process by PID | kill 1 |
- Full support for all system commands available in
$PATH(ls,cat,grep, etc.)
- Execute multiple commands connected with pipes:
echo test | cat | grep test - Commands in pipeline run concurrently in separate goroutines
SIGINT- Cancel current command executionSIGTERMorCtrl+D- Graceful shutdown
- Clone the repository:
git clone https://github.com/alexey0b/minishell
cd minishell- Build the project:
make build- Run the shell:
./minishell$ ./minishell
> pwd
/home/user
> echo hello world
hello world
> cd /tmp
> pwd
/tmp> echo test | cat
test
> echo hello world | grep hello | cat
hello world- Go 1.25+
- Unix/Linux/macOS
- stretchr/testify - Testing framework
- uber-go/goleak - Goroutine leak detection
