6 releases

0.4.0 Jan 4, 2020
0.2.0 Jan 3, 2019
0.1.4 Aug 25, 2018

#28 in #instant

MIT license

25KB
209 lines

howto

circleci lib crate.io lib docs.rs bin crate.io License: MIT

Get instant coding answers via the command line. Inspired by gleitz/howdoi

The Library

Usage

let answers = howto(&query).await;
let answer = answers.next().await.unwrap();

println("{}", answer.instruction);

The CLI

Installation

Run with Docker

docker run --rm -it pbzweihander/howto QUERY

Install with Cargo

cargo install howto-cli
howto QUERY

Build yourself

git clone https://github.com/pbzwehiander/howto.git
cd howto/howto-cli
cargo build --release
cargo install --path .
howto QUERY

Usage

howto-cli 0.3.0

USAGE:
    howto-cli [FLAGS] [OPTIONS] [query]...

FLAGS:
    -h, --help       Prints help information
    -f, --full       Whether display the full text of the answer
    -l, --link       Whether display only the answer link
    -V, --version    Prints version information

OPTIONS:
    -n, --num-answers <num-answers>    Number of answers to return [default: 1]
    -p, --position <position>          Select answer in specified position [default: 0]

ARGS:
    <query>...    

Dependencies

~11–16MB
~306K SLoC