#api-key #wallpaper #api #cli-client #search-query #cli #image

app wallhaven

A complete WallHaven API CLI client, allowing wallpaper download

2 unstable releases

new 0.2.0 Apr 19, 2024
0.1.0 Aug 25, 2022

#842 in Command line utilities

Download history 14/week @ 2024-02-26 20/week @ 2024-04-01 137/week @ 2024-04-15

157 downloads per month

MIT license

33KB
692 lines

github crates

A WallHaven API CLI client for getting raw/json response and downloading wallpapers, according to preferences, with API key support to use account preferences and access NSFW wallpapers.

Usage

Search wallpaper by query and extra parameters

wallhaven search --query "+cat +funny" -s VIEWS -c 110 --atleast 1920x1080 --path ~/wallpapers/

Search wallpaper by query and extra parameters and save wallpapers

wallhaven search --query "anime +funny" -s VIEWS --atleast 1920x1080 --path ~/wallpapers/

Search wallpaper by color

wallhaven search --colors 722f37 

Search random wallpaper

wallhaven search --query "" -s RANDOM

Search random wallpaper with seed

wallhaven search --query "" -s RANDOM --seed YmdCUP

Search with api key

# One time api access with api key
WALLHAVEN_API_KEY="your_api_key" wallhaven search --query "anime +cats" --purity 111 -s TOPLIST --path ~/wallpapers/
# Or
# Use api key always
export WALLHAVEN_API_KEY="your_api_key"
wallhaven search --query "anime +cats" --path ~/wallpapers/

Get Wallpaper information by id

wallhaven wallpaper-info 856dlk

Get Tag info by id

wallhaven tag-info 15

Get User Settings Requires API key

wallhaven user-settings

Get User Settings

# Get your own collections ** requieres API key **
wallhaven user-collections

# Get user public collections
wallhaven user-collections --username "some_username"

Installation

Cargo:

You can install the binary crate directly

cargo install wallhaven 

Manual Installation:

you can clone wallhaven repo and build it locally

git clone https://github.com/dax99993/wallhaven
cd wallhaven 
cargo install --path .

Features

  • API key support
  • Async
  • Download wallpapers
  • Download progress bar

Notes

License

MIT

Dependencies

~10–25MB
~365K SLoC