Application Commands

Commands for managing Tailor Platform applications. These commands work with tailor.config.ts.

init

Initialize a new project using create-sdk.

Usage

tailor-sdk init [options] [name]

Arguments

ArgumentDescriptionRequired
nameProject nameNo

Options

OptionAliasDescriptionRequiredDefault
--template <TEMPLATE>-tTemplate nameNo-

generate

Generate files using Tailor configuration.

Usage

tailor-sdk generate [options]

Options

OptionAliasDescriptionRequiredDefault
--config <CONFIG>-cPath to SDK config fileNo"tailor.config.ts"
--watch-WWatch for type/resolver changes and regenerateNofalse

apply

Apply Tailor configuration to deploy your application.

Usage

tailor-sdk apply [options]

Options

OptionAliasDescriptionRequiredDefault
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to SDK config fileNo"tailor.config.ts"
--yes-ySkip confirmation promptsNofalse
--dry-run-dRun the command without making any changesNo-
--no-schema-check-Skip schema diff check against migration snapshotsNo-

Migration Handling:

When migrations are configured (db.tailordb.migration in config), the apply command automatically:

  1. Detects pending migration scripts that haven't been executed
  2. Applies schema changes in a safe order (pre-migration → script execution → post-migration)
  3. Executes migration scripts via TestExecScript API
  4. Updates migration state labels in TailorDB metadata

See TailorDB Commands for details on automatic migration execution.

Schema Check:

By default, apply performs two verification steps:

  1. Local schema check: Verifies that local schema changes match the migration files. This ensures migrations are properly generated before deployment.
  2. Remote schema check: Verifies that the remote schema matches the expected state based on migration history. This detects schema drift caused by manual changes or other developers.

If remote schema drift is detected, the apply will fail with an error showing the differences. This helps prevent applying migrations to an inconsistent state.

Use --no-schema-check to skip both verifications (not recommended for production).

remove

Remove all resources managed by the application from the workspace.

Usage

tailor-sdk remove [options]

Options

OptionAliasDescriptionRequiredDefault
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to SDK config fileNo"tailor.config.ts"
--yes-ySkip confirmation promptsNofalse

show

Show information about the deployed application.

Usage

tailor-sdk show [options]

Options

OptionAliasDescriptionRequiredDefault
--json-jOutput as JSONNofalse
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to SDK config fileNo"tailor.config.ts"

open

Open Tailor Platform Console.

Usage

tailor-sdk open [options]

Options

OptionAliasDescriptionRequiredDefault
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to SDK config fileNo"tailor.config.ts"

api

Call Tailor Platform API endpoints directly.

Usage

tailor-sdk api [options] <endpoint>

Arguments

ArgumentDescriptionRequired
endpointAPI endpoint to call (e.g., 'GetApplication' or 'tailor.v1.OperatorService/GetApplication')Yes

Options

OptionAliasDescriptionRequiredDefault
--json-jOutput as JSONNofalse
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--body <BODY>-bRequest body as JSONNo"{}"