Skip to content

Add install script for one-command setup#18

Merged
munezaclovis merged 5 commits intomainfrom
feat/install-script
Mar 5, 2026
Merged

Add install script for one-command setup#18
munezaclovis merged 5 commits intomainfrom
feat/install-script

Conversation

@munezaclovis
Copy link
Copy Markdown
Contributor

Summary

  • Adds install.sh — a curl-pipe installer so users can set up pv with a single command:
    curl -fsSL https://pv.prvious.dev/install | bash
    
  • Downloads the pv binary to /usr/local/bin, then runs pv install to bootstrap the full environment (PHP, FrankenPHP, Composer, Mago, DNS, HTTPS certs)

Features

  • Progress bar with / characters in purple
  • Rosetta detection — catches x86 shells running on ARM Macs
  • Version pinning--version 0.2.0 to install a specific release
  • PHP version passthrough--php 8.4 forwarded to pv install
  • Auto PATH setup — detects zsh/bash/fish, writes to the correct config file, deduplicates
  • Idempotent — safe to run twice, detects existing installations
  • --no-modify-path — for CI environments
  • GitHub Actions support — writes to $GITHUB_PATH
  • Clean error messages on download failure (not raw curl output)

What it delegates

The script does NOT duplicate any PHP/FrankenPHP/Composer/Mago/DNS/cert logic. It only gets the pv binary in place and runs pv install --force, which already handles all of that with its own step-by-step output.

Prerequisites

This script expects release assets named pv-darwin-arm64 and pv-darwin-amd64 on GitHub releases. A release workflow for the Go binary is needed before this script is functional.

Allows users to install pv with:
  curl -fsSL https://pv.prvious.dev/install | bash

Downloads the pv binary to /usr/local/bin, then runs pv install to
bootstrap the full environment (PHP, FrankenPHP, Composer, Mago, DNS,
HTTPS certs). Includes progress bar, Rosetta detection, shell PATH
auto-setup, and GitHub Actions support.
@munezaclovis munezaclovis force-pushed the feat/install-script branch from 6407987 to 6eb690e Compare March 5, 2026 05:27
- Change default install location from /usr/local/bin to ~/.local/bin
  so updates no longer require sudo
- Add --install-dir flag for custom install locations
- Update pv env to include ~/.local/bin in PATH output
- Keep sudo -v for DNS resolver and CA trust setup only
@munezaclovis munezaclovis merged commit 3f99d09 into main Mar 5, 2026
2 checks passed
@munezaclovis munezaclovis deleted the feat/install-script branch March 5, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant