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

app wallhaven

A complete WallHaven API CLI client, allowing wallpaper download

2 unstable releases

0.2.0 Apr 19, 2024
0.1.0 Aug 25, 2022

#2517 in Command line utilities

Download history 1/week @ 2024-07-25 5/week @ 2024-09-19 3/week @ 2024-09-26 2/week @ 2024-10-03

72 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

~12–25MB
~349K SLoC