You are browsing as a guest. Sign up (or log in) to start making projects!

Orbit

  • 14 Devlogs
  • 20 Total hours

Alpha version (α) A simple, modular, and interactive Linux shell written in C, with command history, aliases, and the use of wrappers for system command executions

Open comments for this post

2h 54m 8s logged

Yeah, long time…


I was here thinking about whether to continue developing something more complete/add more features here. It just so happens I was working on other projects and liked them, so I kind of set Orbit aside. Actually, every now and then I would come here (I mean to its directory) and test things, skim through the code to think of more stuff, you know. I’d run the program and that was pretty much it.

Then I was testing some parts and features of the language related to the course. And since before fully developing the project I studied, checked out, and learned certain things here, I came back and did the same. I even turned off Wakatime since it wasn’t really for the project, but after messing with the others I’d turn it back on and that was that. So yeah, here I am and I tinkered with the project a bit more in the parts I got feedback on. I forgot to translate the version I’d be showing for the demo into English, now I did, I was thinking of leaving the binary and executable program multiplatform and I also went after that.

Anyway, there’s already a release with it for Linux, macOS, and Windows. In that and in the translation, I used Antigravity. Now the project is more organized.
Now the aliases you create stay saved and don’t get lost when you close that session. I also tweaked things with the voters’ feedback to make it look more professional and like how bash really is. Creating a process and running things with execvp() (the other one is fork()) or it already kind of gave the clue on how to do it.

0
0
3
Ship #1

I built this mini-terminal in C. The trickiest part was dealing with pointers—specifically dereferencing. I got a bit lost in a few places and while organizing function parameters, but nothing major went wrong. I wanted to learn how operating systems and low-level systems work; since C is essentially the foundation for that—and I was already studying it in my course I decided to use it.

To test it out, you can simply create a Codespaces instance or clone the repository. If you choose to clone it, you'll need a C compiler installed.
Install it using this command:
```bash
sudo apt update && sudo apt install build-essential -y
```

  • 13 devlogs
  • 17h
  • 7.88x multiplier
  • 132 Stardust
Try project → See source code →
Open comments for this post

43m 52s logged

I’m done for now. I spent time writing the README and fixing a few things in the code, as well as resolving an issue syncing the Git repository—specifically, a discrepancy between the remote and local versions. I also deleted the binary that had been uploaded there by mistake :|
On top of that, I created this architecture diagram right in Canva. That’s basically it; now I’m going to ship the Alpha version.

0
0
6
Open comments for this post

6h 20m 45s logged

Massive session in the last days. Honestly, the past few days have been a heavy grind balancing school work and academic study. Between reviewing some Python automation scripts and touching up minor EDA/hardware schematic concepts, I had to take a step back and deeply review C fundamentals. I spent a good chunk of time writing tests to push the limits of basic features, function definitions, and pointer scopes that the language offers.

All this testing made it obvious that the old monolithic, single-file structure was hitting a wall. To scale Orbit properly into the Alpha phase (vα), I executed a complete architectural overhaul, breaking the codebase down from 1 single file into 5 highly modular files, all cleanly decoupled and tied together using structured header files (.h) and a dedicated Makefile.

Key implementations finalized in this block:

  • Modular File Splitting: Migrated core logic away from the legacy root files. The project is now properly organized under a /src directory, separating the shell’s main loop, the token parser, and individual command definitions into their own independent compilation units.
  • Dynamic Prompt Integration: Hooked up the native getcwd() system call inside the interactive execution loop. Because the shell now correctly tracks process directory state, the prompt dynamically updates and visually prints the absolute path in real-time right after a ‘cd’ executes.
  • Lookup Table for Aliases: Laid down the pre-processing layer for custom shortcut mappings. Designed a static structure array to act as an Alias Table, intercepting raw stdin strings to scan for matches (like replacing ‘ll’ with ‘run ls -la’) before the input ever hits strtok for argument tokenization.
0
0
6
Open comments for this post

1h 58m 59s logged

Refactoring the main execution loop with M365 Copilot. Moving away from the messy string comparisons and building a cleaner internal structure for command handling. Spent time debugging memory allocations and ensuring tokens from strtok don’t leak between cycles.

0
0
8
Open comments for this post

53m 24s logged

Implemented a dynamic dispatch system using an array of structures and function pointers. Replaced the entire nested if/else chain inside main with a clean lookup table. Commands like echo, sum, and run are now isolated functions mapped to their respective triggers. Much easier to extend now.

0
0
5
Open comments for this post

44m 17s logged

It was supposed to be working here. Now the CLI has the repeat command that takes the number 'n', which is the parameter the user puts in, and looks in history.txt for which 'n' command should be executed and repeats it.
I realized that adding history using the ↑↓ (keyboard arrows) would be more complicated and could, not break/bug, but slow me down in what I was doing and testing.

0
0
3
Open comments for this post

36m 57s logged

The available commands:

  • help
  • echo
  • sum
  • history
  • clear_history
  • run
  • cd

I’ve already finished the list for the available commands here. I left an array, and with that, we can keep *adding more stuff * later and make the help command actually helpful :)

0
0
5
Open comments for this post

36m 13s logged

Today I finished implementing the cd command. Now I can change directories within the project terminal. The process is to run run ls and then use cd. In this case, I left it without the run command, just using cd directly.

0
0
4
Open comments for this post

51m 10s logged

I started making the directory changes. Actually, I spent more time testing and thinking about what to do and running tests. I didn’t even get the idea to be able to see/repeat the last commands like ↑↓ that are in normal terminals. I haven’t done that many upgrades, but I’ve studied and am still developing the idea

0
0
4
Open comments for this post

34m 9s logged

Continuing here, I was working and studying (Chemical Kinetics :\ ) with the M365 Copilot and it said something like: why not put an enumerator of the commands in the history?
I thought it was a good idea and that’s what I went looking for. I had to change, replace, you know, the part where I saw the commands to keep doing a ++ for the counter. But when it worked (compiled and had changed to this new logic) it ended up, for some reason, printing 35949 commands in memory!. Basically some kind of memory flow or something like that related to the command that calls the system (run). I have to see why this happened…

0
0
3
Open comments for this post

51m 48s logged

So, here I put something REALLY COOL: executing system commands in the terminal inside the terminal -\°°/-. It’s kind of funny, but like, I can run ls, cat, date, pwd, etc.

I thought it would take longer, but it didn’t. I just needed to pass the tokens, concatenate the command setting the `run’ as the one that connects the app to the system terminal.

It turned out I was doing some C things for the course and I was already testing this… And I used M365 Copilot to help me. Well, I already use it to reinforce the content of the classes, lessons, learn some things and also to debug my code, exercises/lists that the teachers gave. So I kind of just continued where I was.

0
0
3
Open comments for this post

25m 55s logged

That’s a cool thing… I added a command to clear the history, which in this case is clear_history.

It’s a simple thing, but it improves the app’s usability. That’s pretty much it.

0
0
3
Open comments for this post

1h 0m 49s logged

Basically, I added a very simple history file to the app, like a .bash_history. But in this case, I’m using a history.txt file. It opens and writes exactly everything typed in the terminal, skipping a line.

Man, messing with/manipulating files here is quite difficult… using * for pointers and dereferencing confused me a bit. Sometimes I forgot it and it gave me errors. The good part is that my own editor recommended clangd. Actually, I don’t know exactly what it is, but it seems like a lintter and automatic pre-compiler. It’s helping me…

One thing I miss is being able to attach more than one media file. At least I had the copy and paste image option, and it didn’t work.

0
0
4
Open comments for this post

1h 7m 54s logged

Hello. I started this project. Actually, I had thought of something different, and that’s why it has this name “Orbit”. But now that I’ve decided to do this, I’ll change the name later.
Basically, I’m starting out in C (really learning it right now), and since I’m a beginner and I got my first laptop, which is Linux (because I didn’t want to pay for a Windows license/I don’t have anything tying me to it, considering this is my first machine), and since I’m in this Dev and Builder life and C is the basis of many things and OSs…
So I decided to do something along the lines of Unix/Linux. I thought, “nothing better than playing with the Terminal for this,” so I started with this simple version here. Which:

  • is in an infinite loop (1)
  • has the echo command (to print) and sum (to sum)

Uses strtok (which I’m learning) to manipulate strings and the tokens for what they call them. I think that’s it :p

1
0
12

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…