gust

March 12, 2025 ยท View on GitHub

A simple cli weather tool built with Go that provides weather forecasts in the terminal.

Installation

Option 1: Homebrew (macOS)

The easiest way to install gust at the moment is with Homebrew:

brew tap josephburgess/formulae
brew install gust

Option 2: Manual Installation

1. Clone the repository

git clone https://github.com/josephburgess/gust.git
cd gust

2. Install dependencies

go mod tidy

3. Build the binary

go build -o gust ./cmd/gust

4. Install

Move the binary to a directory in your $PATH:

mv gust /usr/local/bin/

Usage

The first time you run gust a first-time configuration wizard will get you set up in no time.

Basic Commands

# Get weather for your default city
gust

# Get weather for a specific city
gust london

Configuration Flags

These flags modify user config / settings and don't display weather by themselves

ShortLongDescription
-h--helpShow help
-S--setupRun the setup wizard
-A--api=STRINGSet custom API server URL (mostly for development)
-C--city=STRINGSpecify city name
-D--default=STRINGSet a new default city
-U--units=STRINGSet default temperature units (metric, imperial, standard)
-L--loginAuthenticate with GitHub
-K--api-keySet your api key (either gust, or openweathermap)

Display Flags

These flags control how weather information is displayed

ShortLongDescription
-a--alertsShow weather alerts
-c--compactShow today's compact weather view
-d--detailedShow today's detailed weather view
-f--fullShow today, 5-day and weather alert forecasts
-r--hourlyShow 24-hour (hourly) forecast
-y--dailyShow 5-day forecast

Authentication

gust uses a proxy api I set up and host privately, breeze, to fetch weather data. This keeps the setup flow pretty frictionless for new users.

When you first run gust:

  1. A setup wizard will guide you through the initial configuration
  2. You'll be prompted to choose an authentication method:
    • GitHub OAuth (one click sign up/in)
    • Your own OpenWeather Map API key if you prefer not to use Oauth or need much higher rate limits
      • User submitted keys will need to be eligible for the One Call API 3.0
      • The first 1000 calls every day are free but they ask for CC info to get a key
  3. If you choose GitHub OAuth:
    • Your default browser will open to complete authentication
    • No need to manually obtain or manage API keys
  4. Your credentials will be securely stored locally for future use in ~/.config/gust/auth.json

After this one-time setup, authentication happens automatically whenever you use the app.

Troubleshooting

If you encounter any auth issues, you can re-run the setup wizard or use the -L / --login (Oauth) -K / --api-key (api key) flags to re-set your key or check the local config files.