Skip to content

TropicalDevApps/pacwin

Repository files navigation

pacwin logo

pacwin

One CLI. Three managers. Zero excuses.
Unified, pacman-inspired package management layer for Windows (winget, chocolatey, scoop).

PowerShell Gallery License MIT Built with PowerShell Platform


pacwin rebranding


Overview

pacwin unifies winget, chocolatey, and scoop behind a single, pacman-inspired interface for Windows. If you've ever typed pacman -Syu out of pure muscle memory on a PowerShell prompt—and felt the void when it didn't work—this tool was written for you.

For command-line users, this project provides a powerful CLI interface to interact with multiple package managers concurrently.

At its heart lies pacwin.psm1, a high-performance orchestration layer. Built upon PowerShell 5.1 and PowerShell 7+, it exposes a consistent syntax across otherwise fragmented tools.

For end-users, pacwin ships with a unified search engine, cross-manager updates, and intelligent error interpretation.


Using as a CLI Tool

The CLI provides a straightforward interface to interact with your package managers using either verbose or pacman-style shorthand.

pacwin in action

Unlike standard wrappers, pacwin is designed for speed. If you are building a dev environment or orchestrating systems, you can drop pacwin directly into your workflow.

pacwin -Ss vim        # Search across all managers
pacwin -S neovim      # Install from the best available source
pacwin -Syu           # Update everything

Why use pacwin?

  • Zero Cognitive Load: Use the syntax you already know from Linux.
  • Hybrid Concurrency: Uses threads (Runspaces) instead of heavy processes for 3x faster searches.
  • Decoded Status: Real-time decoding of cryptic Windows exit codes.
  • Smart Filtering: Easily force specific managers with the -Manager flag.

Installation

Via PowerShell Gallery (Recommended)

Install-Module -Name pacwin -Scope CurrentUser

Via curl (One-Liner)

curl -sSL https://raw.githubusercontent.com/julesklord/pacwin/main/get-pacwin.ps1 | powershell -Command -

From Source

git clone https://github.com/julesklord/pacwin.git
cd pacwin
.\install.ps1

Key Features (v0.4.0)

  • Multi-Manager Search: Concurrent scanning of Winget, Chocolatey, and Scoop.
  • Intelligent Selection: Yaourt-style interactive prompts for numbered package selection.
  • Robust Parsers: Locale-aware column detection and noise filtering for consistent output.
  • Security Hardened: Strict input sanitization and path validation to prevent shell injection.
  • Unified Concurrency: Automatic detection of PS version to use the fastest async model available.
  • Diagnostic Doctor: Health check tool to verify manager status and PATH configuration.
  • State Management: Export/Import package lists to JSON for backup or migration.

Technical Architecture

pacwin operates as a high-level abstraction layer that standardizes input and normalizes output from external CLIs.

graph TD
    User([User]) -->|CLI Flags/Commands| Frontend(pacwin entry point)

    subgraph pacwin Workspace
        Frontend -->|Dispatch| Core(Orchestrator)

        subgraph Core Engine
            Core --> Concurrency[Hybrid Concurrency Engine]
            Core --> Parsers[Normalized Parsers]
            Concurrency --> Winget[Winget Wrapper]
            Concurrency --> Choco[Choco Wrapper]
            Concurrency --> Scoop[Scoop Wrapper]
            Parsers --> Output[ASCII Table Renderer]
        end
    end

    Winget -->|exec| W_CLI[winget.exe]
    Choco -->|exec| C_CLI[choco.exe]
    Scoop -->|exec| S_CLI[scoop.ps1]
    W_CLI -.-> Network((Internet))
    C_CLI -.-> Network
    S_CLI -.-> Network
Loading

Core Components

  • pacwin.psm1: The main script module containing the dispatch logic and search engine.
  • _pw_search_all: The concurrency fan-out core using RunspacePool or Parallel pipelines.
  • _pw_parse_*: Dedicated parsers for each manager's unique output format.

Core Lifecycle

The application follows this workflow from user interaction to package operation.

stateDiagram-v2
    [*] --> Init : Command Entered
    Init --> Sanitize : Check Query
    Sanitize --> Dispatch : Route by Regex
    Dispatch --> Concurrency : Multi-Manager Search
    Dispatch --> DirectOp : Direct ID Operation

    state Concurrency {
        [*] --> ExecAsync
        ExecAsync --> ParseOutput
        ParseOutput --> [*]
    }

    Concurrency --> Render : Results found
    DirectOp --> ExternalCLI : Execute manager
    Render --> Interactive : Selection prompt
    Interactive --> ExternalCLI : User chooses #
    ExternalCLI --> [*] : Success / Failure
Loading

Key Engineering Decisions

  • Single file: No compilation or dependencies for maximum portability.
  • Same-process concurrency: Thread-based async execution to avoid process overhead.
  • Normalized model: All parsers emit a standard PSCustomObject for reliable piping.

Command Reference

For a comprehensive breakdown, see the Wiki.

Full Command Short Alias Description
pacwin search -Ss Search across all managers.
pacwin install -S Install a package from source.
pacwin update -Syu Update all installed packages.
pacwin list -Q View all installed packages.
pacwin doctor check Verify system health.

Roadmap & Milestones

Version Status Milestone
v0.1.0 First hybrid search engine release.
v0.2.0 Export/Import and Tab Completion.
v0.3.0 Major performance refactor & test coverage.
v0.4.0 Fixed Scoop detection (sfsu hook support).
v0.4.0 UI Rebrand & Enhanced Telemetry.

Acknowledgments

  • Arch Linux Pacman — For the superior syntax that inspired this project.
  • Scoop — For making Windows package management actually usable.

Contributing

Pull requests are welcome. For major changes, open an RFC issue first. See CONTRIBUTING.md for guidelines.

License

Engineered by julesklord.
Released under the terms of the MIT License.

About

Unify winget, chocolatey, and scoop under a fast, secure, pacman-like CLI for Windows.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors