shiba
Shiba CLI

Command-line interface (CLI) to display a random Shiba Inu whenever needed, by just running shiba on your terminal.

SoMuch SuchCool MuchWow

How To UseHow Does It Work?Why?Build ManuallyTODOs

## How to use > **Note:** Pre-compiled binaries will be available soon. Currently, you need to compile the program on your machine. Fortunately, Rust makes this process extremely easy. ### Install Rust If you don't have [Rust](https://www.rust-lang.org/) installed on your system, you will need to install it.
Linux, macOS, and Unix-based systems - Run the following in your terminal ```console curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` - Follow the on-screen instructions
Windows - Download the installer from [here](https://www.rust-lang.org/tools/install) - Run the installer and follow the on-screen instructions
### Install Shiba ```console cargo install --git https://github.com/giacomo-b/shiba.git ``` You should be able to just run `shiba` from anywhere on your system, and that should present you with a new picture every time. ## How does it work? `shiba CLI` is based on [shibe.online](https://shibe.online/), which provides a free, public API to get random shibes. ## Why? Why not? ## Build manually **TL;DR:** compile with Rust and move the binary/executable to a folder in your path. If you don't have Rust on your system, follow the [instructions above](#install-rust) to install it. ### Build the program #### Get the code You can clone the repo using SSH by running: ```console git clone [email protected]:giacomo-b/shiba.git ```
Alternative methods to get the code You may also: - Clone using HTTPS ```console git clone [email protected]:giacomo-b/shiba.git ``` - Download the [zip](https://github.com/giacomo-b/shiba/archive/refs/heads/master.zip).
#### Compile with Rust ```console cd shiba && cargo build --release ``` ### Run To run the code from the `shiba` folder, run: ```console cargo run --release ``` or just launch the binary generated in `shiba/target/release`. If you want to be able to run `shiba` from any location on your system, you will have to move the generated binary to the appropriate folder depending on your system:
Linux and most Unix-based systems - Run the following from within the `shiba` folder ```console sudo mv ./target/release/shiba /bin/ ``` - Restart terminal
macOS - Run the following from within the `shiba` folder ```console sudo mv ./target/release/shiba /usr/local/bin/ ``` - Restart terminal
Windows - Place `shiba.exe` (found in `shiba/target/release/`) in a directory of your choice (such as `C:\your\path\here\`) - Run the following: ```console set PATH=%PATH%;C:\your\path\here\ ``` - Restart terminal
Now you should be able to just run `shiba` from anywhere on your system, and that should present you with a new picture every time. ## TODOs - [ ] Add CI workflows - [ ] Perform compilation checks - [ ] Automatically generate builds - [ ] Reduce binary size (?) - [ ] Add command-line options - [ ] shibe.online's [API](https://shibe.online/) accepts `count`, maybe more than one Shiba could be display on demand?