| Crates.io | sunny-cli |
| lib.rs | sunny-cli |
| version | 0.5.1 |
| created_at | 2025-07-21 17:00:42.397543+00 |
| updated_at | 2025-07-27 19:08:53.923935+00 |
| description | Check the weather from your terminal. |
| homepage | https://github.com/jamesukiyo/sunny-rs |
| repository | https://github.com/jamesukiyo/sunny-rs |
| max_upload_size | |
| id | 1762274 |
| size | 148,903 |
A simple weather app for your terminal, written in Rust.
With cargo:
cargo install sunny-cli
With npm/bun/pnpm:
npm install -g @jamesukiyo/sunny-cli
bun install -g @jamesukiyo/sunny-cli
pnpm install -g @jamesukiyo/sunny-cli
With scoop:
scoop bucket add jamesukiyo https://github.com/jamesukiyo/sunny-rs
scoop install sunny-cli
With homebrew:
brew install jamesukiyo/sunny-rs/sunny-cli
You will need a free API key from OpenWeatherMap.
A nerd font and terminal that supports emojis and true colour is recommended (see below).
See the #run section for info on how to use sunny.
A config file is created on first run at $HOME/.config/sunny.toml.
Inside it you can set the following:
city: the city to get the weather for [default: ""]api_key: your API key for OpenWeatherMap [default: ""]use_fahrenheit: whether to use fahrenheit for temperature [default: false]show_footer: whether to show the footer [default: true]show_header: whether to show the header [default: true]icons: whether to enable nerd font and emoji icons [default: true]colours: whether to enable colors [default: true][!IMPORTANT] If icons are enabled, an emoji is tried first if supported and then a nerd font icon. If neither work, the layout may be incorrect so try disabling icons or using a nerd font.
If colours are enabled, the terminal must support true colour. If not, the output will be incorrect so try disabling colours.
See example_config.toml for an example.
[!TIP] CLI arguments can and will override corresponding config values.
I recommend using the config file. Then you can run sunny without any
arguments and see the weather quickly for today.
It's also easier to override the city this way but still have a good default.
sunny # uses your default city
sunny paris # allows override
For cargo and scoop installations:
sunny # today (city in config)
sunny t # tomorrow (city in config)
sunny paris # today in paris
sunny tomorrow paris # tomorrow in paris
sunny paris --simple # today in paris, simple output
sunny t paris --simple # tomorrow in paris, simple output
For npm/bun/pnpm installations prefix with your package managers executor:
npx sunny
bunx sunny
pnpx sunny
Full help:
Usage: sunny [OPTIONS] [CITY] [COMMAND]
Commands:
today Get today's weather (default)
tomorrow Get tomorrow's weather
t Short alias for tomorrow
help Print this message or the help of the given subcommand(s)
Arguments:
[CITY] City to get the weather for [default: ]
Options:
-s, --simple Simpler output (no styling)
-r, --raw Raw JSON output
-k, --key <KEY> API key for OpenWeatherMap [default: ]
-f, --fahrenheit Use fahrenheit for temperature
-F, --no-footer Hide the credits footer from output
-H, --no-header Hide the header from output
-c, --no-colors Disable colors - good for terminals without true colour support
-C, --clean Alias for --no-header --no-footer
-i, --no-icons Disable icons - good for non-nerd fonts or lack of emoji support
-h, --help Print help
Copyright (c) James Plummer jamesp2001@live.co.uk
This project is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT)