All apps/Knex.js

Knex.js

knex

SQL query builder CLI for migrations and seeds.

Runs as knex|macOS, Linux, Windows|knexjs.org

Command form

ai-draft · 1 task · 4 fields

Run and create migrations and seeds. Connection-override options are left out; use a knexfile.

Opens the form; the finished command lands at your prompt, unrun
otty gui knex
KnexExample values, fixed in this page — nothing here reaches a terminal
Basic
Knexfile
file
Environment
string
Working directory
directory
ParametersOnly these flags are editable in the form
Knexfile
path
--knexfile
Environment
string
--envdevelopmentstagingproduction
Working directory
path
--cwd

knex migrate:make

Create migration

Create a named migration file.

Create migrationExample values, fixed in this page — nothing here reaches a terminal
Basic
Migration name*
string
TasksEach one presets the form for one job
Create migration
name
ParametersOnly these flags are editable in the form
Migration name
string · positional 0
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed knex against its version. A form that does not match your version is not offered.