Hacktoberfest: Maintainer Spotlight
Introduction
Working with Goose across multiple projects comes with challenges. One major issue is the time and effort it takes for teams to set up configurations: βWait, what provider did we use for this React app? Which LLM model for the Django server? Did you turn off auto-execute for this SECRET project?β
Without a systematic structure, teams constantly ask these questions and fix inconsistencies. Luckily, Goose allows developers to manage project configurations easily through global and project YAML files.
Understanding Goose Configuration Layers
Goose configurations work in a hierarchy:
~/.config/goose/profiles.yaml (Global)
β
project/.goose/profiles.yaml (Project)
β
CLI flags/environment variables (Runtime)
Each layeβ¦
Hacktoberfest: Maintainer Spotlight
Introduction
Working with Goose across multiple projects comes with challenges. One major issue is the time and effort it takes for teams to set up configurations: βWait, what provider did we use for this React app? Which LLM model for the Django server? Did you turn off auto-execute for this SECRET project?β
Without a systematic structure, teams constantly ask these questions and fix inconsistencies. Luckily, Goose allows developers to manage project configurations easily through global and project YAML files.
Understanding Goose Configuration Layers
Goose configurations work in a hierarchy:
~/.config/goose/profiles.yaml (Global)
β
project/.goose/profiles.yaml (Project)
β
CLI flags/environment variables (Runtime)
Each layer overrides the previous one, giving you flexibility in configuration structure.
Configuration Management Strategies
1. The Template Approach
Create a central repository of configuration templates:
# templates/base-profile.yaml
provider: openai
processor: gpt-4
accelerator: gpt-4-turbo
# my-project/.goose/profiles.yaml
extends: ../../templates/base-profile.yaml
toolkits:
- name: developer
- name: github
requires:
GITHUB_TOKEN: ${GITHUB_TOKEN}
2. Centralized Config Repository
goose-configs/
βββ profiles/
β βββ development.yaml
β βββ production.yaml
β βββ testing.yaml
βββ scripts/
βββ sync-config.sh
βββ validate-config.sh
Sync script:
#!/bin/bash
CONFIG_REPO="$HOME/goose-configs"
cp "$CONFIG_REPO/profiles/$1.yaml" ".goose/profiles.yaml"
echo "Synced $1 profile"
3. Version Control Integration
.goose/profiles.yaml
!.goose/profiles.template.yaml
.goose/.env
Automation Strategies
Configuration Validation
# validate_config.py
import yaml, sys
REQUIRED_FIELDS = ['provider', 'processor']
with open('.goose/profiles.yaml', 'r') as f:
config = yaml.safe_load(f)
missing = [f for f in REQUIRED_FIELDS if f not in config]
if missing:
print(f"Missing: {missing}")
sys.exit(1)
print("β Valid")
Environment Switcher
#!/bin/bash
ENV=$1
if [ -f ".goose/profiles.$ENV.yaml" ]; then
cp ".goose/profiles.$ENV.yaml" ".goose/profiles.yaml"
echo "Switched to $ENV"
fi
Troubleshooting
Issue 1: Configuration Not Loading
goose config show # Check which config is loaded
Checklist:
- β
File named
profiles.yaml - β
Located at
.goose/profiles.yaml - β Valid YAML syntax
Issue 2: Environment Variables Not Resolving
#!/bin/bash
for var in "GITHUB_TOKEN" "OPENAI_API_KEY"; do
[ -z "${!var}" ] && echo "β $var not set" || echo "β $var set"
done
Issue 3: Conflicting Configurations
Resolution order:
- CLI flags
- Project config (
.goose/profiles.yaml) - Global config (
~/.config/goose/profiles.yaml)
Scaling Strategies
Small Teams (2-5 developers)
- π Shared folder for templates
- π Simple shell scripts
- π README documentation
Medium Teams (5-20 developers)
- π¦ Dedicated config repository
- β CI/CD validation
- π Environment-specific configs
Large Organizations (20+ developers)
- ποΈ Configuration-as-code
- π οΈ Centralized management tools
- π€ Automated deployment
Best Practices Checklist
β Version Control
- [ ] Templates in version control
- [ ] Secrets excluded
- [ ] Proper .gitignore
β Documentation
- [ ] Configuration docs per project
- [ ] Environment variables documented
- [ ] Clear setup instructions
β Automation
- [ ] CI validation
- [ ] Sync scripts available
- [ ] Automated environment switching
β Security
- [ ] Environment variables for API keys
- [ ] No committed secrets
- [ ] Documented access controls
Real-World Example
company-goose-configs/
βββ profiles/
β βββ backend-dev.yaml
β βββ frontend-dev.yaml
β βββ data-science.yaml
βββ scripts/
βββ install.sh
Install script:
#!/bin/bash
PROJECT_TYPE=$1
mkdir -p .goose
cp "profiles/$PROJECT_TYPE.yaml" ".goose/profiles.yaml"
echo "β Configured for $PROJECT_TYPE"