r/bash • u/RyanSummer • Mar 28 '26
Introducing: OneCommand
Hi all,
I wanted to share a pretty large bash script (for macOS) that i've been working on over the past 6 months.
In case you're not familiar with it yet, it's called OneCommand and it's a menu-driven CLI tool for managing macOS - containing hundreds of terminal commands in one.
I've posted about this in some other subreddits but have not yet had the confidence (or bash experience) to post about it here, until now.
I mainly made this for myself in order to consolidate the extensive amount of terminal commands I had stored in text files or as standalone scripts - and while I'm sure many of you probably have your own solutions for this, I figured maybe this could be useful to others here...
This is an open-core product - the free (Lite) version is available on my Github.
The Lite version has some useful functions like Quick Stats, MacOS Preferences, Disk Image Utility, Create Symlink and contains features like saving/remembering file paths, setting script preferences, sudo keep-alive and command-line arguments. So you should be able to easily incorporate your own commands and add your own menu options as needed.
Either way, just wanted to share this here in case others find it useful or want to build off of it. There's also a paid (Full) version on my personal website here with a few more menu options at $14.99 if that's of interest.
Enjoy!
2
u/Europia79 Mar 28 '26
Can you tell me about (20) File X-Ray, and, (21) Binary Lipo ???
1
u/RyanSummer Mar 28 '26
Hey, yeah so FIle X-Ray's purpose is to inspect a file's true file type (since file extensions can easily be changed and appear to be something they're not). It simply uses the file command and recursively finds all files within a given path, then prints a directory tree-view output with the file type (and size) appended to the end of the file name. It also shows a summary of certain file types that are currently tracked. Useful for scanning deep directories. Files are displayed with no color (or in bold if a top level path), directories are in cyan with a trailing slash, and symlinks are in magenta with its link appended.
Binary Lipo's purpose is to 1. help to find all binaries within a given path. 2. display the architectures for each found binary within a directory tree-view (similar to File X-Ray). and then 3. walks you through slicing the architectures. If trying to slice out ARM while on ARM, it'll warn you. So safeguards have been implemented. It also has a permissions step in case you need to fix permissions after a binary is modified, since in some cases, this can invalidate code signatures.
8
9
7
u/TW-Twisti Mar 28 '26
"I have worked hard on this for six months" posts screenshots that scream vibe coded in an afternoon, links to repo with a commit history spanning a total of three days.
2
u/StopThinkBACKUP Apr 16 '26 edited Apr 16 '26
$14.99 is wildly optimistic for a single 13000+ line bash script. You might get some takers at $1.99
.
I don't want to discourage you, but who exactly is the target audience for this commandline utility? The only thing I see so far that might help me personally is the option to create a bootable Macos installer, and I already have a script for that.
I'm a Linux server admin as well as a Mac fan, and do bash programming by preference + part of my $DAYJOB. But even I realize that bash-centric fans on Mac are a pretty niche group.
Also - you need to realize that Mac users generally expect GUI apps. You might get better results by redoing this in Xcode, although the backwards compatibility all the way to Monterey 12 is appreciated.
Bash isn't even the default shell on Macs for years now, they switched to zsh. The bash that ships with Mac is significantly older, something like 3.2 from 2014 - where modern bash is on v5. End-users can get that with brew / macports.
I realize you've been working on this for 6 months, but you might want to rethink a few things here. Modularizing your code will make it easier to maintain, for one thing. Put functions in separate files and source them.
The *NIX philosophy has long been "make a small utility to do one thing and do it well." And "pipe the results of one utility to another to further process it."
.
A utility that is more useful / makes things easier for new Mac users migrating from Windows might be something to look into.
Look at Midnight Commander for a shining example of something that is useful and easy to use, and has lasted for decades. It's the safest way to delete subdirectory trees, for one thing. It doesn't try to be everything, but simplifies things like copying/moving files and directories, and merges them properly. It will ask you what you want done if there are existing files in the destination. It has SCP and FTP functionality, and even includes a text editor for convenience. In comparison, Finder is slow and can bork your directory structure if you try to merge.
Keep coding, but do some research and know your target audience.
1
u/Shadow_Thief Mar 28 '26
This looks like every multitool that every 12 year old skiddie has ever posted in r/batch or its associated Discord server.
1
u/mechanicalAI Mar 28 '26
Vibe code or not I don’t care. Just remove the fucking emojis at least! Are you that incapable of debugging your own project?
-8











9
u/marcmjax Mar 28 '26
These screenshots don’t do you any justice.
The “tasks” are so vague. What do “Quick Presets,” “Remove Quarantine,” “Diff Tracker,” “VM Isolation Check,” “Binary Lipo,” “TCC Utility,” “Command Center,” and “Settings” do?
Then your second screenshot shows the same tasks (pretty much) but much less. What has changed?
And what is “Enter your choice (or nav choice)”? It reads like something you created from a tutorial.
So many questions, and I don’t see why anybody should use this, let alone pay for it.