Built in C ยท Unix-like shell

Small shell. Big energy.

FlameOShell is a lightweight Unix-like shell built in C, featuring process management, pipes, redirection, background jobs, job control, and signal handling.

flameoshell
โ—
flame@oshell :~$ ./flameoshell
๐Ÿ”ฅ FlameOShell started
flame@oshell :~$ ls
flameoshell.c   Makefile   README.md   LICENSE   frontend/
flame@oshell :~$ echo "hello"
hello
flame@oshell :~$
C Core language
Unix Shell architecture
POSIX System concepts
๐Ÿ”ฅ Flame powered
01 CAPABILITIES

Everything you expect from a shell.

FlameOShell brings together the fundamental Unix process and shell concepts into one lightweight program.

โšก

Command execution

Parse commands and launch programs using the operating system's process model.

fork() + execve()
๐Ÿ”—

Pipes

Connect processes together and move output from one command directly into another.

pipe()
๐Ÿ“‚

Redirection

Redirect standard input and output using files, just like a traditional Unix shell.

open() + dup2()
๐Ÿงต

Background jobs

Run processes in the background while keeping the shell available for more commands.

& + jobs
๐ŸŽฎ

Job control

Move processes between foreground and background execution with shell-level job management.

fg + bg
๐Ÿ›ก๏ธ

Signal handling

Handle process signals and terminal events while maintaining control of running jobs.

sigaction()
02 INTERACTIVE DEMO

Get your hands dirty.

This browser terminal is a demo of the FlameOShell experience. Type a command below and see what happens.

flameoshell โ€” demo DEMO
๐Ÿ”ฅ FlameOShell web demo
Type help to see available commands.

flame@flameoshell:~$
03 UNDER THE HOOD

From command to process.

A shell looks simple from the outside. Underneath, it is coordinating processes, file descriptors, signals, and the operating system.

01
โŒจ๏ธ

Input

The shell receives a command from the user.

โ†’
02
๐Ÿงฉ

Parse

Arguments, pipes, redirection and job modifiers are interpreted.

โ†’
03
โš™๏ธ

Process

Processes are created and connected using system calls.

โ†’
04
๐Ÿ”ฅ

Execute

The operating system runs the requested command.

fork() execve() waitpid() pipe() open() dup2() kill() sigaction() setpgid()
๐Ÿ”ฅ

Want to run the real thing?

Clone the repository, build it locally, and launch FlameOShell from your own terminal.

$ git clone https://github.com/raynerdcunha/flameoshell.git
Explore the repository โ†—