archr

Search for and download Arch Linux packages

Usage no npm install needed!

<script type="module">
  import archr from 'https://cdn.skypack.dev/archr';
</script>

README

archr

Search for and download Arch Linux packages. Provides both a module and a command line tool.

Installation

$ npm install archr

Usage

var archr = require('archr');

See archr.defaults for configurable defaults.

Search

// archr.search(query, [repo], [arch]) -> {Promise}

archr.search('linux').then(function(pkgs) {
  // pkgs is an array of package data objects
});

Individual Package

// archr.package(pkgname, [repo], [arch]) -> {Promise}

archr.package('linux', 'testing').then(function(pkg) {
  // pkg is a single package data object
});

Download URI

// archr.uri(pkgname, [repo], [arch]) -> {Promise}

archr.uri('linux', 'testing').then(function(uri) {
  // uri is a URI to download testing/linux
});

Command Line

Commands:

  search <query>
  download <pkg> [pkg...]

Options:

  -h, --help         output usage information
  -V, --version      output the version number
  -a, --arch <arch>  system architecture
  -d, --dir <dir>    path to save downloads
  -q, --quiet        no version output

Examples

Search for keyword on all repos:

$ archr search linux

Search for keyword on a specific repo:

$ archr search testing/linux

Download package (change mirror in archr.defaults):

$ archr download testing/linux

License

This software is released under the terms of the MIT license. See LICENSE.