Skip to content

Sujay-korde/nova-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NovaShell

A Unix-like shell built from scratch in C to explore operating system fundamentals, process management, command execution, and shell internals.

Language Platform Status License


πŸ“– Overview

NovaShell is a custom command-line shell developed from scratch in C as part of a deep dive into systems programming and operating system concepts.

The project aims to recreate the core functionality of modern Unix shells while providing hands-on experience with:

  • Process creation and management
  • System calls
  • File descriptors
  • Pipes and redirection
  • Signal handling
  • Command parsing
  • Job control
  • Shell architecture

Rather than treating the terminal as a black box, NovaShell explores how shells actually work internally.


✨ Features

Current Features

  • Interactive shell prompt
  • Command parsing
  • External command execution
  • Built-in commands
  • Error handling

Planned Features

  • Input/Output Redirection (>, <, >>)
  • Pipes (|)
  • Environment Variables
  • Command History
  • Tab Completion
  • Job Control
  • Background Processes (&)
  • Signal Handling
  • Custom Configuration File
  • Shell Scripting Support

πŸ—οΈ Architecture

User Input
     β”‚
     β–Ό
 Command Parser
     β”‚
     β–Ό
 Tokenizer
     β”‚
     β–Ό
 Command Dispatcher
     β”‚
 β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β–Ό              β–Ό
Built-ins    External Commands
                 β”‚
                 β–Ό
             fork()
                 β”‚
                 β–Ό
             execvp()

πŸ“‚ Project Structure

NovaShell/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.c
β”‚   β”œβ”€β”€ parser.c
β”‚   β”œβ”€β”€ executor.c
β”‚   β”œβ”€β”€ builtins.c
β”‚   └── utils.c
β”‚
β”œβ”€β”€ include/
β”‚   β”œβ”€β”€ parser.h
β”‚   β”œβ”€β”€ executor.h
β”‚   └── builtins.h
β”‚
β”œβ”€β”€ docs/
β”‚
β”œβ”€β”€ tests/
β”‚
β”œβ”€β”€ Makefile
β”œβ”€β”€ README.md
└── LICENSE

βš™οΈ Technologies Used

  • C
  • GCC
  • POSIX APIs
  • Linux System Calls
  • Make

🧠 Concepts Explored

NovaShell demonstrates understanding of:

  • Operating Systems
  • Systems Programming
  • Process Management
  • Fork-Exec Model
  • Inter-Process Communication
  • File Descriptors
  • Unix Architecture
  • Shell Design
  • Memory Management

πŸš€ Getting Started

Prerequisites

gcc --version
make --version

Clone Repository

git clone https://github.com/YOUR_USERNAME/NovaShell.git
cd NovaShell

Build

make

Run

./novashell

πŸ’» Example Usage

NovaShell> pwd
/home/user

NovaShell> ls
src include README.md

NovaShell> echo Hello World
Hello World

NovaShell> mkdir test

πŸ“ˆ Development Roadmap

Phase 1 β€” Basic Shell

  • REPL Loop
  • Command Parsing
  • Process Execution

Phase 2 β€” Shell Features

  • Pipes
  • Redirection
  • Environment Variables

Phase 3 β€” Advanced Features

  • Job Control
  • Signal Handling
  • Command History

Phase 4 β€” Power Features

  • Shell Scripting
  • Auto Completion
  • Plugin System

🎯 Learning Goals

This project was created to gain practical experience with:

  • Linux Internals
  • POSIX Programming
  • Process Scheduling
  • Shell Architecture
  • Systems-Level Software Development

πŸ“š References

  • The Linux Programming Interface
  • Advanced Programming in the UNIX Environment
  • POSIX Documentation
  • Build Your Own Shell (CodeCrafters)
  • Linux Man Pages

🀝 Contributing

Contributions, suggestions, and discussions are welcome.

Feel free to open an issue or submit a pull request.


πŸ“„ License

Licensed under the MIT License.


⭐ If you find this project interesting, consider giving it a star.

About

A Unix-like shell written in C, implementing command parsing, built-in commands, process execution, redirections, and pipelines using POSIX system calls.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors