A simple Zig CLI tool to copy the absolute path of your current working directory to the clipboard. Supports macOS (pbcopy
) and Linux (wl-copy
or xclip
).
- Auto-detects OS and clipboard tool.
- Prints confirmation with the copied path.
- Lightweight and fast.
- macOS: Built-in
pbcopy
. - Linux:
- Wayland:
wl-clipboard
(sudo apt install wl-clipboard
). - X11:
xclip
(sudo apt install xclip
).
- Wayland:
- Ensure Zig 0.15+ is installed.
- Clone or save
src/main.zig
. - Build:
zig build
(orzig build-exe src/main.zig
). - Install:
sudo ./cpwd /usr/local/bin/
. - Run:
cpwd
→ Path copied! (e.g.,Copied: /home/user/project
).
cpwd
Paste with Cmd+V
(macOS) or Ctrl+V
(Linux).
MIT.