PicoOS Devlog #2: Rounding Up Essential Commands
Welcome to the second devlog!
I’ve spent the last two days expanding the shell’s toolkit to make the environment much more usable. I am happy to announce that the core lineup of indispensable Unix utilities and I/O features is now complete!
New Features & Commands Added
-
echo: Prints text to the terminal—essential for verifying variables, scripting, and testing streams. -
clear: Clears the terminal screen (super satisfying when working over UART!). -
cat: Outputs the content of a file directly to the terminal. -
less: A lightweight pager to view content page by page. It dynamically handles input either directly from a specified file or piped on the fly from another command using the shell pipeline (|). -
help: Displays the description and usage of available commands.
Stream Redirections are Live!
I have successfully implemented basic I/O redirection operators into the shell parser:
-
>: Redirects a command’s standard output to a file, overwriting its existing content. -
>>: Redirects standard output to a file, but appends the data to the end of the file instead of wiping it.
How help works under the hood
To keep things lightweight and modular, the help command doesn’t rely on a hardcoded dictionary. Instead, it dynamically parses an optional comment block placed right at the beginning of each command line inside /bin. Simple, effective, and completely decentralized.
What’s next?
With the fundamental CLI utilities and stream handling out of the way, I am shifting focus toward system architecture and usability:
- Memory & Storage Integration: Setting up proper management for SPI flash memories and mapping out the memory structure of the system.
- Developer Experience (DX): Building core Python modules to make writing custom apps for PicoOS as straightforward and clean as possible.
- Refactoring & Expansion: Polishing and simplifying the existing codebase while adding a few more handy utilities.
- Text Editing: Writing a lightweight, built-in text editor (a mini-clone of nano or vi) to modify files directly on the hardware.
Community request!
I feel like the most critical commands are now up and running, but a shell can always grow.
What essential CLI utility or fun tool are you missing? If there is a specific command you’d love to see running natively on a Raspberry Pi Pico 2, drop it in the comments below!
Until next time!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.