Registry / database / goose-cli

goose-cli

JSON →
library3.25.0-ajsnpmunverified

An unofficial npm wrapper for the goose database migration tool (v3.25.0-a), providing the goose CLI without requiring Go installation. It downloads the appropriate binary for the target OS/architecture on install. Versioning mirrors the upstream goose releases, with frequent updates. Differentiators: no Go toolchain needed, easy integration into Node.js projects, supports major database backends (SQLite, PostgreSQL, MySQL) through goose.

npm install goose-cli
INSTALL
IMPORT
SIG · GOOSE-CLI
G
goose-cli
databasejavascriptv3.25.0-a
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

goose
npx goose [command]
import goose from 'goose-cli'
This is a CLI tool, not a JavaScript library. Use npx or install globally.

Installing goose-cli and using it in npm scripts. The goose binary is downloaded at install time.

npm install --save-dev goose-cli # Then in package.json scripts: { "scripts": { "db:migrate": "goose sqlite3 ./foo.db up" } } # Run: npm run db:migrate
Debug
Known issues
breakingv3.0.0 of goose removed support for some older commands. Check migration from v2 to v3.
fix
Refer to goose upstream changelog.
affects: >=3.0.0
deprecatedThe 'goose fix' command is deprecated as of goose v3.8.0.
fix
Use 'goose create' with proper options.
affects: >=3.8.0
gotchaPost-install script may fail in restricted environments where binary download is blocked.
fix
Pre-download the binary manually or set a proxy.
affects: all
gotchaThe package downloads platform-specific binaries. git clone of a project will not include the binary until npm install is run on the target machine.
fix
Ensure npm install is executed on each environment.
affects: all
Errors
Common errors & fixes
postinstall script failed
Network failure or missing permissions when downloading binary
fix
Check internet connection, or manually download binary from https://github.com/pressly/goose/releases and place it in node_modules/.bin/goose.
goose: command not found
goose-cli not installed or binary not in PATH
fix
Run npx goose or add node_modules/.bin to PATH.
unsupported platform
goose binary not available for your OS/architecture
fix
Use a supported platform or run goose via Docker.
Upgrade
Version history
3.25.0-alatest on npm
Audit
Dependencies
noderequiredrequires Node.js to download and execute the binary
Agent activity
6 hits · last 30 days
node
6
Resources
goose-cli — npm install goose-cli · libregistry