DEV Community

Cover image for Advent of AI 2025 - Day 1: Getting Goose to Generate Daily Fortunes in CI
Nick Taylor
Nick Taylor Subscriber

Posted on • Edited on • Originally published at nickyt.co

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!

GitHub logo block / goose

an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM

goose

a local, extensible, open source AI agent that automates engineering tasks

Discord CI

goose is your on-machine AI agent, capable of automating complex development tasks from start to finish. More than just code suggestions, goose can build entire projects from scratch, write and execute code, debug failures, orchestrate workflows, and interact with external APIs - autonomously.

Whether you're prototyping an idea, refining existing code, or managing intricate engineering pipelines, goose adapts to your workflow and executes tasks with precision.

Designed for maximum flexibility, goose works with any LLM and supports multi-model configuration to optimize performance and cost, seamlessly integrates with MCP servers, and is available as both a desktop app as well as CLI - making it the ultimate AI assistant for developers who want to move faster and focus on innovation.

Watch the video

Quick Links

Need Help?

โ€ฆ

For 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!

GitHub logo nickytonline / advent-of-ai-2025

Advent of AI 2025 for nickytonline

Grumpy Fortune Generator

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ ๐Ÿฆ† The Grumpy Fortune Goose Says: โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โˆฉโ”€โ”€โ”€โˆฉ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ† "Really? This again?" โ”‚ โ—‹ โ”‚ โ”‚ ๏ผฟ๏ผฟโ”‚ โˆฉโ”€โ”‚ โ”‚โ”€โˆฉ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โˆฉโ”€โ”€โ”€โ”€โ”€โ”€โˆฉ โ”‚ โ•ฐโ”€โ•ฏ โ•ฐโ”€โ•ฏ

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ The universe has a sense of humor. Unfortunately, the joke is on you. โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• Generated on: 2025-12-09 11:03:39 Mood: Grumpy โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•


Generated by the Sassy Goose Fortune Generator




Getting 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

  1. 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. I created a 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. According to the documentation, when keyring is disabled, secrets should be stored in ~/.config/goose/secrets.yaml instead of your OS' keyring/keychain.

  3. 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:

    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. 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

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

Top comments (0)