Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mactools

Small macOS command-line tools, shaped for hands that grew up on Windows.

English · 한국어

Coming to a Mac, you hit the same wall every time. You type ipconfig — not found. You look it up, it's ifconfig, but the output looks nothing like what you expected. The gateway is somewhere else entirely (route -n get default), and your public IP is a separate errand. None of it is hard. It's just tedious to find out.

mactools removes that tedium. Short CLI tools that keep the names and the instincts you already have, and put what you actually need on one screen.

$ ipkonfig

Interface en0 (Wi-Fi)
  IPv4         192.168.219.116
  Subnet       255.255.255.0
  Gateway      192.168.219.1
  MAC          0a:d7:18:f3:ca:b9
  IPv6         2406:5900:1165:4899:b5:9643:dbc4:efc0
  DNS          192.168.219.1, 1.1.1.1
  SSID         MyWiFi

External
  Public IP    122.42.3.178

Requirements

  • macOS (Apple Silicon or Intel)
  • Nothing else. No Homebrew, no runtime, no dependency install. Every tool uses only what ships with macOS.

Install

Option 1 — one-liner (recommended)

Clones into ~/.mactools and installs in one go:

git clone https://github.com/linchaindev/mactools.git ~/.mactools && ~/.mactools/install.sh

Option 2 — clone anywhere

git clone https://github.com/linchaindev/mactools.git
cd mactools
./install.sh

Either way, the installer symlinks everything in bin/ into ~/.local/bin. Keep the cloned folder — the symlinks point at it. Delete it and the commands break.

Custom install location

MACTOOLS_PREFIX=/usr/local/bin ./install.sh

/usr/local/bin may need sudo depending on your machine. ~/.local/bin (the default) never does — that's why it's the default.

If PATH isn't set up

The installer checks for you and prints the exact line to run if ~/.local/bin is missing from your PATH. It looks like this:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

(zsh is the macOS default shell. On bash, use ~/.bash_profile.)

Verify

which ipkonfig     # => /Users/you/.local/bin/ipkonfig
ipkonfig

Update

cd ~/.mactools && git pull

That's it. The symlinks already point at the repo, so new tools become available immediately and existing ones are updated in place — no reinstall needed.

Uninstall

~/.mactools/install.sh --uninstall
rm -rf ~/.mactools

Only removes symlinks this installer created. A same-named file you put there yourself is left alone.


Tools

Command What it does Windows equivalent
ipkonfig Interface · private IP · subnet · gateway · MAC · IPv6 · DNS · Wi-Fi SSID · public IP, on one screen ipconfig /all + a public-IP lookup

More tools are on the way. Missing something? Open an issue.

ipkonfig

Picks the single interface your traffic actually leaves through (the default route) and reports on that one. No firehose of unused virtual interfaces the way bare ifconfig gives you.

The public IP is fetched from api.ipify.org, falling back to ifconfig.me, with a 5-second timeout. Offline, it doesn't hang — you still get all the local details.

ipkonfig        # everything
ipkonfig -n     # skip the public IP lookup (offline, or when you want it instant)
ipkonfig -h     # help

Labels follow your LANG — Korean if it starts with ko, English otherwise. Force it with IPKONFIG_LANG=en ipkonfig or IPKONFIG_LANG=ko ipkonfig.

Piped output drops the color codes, so ipkonfig | grep MAC works as expected.


Design principles

  • Zero dependencies — macOS built-ins only (route, ipconfig, ifconfig, scutil, networksetup).
  • Read-only — these tools look, they don't touch. Nothing changes your system config.
  • One screen — only what you need, no scrolling. The underlying commands already do exhaustive well.
  • Short — each tool is a shell script you can read end to end. Go open bin/ and see.

Contributing

To add a tool: drop an executable script in bin/, add one row to the table above. Shell is preferred, but any built-in runtime (python3, etc.) is fine — just don't add an install step for the user.

License

MIT — see LICENSE

About

Small, dependency-free macOS CLI tools for people coming from Windows. Familiar names, one screen, zero setup. | 윈도우 쓰던 손에 맞춘 macOS 커맨드라인 도구 모음

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages