macman - Handy tools for Mac OS X terminal

Yuhuang Hu

GitHub release


git clone

Add the alias to the terminal profile:

alias mac="/path/to/macman/macman"

And you are done!


Get a random cat!

mac cat


Use same key binding in Linux machine? Try linuxman

git clone

Available Functions - 159 and counting…

General (39)

Command Parameters Description
list or help   List all the available commands.
helper or h   Get help for help functions.
gen   Get help for General functions.
git or g   Get help for Git related functions.
fun or f   Get help for Functors related functions.
com or c   Get help for Compressor related functions.
term or t   Get help for Terminal Multiplexer related functions.
dl or d   Get help for Deep Learning tips.
docker or dc   Get help for Docker related functions.
info   Get OS X version information.
lock   Lock your mac.
sleep   Put your Mac into sleep mode
restart   Restart your mac.
shutdown   Shutdown your mac.
uptime   Get the time since last restart.
mem   Get the memory status.
speed   Network speed test with npm’s fast-cli package.
ports   List all used ports.
ip.loc   Get local IP address.   Get public IP address.
clock   Show a clock at the top right of your terminal.
battery   Show battery status.
fd.size   Show the folder size.
fd.hid   List only hidden files in the folder.
hid.on   Show hidden files in Finder.   Hide hidden files in Finder.
bt.stat   Show the Bluetooth status.
bt.on   Turn the Bluetooth ON.   Tern the Bluetooth OFF.
wifi.stat   Show the status of WiFi.
wifi.scan   Scan the available WiFi
wifi.on   Turn the WiFi service ON.   Turn the WiFi service OFF.
wifi.pass   Get WiFi password.
vpn.start vpn name Start a VPN by name or by default configuration.
vpn.stop   Stop a VPN.   List all available VPNs.
ejectall   Eject all mounted volumes.
md5 file Calculate MD5 for a file.

Git (38)

Command Parameters Description
g.init   Init a Git repository locally.
g.clone repo link Clone a project through URL.
g.log (OPT) file Get the log for the file or the repo.
g.stat   Get the status of the repo. or go   Open the Git repo from URL.
g.size   Calculate the size of Git repo. URL Add an pull/pull origin.
g.conf   List the Git repo configuration.
g.undo (OPT) commit num Undo last commit(s), get commit number from g.log.
g.add file Stage a file.
g.add.all   Stage all the changes.
g.commit msg Commit the changes. file msg Stage a file and commit.
g.aca msg Stage all changes and commit.
g.acp file msg Stage file, commit and push.
g.acap msg Stage all changes, commit and push. file1 file2 Move file to new destination.
g.rm file Remove file.
g.wipe (OPT) msg Wipe all history and keep current stauts.
g.clean [Y/y] Clean untracked files in .gitignore.
g.push   Push current branch.
g.pull   Pull current branch.
g.merge branch Merge a specific branch.
g.rebase   Git rebase. branch Create a new branch. remote branch Clone a remote branch. branch Checkout a existing branch. remote branch Checkout a remote branch.   List all the branch. branch Remove a local branch. branch Remove a branch from local and remote.
g.stash   Make a stash, stay away from dirty work tree.
g.unstash   Get out from stash (EVERY CHANGES IN THERE COUNTS)
g.lfs.init   Initial LFS storage. file LFS track files.
g.lfs.untk file LFS untrack files.   List all tracked files.
glfs.conf   Get the environmetn variables for the LFS.

Functors (24)

Command Parameters Description
pdf.html file Convert a PDF to HTML via pdf2htmlEX.
wttr   Show the weather for a city.
top10   Show the top 10 used shell commands.
starwar   Text based Starwar IV.
cal   Get 5 days agenda.
cal.week   Get this week’s detail calendar.
cal.mon   Get this month’s detail calendar.
cal.add xx:xx msg Add a quick event.
say msg Text to speech.
mail   Open GMail.
compose   Compose new email through GMail.
maps query Search a Google Maps query.
compute   A calculator.
define word Define word with Dictionary app. or olgo   Open a Overleaf Project.
pymake   Add one template Python Makefile in current folder
imshow image Show image in terminal via iTerm2.
cat   Show a random cat GIF via iTerm2.
ascii   Print ASCII table.
ag ag opts Code search with ag.
vim   Open online VIM cheatsheet.
share   Setup a HTTP server for sharing files.
waka   Open Waka tracker from terminal.
md filename Edit Markdown documents with MacDown.

Compressor (6)

Command Parameters Description
lszip file List file in a ZIP archive.
zip file or folder Zip a file or folder.
unzip file (OPT) folder Unzip a file to a folder.
lstar file List file in a tar archive.
tar file or folder Tar a file or folder.
untar file (OPT) folder Untar a file to a folder.

Terminal Multiplexer (34)

Command Parameters Description (OPT) name Create a new screen session. name Reattach a screen session. name Detach a screen session.   List all available screen session(s).
s.rm name Remove a screen session.
s.rm.all   Remove all available screen session(s).
s.div.h   Split region horizontally.
s.div.v   Split region vertically.
s.go.left or sl   Go left region.
s.go.right or sr   Go right region.
s.go.up or su   Go above region.
s.go.down or sd   Go below region.
spx   Kill current region. or srl (OPT) +space Expand region horizontally or srr (OPT) -space Shrink region horizontally or sru (OPT) +space Expand region vertically or srd (OPT) -space Shrink region vertically (OPT) name Create a new tmux session. name Detach a tmux session.   Detach current tmux session.
t.rm name Remove a tmux session.
t.rm.all   Remove all tmux session(s).   List all available tmux session(s).
t.div.h   Split pane horizontally.
t.div.v   Split pane vertically.
t.go.left or tl   Go left pane.
t.go.right or tr   Go right pane.
t.go.up or tu   Go above pane.
t.go.down or td   Go below pane.
tpx   Kill current pane. or trl (OPT) space Expand current pane to left. or trr (OPT) space Expand current pane to right. or tru (OPT) space Expand current pane to up. or trd (OPT) space Expand current pane to down.

Deep Learning Tips (6)

Command Parameters Description
k.doc   Open Keras Documentation.
k.doc.model   Open Keras Model documentation.
k.doc.preproc   Open Keras Preprocessing documentation.
k.doc.layers   Open Keras Layers documentation.
k.doc.train   Open Keras Training documentation.
k.doc.utils   Open Keras Utils documentation.

Docker (12)

Command Parameters Description docker args Build and image from a docker file (build)   List running containers (ps)   List all containers (ps -a)   List all images (images)
d.start container name Start a container (start)
d.kill container name Kill a running container (kill)
d.rm.img image name Remove a docker image (rmi)
d.rm.con container name Remove a docker container (rm)
d.pull repo address Pull a docker image from remote (pull)
d.push docker args Push a docker image to remote (push) img-namecontainer name Run a container from image with name (run) docker args Run a container from image (run)


Yuhuang Hu