{
  "id": "knex",
  "name": "Knex.js",
  "description": "SQL query builder CLI for migrations and seeds.",
  "homepage": "https://knexjs.org",
  "executables": [
    "knex"
  ],
  "commands": {
    "format": 1,
    "label": "Knex",
    "description": "Run and create migrations and seeds. Connection-override options are left out; use a knexfile.",
    "quality": "ai-draft",
    "base": "fig:knex",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/knex.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "knexfile",
        "label": "Knexfile",
        "type": "path",
        "option": [
          "--knexfile"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "env",
        "label": "Environment",
        "type": "string",
        "option": [
          "--env"
        ],
        "suggestions": [
          {
            "value": "development",
            "label": "development"
          },
          {
            "value": "staging",
            "label": "staging"
          },
          {
            "value": "production",
            "label": "production"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "cwd",
        "label": "Working directory",
        "type": "path",
        "option": [
          "--cwd"
        ],
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "knexfile",
          "env",
          "cwd"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "migrate:latest"
        ],
        "label": "Run migrations",
        "description": "Run all migrations that have not yet been run.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/knex.ts",
            "license": "MIT"
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": []
          }
        ]
      },
      {
        "path": [
          "migrate:rollback"
        ],
        "label": "Roll back migrations",
        "description": "Roll back the last batch of migrations.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/knex.ts",
            "license": "MIT"
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": []
          }
        ]
      },
      {
        "path": [
          "migrate:make"
        ],
        "label": "Create migration",
        "description": "Create a named migration file.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/knex.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Migration name",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "make",
            "label": "Create migration",
            "fields": [
              "name"
            ],
            "required": [
              "name"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name"
            ]
          }
        ]
      },
      {
        "path": [
          "seed:run"
        ],
        "label": "Run seeds",
        "description": "Run seed files.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/knex.ts",
            "license": "MIT"
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": []
          }
        ]
      }
    ]
  }
}
