PassAGE/INSTALL.md
fraggle c6e3c35a80 Change default install directory to /usr/bin
- Update Makefile PREFIX default from /usr/local to /usr
- Update INSTALL.md uninstall instructions to reflect /usr/bin
2026-01-11 19:07:34 -04:00

174 lines
2.8 KiB
Markdown

# Installation Guide
Complete installation instructions for PassAGE.
**Quick Install:** `go install <repository-url>@latest`
## Quick Install
### Using Go (Recommended)
```bash
go install <repository-url>@latest
```
### From Source
```bash
# Clone repository and build
git clone <repository-url>
cd PassAGE
make install
# Or for user installation (no sudo)
make install-user
```
## System Requirements
- **Go 1.21 or later** - Required for building from source
- **Linux/Unix system** - Designed for Unix-like operating systems
- **xclip or wl-clipboard** - For clipboard support (X11/Wayland)
## Build Dependencies
### Required
- Go toolchain (1.21+)
### Optional
- **pandoc** - For building manpages
- Debian/Ubuntu: `sudo apt-get install pandoc`
- Arch: `sudo pacman -S pandoc`
- Or use `go-md2man`: `go install github.com/cpuguy83/go-md2man/v2@latest`
## Installation Steps
### 1. Clone the Repository
```bash
git clone <repository-url>
cd PassAGE
```
### 2. Download Dependencies
```bash
go mod download
```
This downloads all required Go modules.
### 3. Build
```bash
# Simple build
go build -o passage .
# Or use Makefile
make build
# Release build (optimized, smaller)
make build-release
```
### 4. Install
**System-wide (requires sudo):**
```bash
sudo make install
```
**User installation (no sudo):**
```bash
make install-user
```
### 5. Install Manpage (Optional)
**System-wide:**
```bash
make man
sudo make install-man
```
**User installation:**
```bash
make man
make install-user-man
```
## Verify Installation
```bash
# Check version
passage version
# View help
passage help
# View manpage (if installed)
man passage
```
## Troubleshooting
### Build Fails
1. **Check Go version:**
```bash
go version # Should be 1.21 or later
```
2. **Verify dependencies:**
```bash
go mod verify
go mod tidy
```
3. **Clean and rebuild:**
```bash
make clean
make build
```
### Manpage Won't Build
Install `pandoc`:
- Debian/Ubuntu: `sudo apt-get install pandoc`
- macOS: `brew install pandoc`
Or use `go-md2man`:
```bash
go install github.com/cpuguy83/go-md2man/v2@latest
```
### Clipboard Doesn't Work
Ensure you have clipboard tools installed:
- X11: `xclip` or `xsel`
- Wayland: `wl-clipboard`
Install:
- Debian/Ubuntu: `sudo apt-get install xclip` or `sudo apt-get install wl-clipboard`
- Arch: `sudo pacman -S xclip` or `sudo pacman -S wl-clipboard`
- Other distributions: Install `xclip` or `wl-clipboard` from your package manager
## Uninstallation
```bash
# Remove binary
sudo rm /usr/bin/passage
# or for user installation
rm ~/.local/bin/passage
# Remove manpage
sudo rm /usr/share/man/man1/passage.1
# or for user installation
rm ~/.local/share/man/man1/passage.1
# Update man database
sudo mandb
# or
mandb ~/.local/share/man
```