Installation
Install prun on your system using one of the available methods.
Installation
prun can be installed by building from source. This guide covers installation on Linux, macOS, and Windows.
Prerequisites
- Go 1.21 or later installed on your system
- Git (for cloning the repository, if installing from source)
Build from Source
Step 1: Clone the Repository
git clone https://github.com/BRAVO68WEB/prun
cd prunOr if you already have the source code, navigate to the project directory.
Step 2: Build the Binary
go build -o prun ./cmd/prunThis will create a prun binary in the current directory.
Step 3: Install to PATH
Linux / macOS
Move the binary to a directory in your PATH:
sudo mv prun /usr/local/bin/Or install to a user-local directory:
mkdir -p ~/.local/bin
mv prun ~/.local/bin/Make sure ~/.local/bin is in your PATH. Add this to your ~/.bashrc, ~/.zshrc, or equivalent:
export PATH="$HOME/.local/bin:$PATH"Windows
Move the binary to a directory in your PATH, or add the current directory to your PATH environment variable.
Step 4: Verify Installation
Verify that prun is installed correctly:
prun --helpYou should see the help message with available commands and flags.
Alternative: Use Directly
If you don't want to install prun globally, you can use it directly from the build directory:
./prunOr specify the full path:
/path/to/prunUsing Make
The project includes a Makefile with convenient commands:
Build
make buildRun Tests
make testRun with Example Config
make runDevelopment Installation
For development, you can build and test locally:
# Build
go build -o prun ./cmd/prun
# Test
go test ./...
# Run with your config
./prun -c prun.tomlTroubleshooting
Command Not Found
If you get a "command not found" error after installation:
-
Verify the binary exists in the PATH:
which prun # Linux/macOS where prun # Windows -
Check your PATH environment variable:
echo $PATH # Linux/macOS echo %PATH% # Windows -
Make sure the binary is executable:
chmod +x prun
Build Errors
If you encounter build errors:
-
Ensure you have Go 1.21 or later:
go version -
Update your Go modules:
go mod tidy -
Clean and rebuild:
go clean go build -o prun ./cmd/prun
Next Steps
Once installed, check out the Getting Started guide to create your first prun.toml configuration file.