Rust CLI for Fetching a Random Word with Its Definition and Pronunciation.
CLI inspired from: https://github.com/mcnaveen/random-words-cli
- Rust: https://www.rust-lang.org/
- Random Words API: https://github.com/sanwebinfo/ts-random-words
- Download or clone the repo
git clone https://github.com/mskian/random-words-cli.git
- Create a
.env
file in the root of your project with the following content
RANDOMWORDS_API_URL=https://api.example.com/words
- it support global environment variables too
export RANDOMWORDS_API_URL=https://api.example.com/words
- Unset the Global Variable
unset RANDOMWORDS_API_URL
- Test the CLI
cargo run
cargo run -- -h
cargo run -- -v
- Production build
cargo build --release
- Random Words CLI
sudo mv target/release/randomwords /usr/local/bin/randomwords
randomwords --help
MIT