Skip to content

tachRoutine/cpwd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPWD - Copy Present Working Directory

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).

Features

  • Auto-detects OS and clipboard tool.
  • Prints confirmation with the copied path.
  • Lightweight and fast.

Prerequisites

  • macOS: Built-in pbcopy.
  • Linux:
    • Wayland: wl-clipboard (sudo apt install wl-clipboard).
    • X11: xclip (sudo apt install xclip).

Build & Install

  1. Ensure Zig 0.15+ is installed.
  2. Clone or save src/main.zig.
  3. Build: zig build (or zig build-exe src/main.zig).
  4. Install: sudo ./cpwd /usr/local/bin/.
  5. Run: cpwd → Path copied! (e.g., Copied: /home/user/project).

Usage

cpwd

Paste with Cmd+V (macOS) or Ctrl+V (Linux).

License

MIT.


About

A lightweight, cross platform CLI written in Zig that prints the current working directory and copies it to your clipboard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Zig 100.0%