Goose
$ goose Community Med Riskgoose (pressly/goose) manages database migrations written in annotated SQL (-- +goose Up / -- +goose Down) or Go. It ships as a single Go binary with status, validate, up-by-one, and clean GOOSE_DRIVER / GOOSE_DBSTRING environment variable configuration.
brew install goose goose validates and applies local SQL/Go migration files directly against the configured database driver without MCP overhead.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Fully non-interactive with GOOSE_* env vars and validate / status commands, though output is plain text without --json.
- Supports
GOOSE_*env vars andvalidate/status; plain-text output only
goose validate checks files offline, up-by-one allows cautious stepping, and GOOSE_DBSTRING keeps secrets out of process arguments, though reset rolls back all versions.
- Offline
validateandup-by-onestepping;resetis high-risk
Single Go binary via Homebrew, go install, and GitHub Releases across macOS, Linux, and Windows.
- Static Go binary via
brew install goose
Single-file -- +goose Up/Down format keeps up and down SQL together and supports out-of-order -allow-missing workflows.
- Single-file SQL migrations plus optional Go code migrations
Well-maintained open-source project (pressly/goose) under MIT license.
- Active
pressly/gooserepository under MIT
Clear documentation at pressly.github.io/goose/ and --help.
- Official docs at pressly.github.io/goose/
Security, Auth & Guardrails
Reads GOOSE_DRIVER, GOOSE_DBSTRING, and GOOSE_MIGRATION_DIR environment variables (or .env) to keep DSNs out of command arguments.
100% free and MIT open-source.
# Goose Agent Rules - Set `GOOSE_DRIVER`, `GOOSE_DBSTRING`, and `GOOSE_MIGRATION_DIR` via env vars instead of inline DSNs. - Always run `goose validate` and `goose status` before `goose up`. - Never run `goose reset` (it rolls back every migration) without explicit approval.
Agent-Ready Command Recipes
Safe Read-Only Queries
goose -dir ./migrations status
Displays applied timestamps and pending status for every migration using GOOSE_DRIVER/GOOSE_DBSTRING.
goose -dir ./migrations validate
Checks SQL migration syntax and -- +goose Up/Down annotations locally.
Controlled Writes & Previews
goose -dir ./migrations create add_users_index sql
Generates a timestamped .sql migration file in ./migrations.
Strengths for Agents
- +
goose validateverifies migration filenames and SQL annotations locally before touching a DB. - +
GOOSE_DRIVERandGOOSE_DBSTRINGenv vars keep invocations clean and secret-free.
Caveats & Pitfalls
- ! Lacks a
--jsonoutput flag forstatusorversion. - ! Running Go-based migrations requires compiling a custom binary rather than using stock
goose.