Skip to content

devopsjester/my-weather-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather CLI

A simple command-line weather application that shows current weather conditions using free, no-registration-required APIs.

Installation

  1. Clone the repository
  2. Create a virtual environment:
    python3 -m venv venv
    source venv/bin/activate  # On Unix/macOS
    # or
    .\venv\Scripts\activate  # On Windows
  3. Install the package:
    python3 -m pip install -e .

Usage

The CLI provides two main commands:

Check Location

Show city and state for a location:

weather where-is  # Shows your current location
weather where-is --zipcode 90210  # Shows location for a specific ZIP code

Check Weather

Show current weather conditions:

weather current  # Shows weather for your current location
weather current --zipcode 90210  # Shows weather for a specific ZIP code

Development

Running Tests

python -m pytest tests/

Creating a Release

To create a new release:

  1. Update the version in weather_cli/__init__.py
  2. Create and push a new tag:
    git tag v0.1.0
    git push origin v0.1.0

The GitHub Actions workflow will automatically:

  • Create a GitHub release
  • Build and publish the package to GitHub Packages

APIs Used

  • Location lookup: zippopotam.us (free, no API key required)
  • Weather data: Open-Meteo (free, no API key required)
  • IP Geolocation: ip-api.com (free, no API key required)

About

A simple weather CLI app using free APIs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages