#cli #search #package

app alpakr-cli

Alpakr CLI 🦙 a package lookup tool for: crates, npm, pypi, and more

2 unstable releases

0.2.3 Apr 21, 2022
0.1.9 Apr 4, 2022
0.1.7 Mar 28, 2022

#2812 in Command line utilities

Download history 1/week @ 2023-10-13 1/week @ 2023-10-20 18/week @ 2023-10-27 5/week @ 2023-11-03 4/week @ 2023-11-10 12/week @ 2023-11-17 23/week @ 2023-11-24 34/week @ 2023-12-01 11/week @ 2023-12-15 22/week @ 2023-12-22 2/week @ 2024-01-05 1/week @ 2024-01-12 12/week @ 2024-01-19 46/week @ 2024-01-26

61 downloads per month

MIT license

12KB
138 lines

Alpakr CLI 🦙

A simple package lookup service that isn't too strict about its inputs. Paste a snippet of names and Alpakr will do it's best to provide info about the packages.

Alpakr

Conjugation of 'All' and 'Packager' and pronounced the friendly fury alpaca.

\ ăl-păk′ə \

Install

cargo install alpakr-cli

Usage

Copy paste a fragment from a Cargo.toml, package.json or python requirments.txt file and pipe it to alpakr.

$ echo "
console = "0.15.0"
base64 = "0.13.0"
serde = { version = "1.0", features = ["derive"] }" | alpakr

Example output:

console -> A terminal and console abstraction for Rust
https://crates.io/crates/console

base64 -> encodes and decodes base64 as bytes or utf8
https://crates.io/crates/base64

serde -> A generic serialization/deserialization framework
https://crates.io/crates/serde

Note: for best result paste at least one full line, but more is better.

Other ways to query

$ grep -A 3 "console" Cargo.toml | alpakr
$ alpakr <enter>
console = "0.15.0"
base64 = "0.13.0"
serde = { version = "1.0", features = ["derive"] }
<ctrl-d>
# If you are on Mac use `pbpaste`
$ pbpaste | alpakr

Options

  • --verbose: see encoded payload and full response
  • --json: output as JSON

Supported package managers

  • cargo (crates.io)
  • cargo compiling (crates.io)
  • composer (packagist.org)
  • gem (rubygems.org)
  • gomod (pkg.go.dev)
  • npm (npmjs.com)
  • pip (pypi.org)

Motivation

In short. I read a lot of code in many different languages. Part of that is looking into what third party packages are used. This can be by reading package.json files or skimming through the text when compiling a Rust program. I wanted to make it easier to learn about packages I don't know about.

Dependencies

~9–22MB
~331K SLoC