qpm

package module
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 18 Imported by: 0

README

qpm

📦 Qanat Package Manager

Installation

# Using go
go install github.com/anoriqq/qpm@latest

# Using sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/anoriqq/qpm/main/install)"

If needed, you can download binaries from the releases page.

Usage

Qanat Package Manager

Usage:
  qpm [command]

Available Commands:
  aquifer     Manage aquifer
  completion  Generate the autocompletion script for the specified shell
  config      Manage qpm config
  help        Help about any command
  install     Install specifc package
  uninstall   Unnstall specifc package

Flags:
  -h, --help      help for qpm
  -v, --version   version for qpm

Use "qpm [command] --help" for more information about a command.

Aquifer

Aquifer defines the package installation and uninstallation plans.
It has the following directory structure.

.
└── pkgName.yml

Please refer to the template for the yml file.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPackageAlreadyInstalled = errors.New("package already installed")
View Source
var OSs = map[string]OS{
	string(linux):  linux,
	string(darwin): darwin,
}

Functions

func Execute

func Execute(c Config, st stratum, action Action, stdout, stderr io.Writer) error

Execute aquiferを実行する。

func IsAlreadyInstalled

func IsAlreadyInstalled(name string) (bool, error)

func PullAquifer

func PullAquifer(ctx context.Context, c Config) error

PullAquifer AquiferをRemoteから取得する。

func ReadStratum

func ReadStratum(c Config, name string) (stratum, error)

ReadStratum AquiferPathにあるStratumのうち、指定されたStratumを取得する。

func Version

func Version() string

Types

type Action

type Action string
const (
	Install   Action = "install"
	Uninstall Action = "uninstall"
)

func (Action) String added in v0.0.15

func (a Action) String() string

type Config

type Config struct {
	AquiferPath   string
	AquiferRemote *url.URL

	GitHubUsername string
	GitHubToken    string

	Shell []string
}

type OS

type OS string

func (OS) String added in v0.0.15

func (os OS) String() string

Directories

Path Synopsis
cmd
qpm

Jump to

Keyboard shortcuts

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