Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 64 additions & 8 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,31 @@ Some simple tools for my own productivity.

## pass - Password Store Replacement

Windows-compatible `pass` (password-store) replacement in Go.
Windows-compatible `pass` (password-store) replacement in Go. Manages GPG-encrypted password files in `~/.password-store/` with git integration.

### Features

- GPG-encrypted password storage
- Git integration for version control
- Interactive fuzzy search with TUI (Bubble Tea)
- Cross-platform (Windows, Linux, macOS)
- Copy to clipboard support
- Edit existing passwords with your favorite editor

### Build
```bash
cd pass
go build -o pass.exe . # Windows
go build -o pass . # Linux/macOS
cd pass && ./build.sh # native build → ../shell/pass[.exe]
cd pass && ./build.sh build # same
cd pass && ./build.sh build-all # cross-compile linux amd64/arm64 + windows arm64
```

### Install
```bash
# Windows: copy pass.exe to PATH
copy pass\pass.exe C:\Windows\System32\
copy shell\pass.exe C:\Windows\System32\

# Linux/macOS:
sudo cp pass/pass /usr/local/bin/
sudo cp shell/pass /usr/local/bin/
```

### Test
Expand Down Expand Up @@ -50,13 +59,60 @@ pass -c # Interactive fuzzy search with clipboard copy
pass rm # Interactive fuzzy search to remove
```

### TUI

When running `pass`, `pass -c`, `pass rm`, or `pass edit` without arguments, an interactive TUI is displayed:
- Use up/down arrows to navigate the list
- Use left/right arrows to move cursor in search input
- Use Tab to cycle through results
- Type to filter passwords using fuzzy matching (subsequence matching)
- Press Enter to select (show, copy, remove, or edit based on command)
- Press Esc, Ctrl+C, Ctrl+D, or Ctrl+Q to exit

### Configuration

- `PASSWORD_STORE_DIR`: Custom password store location (default: `~/.password-store`)
- `EDITOR`: Editor to use for editing passwords (default: `notepad` on Windows, `vi` on Unix)
- Requires GPG to be installed and configured

### Prerequisites
- Go 1.20+
- GnuPG (GPG4Win on Windows)
- Git (optional, for version control)

---

## Other Tools
## gitprompt - Git Prompt Utility

- `shell/gitprompt.exe` - Git prompt utility
Git prompt utility for shell integration.

### Build
```bash
cd gitprompt && ./build.sh # native build → ../shell/gitprompt[.exe]
cd gitprompt && ./build.sh build # same
cd gitprompt && ./build.sh build-all # cross-compile linux amd64/arm64 + windows arm64
```

### Install
```bash
# Windows: copy gitprompt.exe to PATH
copy shell\gitprompt.exe C:\Windows\System32\

# Linux/macOS:
sudo cp shell/gitprompt /usr/local/bin/
```

### Prerequisites
- Go 1.25+ (go-git v5.19 dependency)

---

## Building All Tools

Use the wrapper script to build both tools at once:
```bash
./shell/make.sh # build both gitprompt and pass
./shell/make.sh build # same
./shell/make.sh build-all # cross-compile both
./shell/make.sh clean # clean both builds
```
75 changes: 0 additions & 75 deletions pass/README.md

This file was deleted.

47 changes: 47 additions & 0 deletions pass/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh
# Build helper for systems without GNU make (e.g. BusyBox ash on Windows arm64).
# Equivalent to the targets in ./Makefile.
#
# Usage:
# ./build.sh # native build → ../shell/pass[.exe]
# ./build.sh build # same
# ./build.sh build-all # cross-compile linux amd64/arm64 + windows arm64
# ./build.sh clean
#
# Requires Go 1.20+.

set -eu

OUTDIR=../shell
LDFLAGS="-s -w"
# Resolves to ".exe" on Windows, "" elsewhere — so the native build is
# named correctly without sniffing uname.
EXT=$(go env GOEXE)

cmd=${1:-build}

case "$cmd" in
build)
go build -ldflags="$LDFLAGS" -o "$OUTDIR/pass$EXT" .
;;
build-all)
GOOS=linux GOARCH=amd64 go build -ldflags="$LDFLAGS" -o "$OUTDIR/pass-linux-amd64" .
GOOS=linux GOARCH=arm64 go build -ldflags="$LDFLAGS" -o "$OUTDIR/pass-linux-arm64" .
GOOS=windows GOARCH=arm64 go build -ldflags="$LDFLAGS" -o "$OUTDIR/pass-windows-arm64.exe" .
;;
clean)
rm -f "$OUTDIR/pass" \
"$OUTDIR/pass.exe" \
"$OUTDIR/pass-linux-amd64" \
"$OUTDIR/pass-linux-arm64" \
"$OUTDIR/pass-windows-arm64.exe"
;;
update-deps)
go get -u ./...
go mod tidy
;;
*)
echo "Usage: $0 [build|build-all|update-deps|clean]" >&2
exit 1
;;
esac
30 changes: 30 additions & 0 deletions shell/make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
# Wrapper script to build both gitprompt and pass.
#
# Usage:
# ./make.sh # build both tools
# ./make.sh build # same
# ./make.sh build-all # cross-compile both tools
# ./make.sh clean # clean both builds
# ./make.sh update-deps # update dependencies for both

set -eu

SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
REPO_ROOT=$(dirname "$SCRIPT_DIR")

cmd=${1:-build}

case "$cmd" in
build|build-all|clean|update-deps)
echo "Building gitprompt..."
(cd "$REPO_ROOT/gitprompt" && ./build.sh "$cmd")

echo "Building pass..."
(cd "$REPO_ROOT/pass" && ./build.sh "$cmd")
;;
*)
echo "Usage: $0 [build|build-all|clean|update-deps]" >&2
exit 1
;;
esac
Loading