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
| Argument | Description | Required |
|---|---|---|
name | Project name | No |
Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--template <TEMPLATE> | -t | Template name | No | - |
generate
Generate files using Tailor configuration.
Usage
tailor-sdk generate [options]
Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" |
--watch | -W | Watch for type/resolver changes and regenerate | No | false |
apply
Apply Tailor configuration to deploy your application.
Usage
tailor-sdk apply [options]
Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - |
--profile <PROFILE> | -p | Workspace profile | No | - |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" |
--yes | -y | Skip confirmation prompts | No | false |
--dry-run | -d | Run the command without making any changes | No | - |
--no-schema-check | - | Skip schema diff check against migration snapshots | No | - |
Migration Handling:
When migrations are configured (db.tailordb.migration in config), the apply command automatically:
- Detects pending migration scripts that haven't been executed
- Applies schema changes in a safe order (pre-migration → script execution → post-migration)
- Executes migration scripts via TestExecScript API
- 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:
- Local schema check: Verifies that local schema changes match the migration files. This ensures migrations are properly generated before deployment.
- 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
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - |
--profile <PROFILE> | -p | Workspace profile | No | - |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" |
--yes | -y | Skip confirmation prompts | No | false |
show
Show information about the deployed application.
Usage
tailor-sdk show [options]
Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--json | -j | Output as JSON | No | false |
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - |
--profile <PROFILE> | -p | Workspace profile | No | - |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" |
open
Open Tailor Platform Console.
Usage
tailor-sdk open [options]
Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - |
--profile <PROFILE> | -p | Workspace profile | No | - |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" |
api
Call Tailor Platform API endpoints directly.
Usage
tailor-sdk api [options] <endpoint>
Arguments
| Argument | Description | Required |
|---|---|---|
endpoint | API endpoint to call (e.g., 'GetApplication' or 'tailor.v1.OperatorService/GetApplication') | Yes |
Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--json | -j | Output as JSON | No | false |
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - |
--profile <PROFILE> | -p | Workspace profile | No | - |
--body <BODY> | -b | Request body as JSON | No | "{}" |