Prun

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 prun

Or if you already have the source code, navigate to the project directory.

Step 2: Build the Binary

go build -o prun ./cmd/prun

This 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 --help

You 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:

./prun

Or specify the full path:

/path/to/prun

Using Make

The project includes a Makefile with convenient commands:

Build

make build

Run Tests

make test

Run with Example Config

make run

Development 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.toml

Troubleshooting

Command Not Found

If you get a "command not found" error after installation:

  1. Verify the binary exists in the PATH:

    which prun  # Linux/macOS
    where prun  # Windows
  2. Check your PATH environment variable:

    echo $PATH  # Linux/macOS
    echo %PATH% # Windows
  3. Make sure the binary is executable:

    chmod +x prun

Build Errors

If you encounter build errors:

  1. Ensure you have Go 1.21 or later:

    go version
  2. Update your Go modules:

    go mod tidy
  3. 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.

On this page