Skip to main content

A minimal, cute and customizable weather cli

Project description

starlit

A minimal and customizable weather CLI, written in Python 🐍

preview Powered by the OpenWeatherMap API and styled with the Python rich library + terminal text effects ✨

GitHub Repo stars GitHub Issues or Pull Requests GitHub commit activity GitHub repo size

Requirements

  • Python 3.13+
  • Poetry or pip package manager
  • An OpenWeatherMap API key
  • UTF-8 terminal with 256 colors and nerd font

Installation

You can install starlit with pip or the Poetry package manager, depending on your preferred workflow.

Install with pip

  1. Clone this repository
git clone https://github.com/ashuhlee/starlit.git
cd starlit
  1. Create a virtual environment (optional)

Do this if you'd like to keep starlit’s dependencies clean and separate from other Python projects.

Create the virtual environment:

# macOS / Linux / Windows
python -m venv .venv

Activate the virtual environment:

# macOS / Linux
source .venv/bin/activate
# Windows (Powershell)
.venv\Scripts\Activate
  1. Install dependencies

Some packages are required for this project. They will automatically be installed if you run:

pip install .
  1. Set up your .env file

Generate your configuration file from the example template:

starlit --setup

Alternatively, you can manually copy the .env.example file:

cp .env.example .env

Then open it in your default editor:

starlit --edit

Install with Poetry

  1. Clone this repository
git clone https://github.com/ashuhlee/starlit.git
cd starlit
  1. Install dependencies

Install project dependencies and set up a virtual environment automatically:

poetry install
# run the command that prints out when you run:
poetry env activate
  1. Set up your .env file

Generate your configuration file from the example template:

starlit --setup

Then open it in your default editor:

starlit --edit

Get your OpenWeatherMap API key and paste it into the .env file under API_KEY=

Configuration

starlit uses a .env file to store your API key, default city, and display preferences

Setting Description
API_KEY Your OpenWeatherMap API key
DEFAULT_CITY The city shown when you don’t pass one
UNITS Options: metric (°C) or imperial (°F)
DISABLE_ANIMATION Turns off all animations in starlit
SHOW_DT Shows local date and time
SHOW_ASCII Shows the little ASCII art to the left
SHOW_MSG Adds a cute message at the bottom
SHOW_EMOJI Shows emojis in your terminal
EMOJI_TYPE Choose a cute emoji for messages

(Optional) Customize colors

You can also set your own colors for the gradient title and message labels. Use six-digit RGB hex codes (no # needed):

Setting Description Example
COLOR_1 Gradient color stop 1 color1 5D63FF
COLOR_2 Gradient color stop 2 color1 F7A4F4
LABEL_COLOR Message label color color1 5CE7F9

Usage

# basic usage
starlit

# specify city via command line
starlit seattle

# start interactive mode
starlit --interactive 

# opens the .env file in your default editor
starlit --edit

# shows config in .env file (if found)
starlit --config

# shows contents of .env file (if found)
starlit --config --show-full

# show version
starlit --version

# show help
starlit --help

Usage examples

preview-1 preview-2
preview-3 preview-4
preview-5 preview-6

What's next

  • 🎨 Color Themes: Support for .json theme files so you can easily switch between color palettes
  • 🌍 Multi-language Support: Option to view weather info in different languages

Tech stack

About this project

I built this fun little project as a way to learn more about APIs and creating colorful terminal apps. It grew into a CLI project I'm proud of!

Thank you to charm for the color palette inspo 🎨 and to wego for the ASCII icons

⭐ If you like this project, please consider giving it a star!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starlit_cli-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

starlit_cli-0.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file starlit_cli-0.1.0.tar.gz.

File metadata

  • Download URL: starlit_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Darwin/24.6.0

File hashes

Hashes for starlit_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 958135cda897c2407aec5cdd783a8ec5d29ff7dac906ce97714b03dbca34d25c
MD5 3c0c45278cee1f85c5962d57157166b5
BLAKE2b-256 b27a3db107ba541fbbd216cc25d63ca4ca85f16cac763f4c161c5e9c1c9aa5ad

See more details on using hashes here.

File details

Details for the file starlit_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: starlit_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Darwin/24.6.0

File hashes

Hashes for starlit_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 456ef397fb091d5e0c826c5a36994483a5dc8b74d2878870a49727d597864b03
MD5 68fecca66bcdd81752f9034f7b0f3dc6
BLAKE2b-256 b2a3d8b8d322f7446d8e8cfece6743bef29600c9420ba792306b3ba55d63dc11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page