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 | - |
See Global Options for options available to all commands.
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 |
See Global Options for options available to all commands.
apply
Apply Tailor configuration to deploy your application.
Usage
tailor-sdk apply [options]Options
| Option | Alias | Description | Required | Default | Env |
|---|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - | TAILOR_PLATFORM_WORKSPACE_ID |
--profile <PROFILE> | -p | Workspace profile | No | - | TAILOR_PLATFORM_PROFILE |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" | TAILOR_PLATFORM_SDK_CONFIG_PATH |
--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 | - | - |
--no-cache | - | Disable bundle caching for this run | No | - | - |
--clean-cache | - | Clean the bundle cache before building | No | - | - |
See Global Options for options available to all commands.
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).
Plan Output:
Before applying changes, apply shows a preview of the planned resource changes.
+means the resource will be created~means the resource will be updated-means the resource will be deleted±means the resource will be replaced
After the detailed list, a summary line is printed:
Plan: 5 to create, 3 to update, 1 to delete, 25 unchangedUse --dry-run to preview the plan without applying anything.
remove
Remove all resources managed by the application from the workspace.
Usage
tailor-sdk remove [options]Options
| Option | Alias | Description | Required | Default | Env |
|---|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - | TAILOR_PLATFORM_WORKSPACE_ID |
--profile <PROFILE> | -p | Workspace profile | No | - | TAILOR_PLATFORM_PROFILE |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" | TAILOR_PLATFORM_SDK_CONFIG_PATH |
--yes | -y | Skip confirmation prompts | No | false | - |
See Global Options for options available to all commands.
show
Show information about the deployed application.
Usage
tailor-sdk show [options]Options
| Option | Alias | Description | Required | Default | Env |
|---|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - | TAILOR_PLATFORM_WORKSPACE_ID |
--profile <PROFILE> | -p | Workspace profile | No | - | TAILOR_PLATFORM_PROFILE |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" | TAILOR_PLATFORM_SDK_CONFIG_PATH |
See Global Options for options available to all commands.
open
Open Tailor Platform Console.
Usage
tailor-sdk open [options]Options
| Option | Alias | Description | Required | Default | Env |
|---|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - | TAILOR_PLATFORM_WORKSPACE_ID |
--profile <PROFILE> | -p | Workspace profile | No | - | TAILOR_PLATFORM_PROFILE |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" | TAILOR_PLATFORM_SDK_CONFIG_PATH |
See Global Options for options available to all commands.
api
Call Tailor Platform API endpoints directly.
Usage
tailor-sdk api [options] [command] <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 | Env |
|---|---|---|---|---|---|
--workspace-id <WORKSPACE_ID> | -w | Workspace ID | No | - | TAILOR_PLATFORM_WORKSPACE_ID |
--profile <PROFILE> | -p | Workspace profile | No | - | TAILOR_PLATFORM_PROFILE |
--config <CONFIG> | -c | Path to SDK config file | No | "tailor.config.ts" | TAILOR_PLATFORM_SDK_CONFIG_PATH |
--body <BODY> | -b | Request body as JSON. | No | "{}" | - |
See Global Options for options available to all commands.
Examples
Call an endpoint; workspaceId is auto-injected.
$ tailor-sdk api GetApplication -b '{"applicationName":"app-1"}'List all invocable OperatorService methods.
$ tailor-sdk api listShow the input message tree for an endpoint.
$ tailor-sdk api inspect GetApplicationNotes
Use tailor-sdk api list to enumerate invocable methods and tailor-sdk api inspect <endpoint> to print an endpoint's input message tree (combine with --json for machine-readable output).
The request body is inferred from the proto definition of the target endpoint, and commonly required fields are auto-injected so they can be omitted from --body:
workspaceId— resolved from-w/TAILOR_PLATFORM_WORKSPACE_ID/ the selected profile.namespaceName— resolved fromtailor.config.tsbased on the endpoint's service:- Auth / Tenant / UserProfile endpoints use
auth.name. - IdP / TailorDB / Pipeline endpoints use the sole configured namespace when exactly one is defined.
- Auth / Tenant / UserProfile endpoints use
Values already present in --body are never overridden. If a value cannot be resolved (e.g. no config found), injection is silently skipped and the server-side validation error takes precedence.
api inspect
Print the input message tree of an OperatorService endpoint.
Usage
tailor-sdk api inspect <endpoint>Arguments
| Argument | Description | Required |
|---|---|---|
endpoint | API endpoint to inspect (e.g., 'GetApplication' or 'tailor.v1.OperatorService/GetApplication'). | Yes |
See Global Options for options available to all commands.
Examples
Show fields of GetApplicationRequest.
$ tailor-sdk api inspect GetApplicationInspect a deeply nested input with (oneof config) annotations.
$ tailor-sdk api inspect CreateExecutorExecutorNotes
Combine with the global --json flag for a machine-readable descriptor. Recursive type references and oneof membership are annotated. Use tailor-sdk api list to discover endpoint names.
api list
List all invocable OperatorService methods.
Usage
tailor-sdk api listSee Global Options for options available to all commands.
Notes
Only unary RPCs are listed; streaming methods are excluded because tailor-sdk api run issues a single JSON POST and reads one JSON response.