Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terror/checker

A crates.io crate name availability checker
https://github.com/terror/checker

cli rust-crate utility

Last synced: 27 days ago
JSON representation

A crates.io crate name availability checker

Awesome Lists containing this project

README

        

## checker

[![Build](https://github.com/terror/checker/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/terror/checker/actions/workflows/build.yaml)
[![crates.io](https://shields.io/crates/v/checker.svg)](https://crates.io/crates/checker)

`checker` is a simple [crates.io](https://crates.io/) crate name availability checker,
it lets you easily check multiple crate names for availability and activity data.

![Screen Shot 2021-08-27 at 12 15 17 PM](https://user-images.githubusercontent.com/31192478/131159089-826dcbaa-6bd7-4604-8a4c-3f2ea1ceeeb9.png)

## Installation

Simply use cargo to install the binary

```bash
$ cargo install checker
```

## Usage

You can use checker as a command line utility or a library.

### CLI

```
checker 0.0.3
a crates.io crate name availability checker

USAGE:
checker [OPTIONS]

FLAGS:
-h, --help Prints help information
-V, --version Prints version information

OPTIONS:
-c, --check ... Check crate name availability
-o, --output Output file
```

### Library

Example:

```rust
use checker::{check, Package, Status};

let result: Package = check("t").unwrap();

assert_eq!(result.name, "t");
assert_eq!(result.is_taken(), true);
assert_eq!(result.is_inactive().unwrap(), true);

assert!(result.days_since_last_updated().unwrap() >= 1825);
assert!(result.data.is_some());
assert!(result.owners.is_some());
```