{
  "id": "typeorm",
  "name": "TypeORM CLI",
  "description": "Command-line interface of the TypeORM object-relational mapper.",
  "homepage": "https://typeorm.io",
  "executables": [
    "typeorm"
  ],
  "commands": {
    "format": 1,
    "label": "TypeORM",
    "description": "Run schema and migration commands against a configured connection.",
    "quality": "ai-draft",
    "base": "fig:typeorm",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/typeorm.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "migration:run"
        ],
        "label": "Run migrations",
        "description": "Run all pending migrations.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/typeorm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "connection",
            "label": "Connection name",
            "type": "string",
            "option": [
              "--connection",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Connection config file",
            "type": "path",
            "option": [
              "--config",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "transaction",
            "label": "Use a transaction",
            "type": "boolean",
            "option": [
              "--transaction",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run pending migrations",
            "fields": [
              "config",
              "connection",
              "transaction"
            ],
            "required": [
              "config"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "connection",
              "config",
              "transaction"
            ]
          }
        ]
      },
      {
        "path": [
          "migration:revert"
        ],
        "label": "Revert migration",
        "description": "Revert the last executed migration.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/typeorm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "connection",
            "label": "Connection name",
            "type": "string",
            "option": [
              "--connection",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Connection config file",
            "type": "path",
            "option": [
              "--config",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "transaction",
            "label": "Use a transaction",
            "type": "boolean",
            "option": [
              "--transaction",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "revert",
            "label": "Revert last migration",
            "fields": [
              "config",
              "connection",
              "transaction"
            ],
            "required": [
              "config"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "connection",
              "config",
              "transaction"
            ]
          }
        ]
      },
      {
        "path": [
          "migration:show"
        ],
        "label": "Show migrations",
        "description": "List migrations and whether they ran.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/typeorm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "connection",
            "label": "Connection name",
            "type": "string",
            "option": [
              "--connection",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Connection config file",
            "type": "path",
            "option": [
              "--config",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "show",
            "label": "Show migrations",
            "fields": [
              "config",
              "connection"
            ],
            "required": [
              "config"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "connection",
              "config"
            ]
          }
        ]
      },
      {
        "path": [
          "migration:generate"
        ],
        "label": "Generate migration",
        "description": "Create a migration from schema differences.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/typeorm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Migration name",
            "type": "string",
            "option": [
              "--name",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "connection",
            "label": "Connection name",
            "type": "string",
            "option": [
              "--connection",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Connection config file",
            "type": "path",
            "option": [
              "--config",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dir",
            "label": "Output directory",
            "type": "path",
            "option": [
              "--dir",
              "-d"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "pretty",
            "label": "Pretty-print SQL",
            "type": "boolean",
            "option": [
              "--pretty",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output_js",
            "label": "JavaScript output",
            "type": "boolean",
            "option": [
              "--outputJs",
              "-o"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dryrun",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dryrun",
              "--dr"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "generate",
            "label": "Generate migration",
            "fields": [
              "name",
              "config",
              "dir",
              "pretty"
            ],
            "required": [
              "name",
              "config"
            ]
          },
          {
            "id": "preview",
            "label": "Preview only",
            "set": {
              "dryrun": [
                true
              ]
            },
            "fields": [
              "name",
              "config",
              "dryrun"
            ],
            "required": [
              "name",
              "config"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "connection",
              "config",
              "dir",
              "pretty"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "output_js",
              "dryrun"
            ]
          }
        ]
      },
      {
        "path": [
          "schema:sync"
        ],
        "label": "Sync schema",
        "description": "Synchronize entities with the database schema; this can alter or drop tables.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/typeorm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "connection",
            "label": "Connection name",
            "type": "string",
            "option": [
              "--connection",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "config",
            "label": "Connection config file",
            "type": "path",
            "option": [
              "--config",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "sync",
            "label": "Sync schema",
            "fields": [
              "config",
              "connection"
            ],
            "required": [
              "config"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "connection",
              "config"
            ]
          }
        ]
      }
    ]
  }
}
