A better pwd with clipboard support and targeting
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
The Great Irammini 9d2a2333dc
Update main.rs
2026-08-06 05:05:07 +07:00
.github/workflows feat: sync IRI with latest changes 2026-03-21 18:12:02 +07:00
src Update main.rs 2026-08-06 05:05:07 +07:00
.bwd-root Create .bwd-root 2026-02-18 19:50:14 +07:00
.gitignore Base 2026-02-17 16:17:45 +07:00
Cargo.lock feat: setup IRI 2026-03-21 03:27:13 +07:00
Cargo.toml remove support for loongarch 2026-03-21 03:54:24 +07:00
context7.json Create context7.json 2026-02-18 20:03:38 +07:00
INSTALLATION.md update registry docs for v0.4.0 2026-03-20 20:58:49 +00:00
LICENSE Initial commit 2026-02-17 16:12:44 +07:00
README.md feat: setup IRI 2026-03-21 03:27:13 +07:00
release.toml remove support for loongarch 2026-03-21 03:54:24 +07:00

bpwd

A better pwd with clipboard support and targeting.

Installation

Homebrew (macOS/Linux)

brew install CodeTease/tap/bwd

Scoop (Windows)

scoop bucket add codetease https://github.com/CodeTease/scoop-bucket
scoop install bwd

Cargo

cargo install bpwd

Release

You can also download the binary from the Release page.

For more download methods, see INSTALLATION.md.

Usage

bwd [target] [-c] [-s] [-j] [-r]
  • target: Optional path to resolve relative to current directory. Use -- to separate flags from arguments (e.g., bwd -- -my-dir).
  • -c: Copy the result to clipboard.
  • -s: Shorten path (replace home directory with $HOME or %USERPROFILE%).
  • -j: Output path information as JSON.
  • -r: Print path relative to project root (searches for .git or .bwd-root).

Examples

Standard Output (Absolute Path)

$ bwd
/home/codetease/projects/bpwd

Shortened Path (-s)

$ bwd -s
$HOME/projects/bpwd

JSON Output (-j)

$ bwd -j
{"path":"/home/codetease/projects/bpwd","short":"$HOME/projects/bpwd","root":"."}

Priority Logic

  1. JSON (-j): Always outputs the JSON object.
  2. Short (-s): If JSON is not requested, outputs the shortened path.
  3. Default: Outputs the absolute path.