Apple
How I Built an Animated Weather Dashboard in Alfred 6
alfred-6-weather-dashboard-workflow
I wanted to check the weather on my Mac the same way I launch an app. Type a word, press Return, get what I came for. In Bryan’s Weather, that word is weather. Alfred opens a dashboard with current conditions, the next six hours, and a seven day forecast. The current conditions card changes with the weather. Rain streaks across it, snow drifts down, and clear nights get a field of stars.
In my earlier Alfred 6 article, I wrote about how familiar the launcher still feels and how much more you can do once you start building workflows. This dashboard is a concrete example. A keyword opens the interface, a script gets the data, and Alfred updates the same window with the result. Read Alfred 6 Looks Familiar but These Four Changes Matter.

Try Bryan’s Weather
You’ll need Alfred 6 with an active Powerpack license and an internet connection for fresh weather and location searches. Open the .alfredworkflow file to import it, then type weather in Alfred and press Return. The default location is Pittsburgh, Pennsylvania, and temperatures start in Fahrenheit. Alfred can run the imported workflow with tools already included in macOS. Alfred workflow installation guide.
Try weather London, United Kingdom or enter a city or ZIP code in the dashboard. If Alfred shows several matches, choose one and click Show. Click Save home to make that city your default. Home returns you there, Refresh requests fresh data, and the unit menu switches between Fahrenheit and Celsius.
1. Connect a keyword to an Alfred UI
In Alfred Preferences → Workflows, create a blank workflow. Add a Keyword input and an Alfred UI object, then connect them. Give the input a keyword such as myweather while you experiment, especially if you’ve already imported Bryan’s Weather. Set the argument to Optional so the keyword can open your default city on its own or accept a location after it. In the Alfred UI object, create Weather.alfredui and choose Open within Alfred. Alfred’s setup tutorial.
Open the package’s ui.json and start with one label. Its ID is status, which the script will use to update the text. The launched event runs the script when the window opens. Alfred UI layouts, Alfred UI script actions.
{
"window": {
"padding": 16,
"root": {
"type": "view",
"layout": "stack",
"components": [
{ "type": "label", "id": "status", "text": "Loading weather…" }
],
"events": [
{
"triggers": "launched",
"action": { "type": "script", "src": "scripts/weather", "async": true }
}
]
}
}
}
2. Fetch one temperature
Start with fixed coordinates. Save the following as scripts/weather inside Weather.alfredui. It asks Open-Meteo for Pittsburgh’s current temperature, reads that value from the response, and sends Alfred a JSON update for the status label. Open-Meteo forecast API, Alfred UI update action.
#!/bin/zsh --no-rcs
url='https://api.open-meteo.com/v1/forecast?latitude=40.44062&longitude=-79.99589¤t=temperature_2m&temperature_unit=fahrenheit&timezone=auto'
if response=$(/usr/bin/curl -fsS --max-time 12 "$url") &&
temp=$(/usr/bin/plutil -extract current.temperature_2m raw -o - - <<< "$response") &&
weather_text=$(printf 'Pittsburgh · %.0f °F' "$temp"); then
printf '{"update":{"relayout":true,"ids":{"status":{"text":"%s"}}}}\n' "$weather_text"
else
printf '{"update":{"relayout":true,"ids":{"status":{"text":"Weather unavailable"}}}}\n'
fi
From inside Weather.alfredui in Terminal, run chmod +x scripts/weather. Run ./scripts/weather there to see the JSON, then launch myweather in Alfred. The label should switch from Loading weather… to the temperature. The finished workflow uses macOS JavaScript for Automation to handle the larger response and emits the same kind of update.
3. Add location search and the forecast

Pass the city name or ZIP code to Open-Meteo’s geocoding API. Use the latitude and longitude of the selected result in the forecast request. If several places match, display the city, region, and country in a picker so people can choose the right one. Store the chosen home and temperature unit as persistent Alfred UI variables. Open-Meteo geocoding API, Alfred UI variables.
Next, request hourly temperatures and precipitation probabilities, plus daily highs and lows. Set timezone=auto so the forecast times follow the selected city. Pick the hourly entries starting at its current hour, and keep the time of the current conditions visible. The finished workflow caches forecasts for ten minutes. If a request fails, it can show a saved response up to six hours old and says when that response was fetched. Open-Meteo forecast parameters.
The first version showed why it’s worth testing with the full forecast. Alfred opened a short window for the loading message. When the weather arrived, the cards appeared but their contents were clipped. Setting window.size.height to 660 in this layout gave the forecast room from the moment the workflow opened. Test your own height with all the cards populated. Alfred UI window sizing.
4. Animate the current conditions card
Add weather_code and is_day to the current conditions request. A code of 0 means clear skies. Pair it with is_day to choose between a warm glow and stars. Use the rain and snow codes for falling particles, fog codes for drifting mist, and thunderstorm codes for a violet backdrop with rain. Open-Meteo weather code table.
I put the effect in a webkitview behind the temperature, icon, and other native labels using Alfred’s stack layout. The workflow supplies the HTML and CSS directly. The particles run with CSS keyframes, and prefers-reduced-motion leaves a still scene when Reduce Motion is enabled. To try your own effect, start with one color gradient, then add the animation after checking the text against the brightest part of the card. Alfred’s WebKit component, Alfred’s stack layout.

Rebuild the workflow from the included source
The download includes the readable source under source/. Start with weather_core.js for the API requests and forecast formatting, weather_ui.js for the Alfred interface, and weather_effects.js for the scenes. weather_app.js connects searches, refreshes, and unit changes to the UI. weather_runtime.js handles macOS networking and the local cache.
To make your own importable copy, unzip the download into a fresh folder. From that folder, run node --test source/*.test.js, then python3 source/build_package.py. The builder writes the new .alfredworkflow file into source/build/. Node and Python are needed for these development steps. Installing and running the finished workflow requires Alfred and the tools bundled with macOS.
I’d start with one city and one number. Once your keyword puts the temperature in a window, you have the pieces you need to add a different city, tomorrow’s forecast, or your own version of falling snow.
Weather data comes from Open-Meteo. Location search uses GeoNames data through Open-Meteo. The workflow uses the free forecast API for personal, noncommercial use. Open-Meteo terms, data attribution.