For Day 1 of my 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!

+====================================================================+ | | | 🔮 MYSTICAL FORTUNE TELLER 🔮 | | | | Generated on: 2025-12-02 at 06:39:22 | | | | ✨ YOUR POETIC FORTUNE ✨ | | | | The moonbeams dance upon your door, | | Bringing treasures from distant shore. | | With heart so pure and mind so keen, | | Wonders await, as yet unseen. | | | | | +====================================================================+ +--------------------------------------------------------------------+ +====================================================================+ | | | 🦢 PRESENTED BY YOUR SASSY GOOSE ORACLE 🦢 | | | | .-""-. | | /  | | | o o | | | | < | | | | ___ | | |  ___ / | | '--^--' | | /  | | / HONK!  | | / 🦢  | | ( ___ ) | |  /  / | | | | ^ ^ | |

Getting Goose and CI to Play Nice

The 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

1. Skip the install script, go manual

Instead of using the install script, I manually downloaded and extracted the binary:

curl -fsSL https://github.com/block/goose/releases/download/stable/goose-x86_64-unknown-linux-gnu.tar.bz2 -o goose.tar.bz2 tar -xjf goose.tar.bz2 mkdir -p ~/.local/bin mv goose ~/.local/bin/ 

2. Config file structure matters

Goose uses config.yaml with environment variables at the root level:

GOOSE_PROVIDER: "openrouter" GOOSE_MODEL: "anthropic/claude-sonnet-4" keyring: false extensions: developer: bundled: true enabled: true name: developer timeout: 300 type: builtin 

The keyring: false is critical for CI environments.

3. API key confusion

4. Bash quoting issues

Complex prompts with nested quotes in bash? Nope. I solved this by writing the prompt to a temp file and using the -i (instruction) flag:

cat > /tmp/prompt.txt << 'PROMPT_EOF' Create a Python script called generate_fortune.py... PROMPT_EOF goose run --no-session -i /tmp/prompt.txt 

4. Suppress the noise

Goose is chatty. Redirecting output keeps the logs clean:

goose run --no-session -i /tmp/prompt.txt > /dev/null 2>&1 

The Final Setup

The workflow now:

  1. Installs Goose manually
  2. Configures it for OpenRouter
  3. Picks a random mood (sarcastic, wise, introspective, grumpy, or poetic)
  4. Asks Goose to create/run a Python script that generates the fortune
  5. Commits and pushes the updated README

What’s Next

Not sure how far I’ll get in the Advent of AI 2025, but we’ll see. 👀

You can follow along with my Advent of AI challenge or hit me up on DEV.to with your own AI experiments!

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


Source: DEV Community.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.