pacapt-go

command module
v0.0.0-...-8332c2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: BSD-2-Clause Imports: 4 Imported by: 0

README

pacapt-go

Introduction

pacapt is a wrapper for many package managers with pacman-style command syntax.

Note: To start with, we choose to focus on homebrew. Support for more package managers will be added Soon™.

Use one syntax to rule them all!

Warning: WIP

This is an experimental port of icy/pacapt in Golang. We choose Golang for better readability, better testing, and hopefully without loss of portability.

Now the implementations of different package managers are all placed in dispatch package, with names like impl_xxx.go.

To play along at home:

git clone https://github.com/rami3l/pacapt-go.git
cd pacapt-go

... and then try something like:

go run main.go -S curl

Installation

To install:

go install "github.com/rami3l/pacapt-go"

To uninstall:

go clean -i "github.com/rami3l/pacapt-go"

We currently provide go install only. PPAs might be added when appropriate.

For Homebrew users:

  • To use -Rs, you need to install rmtree first:

    brew tap beeftornado/rmtree
    

Implemented Features

  • Homebrew support: Experimental.

    • Automatic brew cask invocation: implemented for -S, -R, -Su, and more.

      go run main.go -S curl --dryrun
      >> brew install curl
      
      go run main.go -S gimp --dryrun
      >> brew cask install gimp
      
  • Chocolatey support: Experimental.

    • Tips: Don't forget to run in an elevated shell! You can do this easily with tools like gsudo.
  • Dpkg/Apt support: Experimental.

  • --dryrun, --dry-run: Use this flag to just print out the command to be executed (sometimes with a --dry-run flag to activate the package manager's dryrun option).

    • Some query commands might still be run, but anything "big" should have been stopped from running, eg. installation. For instance:

      # Nothing will be deleted here:
      pacapt-go -Sc --dryrun
      >> brew cleanup --dry-run
      .. (showing the files to be removed)
      
      # Without `--dryrun`, the forementioned files will be removed:
      pacapt-go -Sc
      >> brew cleanup
      .. (cleaning up)
      
  • --yes, --noconfirm, --no-confirm: Use this flag to trigger the corresponding flag of your package manager (if possible) in order to answer "yes" to every incoming question. Potentially dangerous if you don't know what you're doing!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL