VibeOS: Day 1 - Creating an Operating System from Scratch with AI
Alright, so today while talking to a friend about the limits of current AI coding tools I've been wondering whether it is possible to do low-level "vibe coding" — specifically, an operating system from scratch. So this is what I set out to do today, and I gotta say I'm quite impressed by the results.
For those unfamiliar with "vibe coding," it's essentially letting an AI coding assistant guide the development process based on high-level descriptions rather than detailed specifications. The goal is to see how well modern AI tools can handle complex, low-level systems programming challenges.
If you're interested in the source code, it's available on GitHub.
Overview of the capabilities after 2 hours
I've spent about 2 hours vibe coding, and in the end VibeOS already has the following capabilities:
- Be booted directly via Qemu (a popular machine emulator)
- Be booted via Multiboot on real hardware (didn't test that yet, probably won't work)
- Text mode VGA output (the classic 80×25 character display)
- Simple VGA terminal emulator, supporting some simple ANSI Escape sequences for setting color
- PS/2 keyboard input (US English layout is hardcoded for now)
- Timer interrupt (for basic timing functions)
- Setting up an IDT (Interrupt Descriptor Table, which handles hardware/software interrupts)
- Simple standalone printf implementation (for formatted text output)
- Some libc functions, mainly regarding string handling
- UART output, so all output gets sent to the Terminal and Screen
To me that is actually quite astonishing — it would have taken me far longer than 2 hours to write all of this manually, and while the overall code quality isn't great, it does seem to work at first glance. The AI was surprisingly adept at understanding the complexities of low-level hardware interaction.
The Challenges of OS Development
Building an operating system from scratch involves working directly with hardware, with no underlying OS to handle the details for you. Each component—from boot code to keyboard drivers—must be implemented from the ground up.
Traditional OS development typically requires deep knowledge of computer architecture, assembly language, and hardware interfaces. The fact that an AI-assisted approach produced a working system in just 2 hours demonstrates how far these tools have come.
Future ideas
Tomorrow I'll probably continue since I'm quite intrigued by how well this actually works. The next steps will probably be support for mass storage (probably ATA/AHCI) and a simple filesystem like FAT32, since we can then try and extend VibeOS to be some sort of DOS on steroids and who knows what we'll add over time.
Some potential features I'm considering:
- A simple shell interface for executing commands
- Basic memory management and process isolation
- Perhaps a simple graphical interface beyond text mode
- Network stack if things get really ambitious
I'll also try and test it on real hardware soon, since I do wanna know whether things actually work. In the past, I've noticed some differences between behavior in a VM and on real machines — virtual machines often emulate "perfect" hardware, while real systems have quirks and timing issues that can expose subtle bugs. We'll see how well things actually work out when running on physical hardware.
If you're interested in OS development or pushing the boundaries of what AI coding assistants can do, stay tuned for further updates on this experiment.
Adios, べン