Advent of AI 2025 - Day 1: Getting Goose to Generate Daily Fortunes in CI
Iβve edited this post, but AI helped. These are meant to be quick posts related to the Advent of AI. I donβt have time if Iβm doing one of these each day to spend a couple hours on a post. π
The advent of AI series leverages Goose, and open source AI agent. If youβve never heard of it, check it out!
The https://github.com/block/goose repository on GitHubFor Day 1 of the Advent of AI challenge, I built a GitHub Action that uses the Goose CLI to generate a daily fortune with ASCII art. I hadnβt run Goose in CI before, so I got to level up there.
What I Built#
A scheduled workflow that:
- Runs daily at 6am ET
- Uses Goose with Claude Sonnet 4 (via OpenRouter) to generate creative random daily fortunes
- Creates ASCII art featuring a sassy goose
- Automatically commits updates to the README
Check out the repo to see todayβs daily fortune!
The https://github.com/nickytonline/advent-of-ai-2025 repository on GitHubGetting Goose and CI to Play Nice#
The goose installation script is great for local dev, but in CI? Not so much. It tries to run an interactive configuration step, which obviously doesnβt work in GitHub Actions.
Key Learnings#
-
Instead of using the install script, I manually downloaded and extracted the binary:
Terminal window curl -fsSL https://github.com/block/goose/releases/download/stable/goose-x86_64-unknown-linux-gnu.tar.bz2 -o goose.tar.bz2tar -xjf goose.tar.bz2mkdir -p ~/.local/binmv goose ~/.local/bin/ -
I created a
config.yamlwith environment variables at the root level:GOOSE_PROVIDER: "openrouter"GOOSE_MODEL: "anthropic/claude-sonnet-4"keyring: falseextensions:developer:bundled: trueenabled: truename: developertimeout: 300type: builtinThe
keyring: falseis critical for CI environments. According to the documentation, when keyring is disabled, secrets should be stored in ~/.config/goose/secrets.yaml instead of your OSβ keyring/keychain. -
Complex prompts with nested quotes in bash wasnβt working so I wrote the prompt to a temp file instead and use the
-i(instruction) flag:Terminal window cat > /tmp/prompt.txt << 'PROMPT_EOF'Create a Python script called generate_fortune.py...PROMPT_EOFgoose run --no-session -i /tmp/prompt.txt -
Goose is chatty. Redirecting output keeps the logs clean:
Terminal window goose run --no-session -i /tmp/prompt.txt > /dev/null 2>&1
The Final Setup#
The workflow now:
- Installs Goose manually
- Configures it for OpenRouter
- Picks a random mood (sarcastic, wise, introspective, grumpy, or poetic)
- Asks Goose to create/run a Python script that generates the fortune
- Commits and pushes the updated README
Whatβs Next#
This could probably be improved to create and commit the script only once and then the script could receive the mood and a prompt, but I was moving pretty fast. π
Also, my ASCII art is definitely not the Mona Lisa! π€£ PRs welcome.
Not sure how far Iβll get in the Advent of AI 2025, but so far itβs fun and hopefully I can find a pocket of time each day to do it.
Even if you missed day one, still participate! Head on over to AdventOfAI.dev.
You can follow along with my Advent of AI challenge or if you want to stay in touch, all my socials are on nickyt.online.
Until the next one!
Photo by Jordyn St. John on Unsplash