Registry / devops / swallow-cli

swallow-cli

JSON →
library1.0.18jsnpmunverified

A CLI migration utility for AWS resources built with oclif, version 1.0.18. This tool helps manage database migrations (up/down) and includes support for stage-based configuration. It is a specific-purpose tool for AWS resource migrations, not a general-purpose migration framework. The package ships TypeScript typings and requires Node >=8.0.0. As of 2025, the package has low weekly downloads and the last release was in 2020, indicating it is in maintenance or potentially abandoned.

npm install swallow-cli
INSTALL
IMPORT
SIG · SWALLOW-CLI
S
swallow-cli
devopsjavascriptv1.0.18
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.

default
import swallow from 'swallow-cli'
const swallow = require('swallow-cli')
The package is ESM-first; CJS require may work in some environments but is not guaranteed.
migrate
import migrate from 'swallow-cli'
const migrate = require('swallow-cli').migrate
The CLI entry point is typically accessed via command line, but if used programmatically, default import provides the 'migrate' command.
Commands
import { UpCommand } from 'swallow-cli'
import UpCommand from 'swallow-cli/commands/up'
Named exports for commands are available for programmatic use, but direct file imports may break if internal paths change.

Import the library and use its programmatic API to initialize, run up/down migrations, and create new migration scripts.

import swallow from 'swallow-cli'; // Initialize a migration config await swallow.init(); // Run all up migrations await swallow.up(); // Run all down migrations await swallow.down(); // Create a new migration script await swallow.new('add_users_table');
Debug
Known issues
gotchaThe CLI binary is 'migrate', not 'swallow' or 'swallow-cli'.
fix
Use `migrate up` instead of `swallow up`.
affects: *
gotchaCommands require a configuration file (.swallow.js) in the current directory or specified via --config.
fix
Run `migrate init` to create a basic configuration.
affects: *
breakingThe package uses Node.js >=8.0.0; using an older Node version will cause errors.
fix
Upgrade Node.js to version 8 or higher.
affects: <8.0.0
Errors
Common errors & fixes
Command not found: migrate
swallow-cli not installed globally or not in PATH.
fix
Run `npm install -g swallow-cli` and ensure global npm bin is in PATH.
Error: Cannot find module '.swallow.js'
No configuration file exists in the current directory.
fix
Run `migrate init` to generate a default configuration.
TypeError: Cannot read property 'stage' of undefined
Missing or misconfigured stage in the configuration file when using --stage option.
fix
Add the 'stage' property to your .swallow.js configuration.
Upgrade
Version history
1.0.18latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
swallow-cli — npm install swallow-cli · libregistry