The last one of these that popped up on HN replaced a lot of the common UNIX commands, and a lot of people here rightly asked 'why would I run "mac tar:extract" when I could just run "tar xf"?'
This one seems to get the balance a lot more right, with a lot of things that the average OS X admin wouldn't know off the top of their head.
- 'm lock': That's a lot better than whichever arcane key combination does it by default (my laptop stays closed most of the time, so the power button isn't an option).
- 'm nosleep': I would have to look that one up.
- 'm finder showhiddenfiles': It beats Googling for the proper 'defaults write' invocation.
The basic command for keeping the machine awake is `caffeinate`, and has a few other nice options like changing what kind of sleep is prevented (disk, display, system) and also waiting on a PID (looks like that was added in 10.10).
Related to that is `pmset -g assertions` which will list all the various things that are keeping your machine from sleeping.
strange, I always used `pmset noidle` instead of `caffeinate`. But seems it does the same. I somehow assumed `caffeinate` is the same as this app store thing called Caffeine.
I think if you go to the Keychain, you can configure it to put an icon in the top right tray that you can click on to lock your computer. I often find myself accidentally moving my mouse to the top right corner of my Windows and Linux machines to lock them now.
That is exactly what I do. I think that the combo I would normally try (Cmd+L) logs you out. I remember at one point trying to find the correct key combination, and the primary results were to put the lock icon up. That works find enough for me.
My first impression was _gaah!_ just RTFM! But after calming down, I realized this is not significantly different from a command line version of TinkerTool. Not necessarily something I would use, but I could see an audience for it.
I find that mac-cli is too unfocused with functions like ssh, tar, magento support, mysql support which are not really needed and common between platforms.
I like the exclusive focus of this tool to only mac administration tasks which are specific to mac OS X and that I would not know off the top of my head.
I like how each function is contained in an individual plugin file. I can install (create a local script) which plugins I want without needing to install them all. Even if you do not want to install any of the code, it shows you the command line needed in OS X.
The volume plugin has a more fine-grained control for adjusting the volume. The keyboard based function keys will increase/decrease the volume by 6/7. Now I can increase by smaller increments. Excellent.
Karabiner allows you to change the default behavior of the volume keys to use quarter steps with the "Fine grained volume controls" option (it simply adds the alt+shift for you). Very useful with headphones that are too sensitive. https://pqrs.org/osx/karabiner/
That something like this exists shows some problems with the unix shell: No standardized commands exist for many common actions (sleep, wifi, etc). The syntax is different across commands even on a single system.
It's really nice, but I'd like to see something like that as a standard in shells.
lots of useful commands like that are not in your path by default, that said, at least os x lets you modify almost any part of the system with shell commands.
I like it! I wish it had some features for making a screenshot, taking a photo, and recording video or sound for n seconds. A packet capture for n seconds might be nice, too (although that would certainly be more involved). Might as well add keyboard/mouse logging for n seconds. :)
Downloading m-cli from git to /usr/local
fatal: could not create work tree dir '/usr/local/m-cli': Permission denied
Failed to clone => https://github.com/rgcr/m-cli.git
Off course it won't be able to access the /usr/local/
As opposed to alias in bashrc for the commands you use most often?
This and the other one that was on HN a short while back, I just don't get the point. Learn the command line, already. Yes, some are hard to remember, but that's why history exists. And if you rarely use one, keep it in a simple, greppable text file.
> i'm not. all of it makes me nervous. even package managers with supposedly cryptographically secure verification make me nervous.
Android and Chrome for example are really ahead of this in my opinion. Apps are sandboxed and you know uninstall clears up traces of them. Obviously it's not perfect but it's miles ahead of installation scripts and binary installers which can do anything they want with your system and might be hard to get rid of.
That is what Mac App Store is for. However, all of these sandboxed environments come with their own sets of problems and make making especially these kind of tools quite difficult if not impossible.
not to mention the tracking of installed files and library dependencies that slowly develop into an accumulated spiderweb shitstorm of runtime conflicts.
have you tried maintaining multiple versions of a shared object libraries by hand? do you remember the 'make install' wrappers that never worked right? pepperidge farm remembers.
Also not to like about the install method: The install.sh stores INSTALL_DIR in a variable but does not allow that variable to be overridden by the environment. So you're forced to install into /usr/local despite then being asked to add /usr/local/m-cli to your path. It would be better to allow /usr/local to be overridden so that installation doesn't require sudo. It's just as easy to add ~/.m-cli to your path.
I must admit to flagging this particular submission, as it is the fifth time it has been posted in as many days, with no other contributions (whether of comments or stories) to speak of. Forgive me if this seems harsh, but just to keep submitting the same item over and over without any other activity (including responding to comments made in the prior submissions) does not seem in alignment with HN.
I've been pretty active on HN the last few days, and this is the first I've seen of it. Is redundancy sufficient for flagging? I always thought flagging was only for abusive or off-topic content, and redundant submissions were a moderator thing.
> Is redundancy sufficient for flagging? I always thought flagging was only for abusive or off-topic content, and redundant submissions were a moderator thing.
It looks like the same person was submitting the same thing, daily, to try and make it stick (without any other apparent engagement with the site in terms of submissions or comments). So I think @miles is considering that abusive behavior?
I believe when the mods ask people to resubmit something, they only ask for 1 resubmission (at least that's how it went when I was asked to resubmit something: a second shot, and it didn't get picked up, so that's that).
I don't know. I mean on one hand I get it but on the other I go plenty of times when people submit awesome stuff it's just bad timing. So I don't care.
I"m curious about why it's written in sh, given that it's OS X only and OS X includes by default many languages significantly less crappy than Borne Shell.
I like to challenge myself to write little things like this as shell-scripts, too. But I am surprised they didn't at least choose use Bash instead of Bourne shell.
This one seems to get the balance a lot more right, with a lot of things that the average OS X admin wouldn't know off the top of their head.
- 'm lock': That's a lot better than whichever arcane key combination does it by default (my laptop stays closed most of the time, so the power button isn't an option).
- 'm nosleep': I would have to look that one up.
- 'm finder showhiddenfiles': It beats Googling for the proper 'defaults write' invocation.