CLI Reference

The Tailor Platform SDK provides a command-line interface for managing projects and workspaces.

Usage

<span><span style="color: var(--shiki-token-function)">tailor-sdk</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">&lt;</span><span style="color: var(--shiki-token-string)">comman</span><span style="color: var(--shiki-color-text)">d</span><span style="color: var(--shiki-token-keyword)">&gt;</span><span style="color: var(--shiki-color-text)"> [options]</span></span>
<span></span>

Common Options

The following options are available for most commands:

OptionShortDescription
--env-file-eSpecify a custom environment file path
--verboseEnable verbose logging (show stack traces on error)
--json-jOutput as JSON (where applicable)
--workspace-id-wWorkspace ID (for deployment commands)
--profile-pWorkspace profile
--config-cPath to SDK config file
--yes-ySkip confirmation prompts

Environment Variables

You can use environment variables to configure workspace and authentication:

VariableDescription
TAILOR_PLATFORM_WORKSPACE_IDWorkspace ID for deployment commands
TAILOR_PLATFORM_TOKENAuthentication token (alternative to login)
TAILOR_TOKENDeprecated. Use TAILOR_PLATFORM_TOKEN instead
TAILOR_PLATFORM_PROFILEWorkspace profile name
TAILOR_PLATFORM_SDK_CONFIG_PATHPath to SDK config file

Authentication Token Priority

Token resolution follows this priority order:

  1. TAILOR_PLATFORM_TOKEN environment variable
  2. TAILOR_TOKEN environment variable (deprecated)
  3. Profile specified via --profile option or TAILOR_PLATFORM_PROFILE
  4. Current user from platform config (~/.config/tailor-platform/config.yaml)

Workspace ID Priority

Workspace ID resolution follows this priority order:

  1. --workspace-id command option
  2. TAILOR_PLATFORM_WORKSPACE_ID environment variable
  3. Profile specified via --profile option or TAILOR_PLATFORM_PROFILE

Commands

Application Commands

Commands for managing Tailor Platform applications (work with tailor.config.ts).

CommandDescription
initInitialize a new project
generateGenerate files from configuration
applyDeploy application to workspace
removeRemove application from workspace
showShow deployed application info
tailordb truncateTruncate TailorDB tables

User & Auth Commands

Commands for authentication and user management.

CommandDescription
loginLogin to Tailor Platform
logoutLogout from Tailor Platform
user currentShow current user
user listList all users
user switchSet current user
user pat listList personal access tokens
user pat createCreate a personal access token
user pat deleteDelete a personal access token
user pat updateUpdate a personal access token

Workspace Commands

Commands for managing workspaces and profiles.

CommandDescription
workspace createCreate a new workspace
workspace listList all workspaces
workspace deleteDelete a workspace
profile createCreate a new profile
profile listList all profiles
profile updateUpdate a profile
profile deleteDelete a profile

Auth Resource Commands

Commands for managing Auth service resources.

CommandDescription
machineuser listList machine users
machineuser tokenGet machine user access token
oauth2client listList OAuth2 clients
oauth2client getGet OAuth2 client credentials

Workflow Commands

Commands for managing workflows and executions.

CommandDescription
workflow listList all workflows
workflow getGet workflow details
workflow startStart a workflow execution
workflow executionsList or get executions
workflow resumeResume a failed execution

Secret Commands

Commands for managing secrets and vaults.

CommandDescription
secret vault createCreate a vault
secret vault deleteDelete a vault
secret vault listList all vaults
secret createCreate a secret
secret updateUpdate a secret
secret listList secrets in a vault
secret deleteDelete a secret

Static Website Commands

Commands for managing and deploying static websites.

CommandDescription
staticwebsite deployDeploy a static website from a local build directory
staticwebsite listList static websites in a workspace
staticwebsite getGet details of a static website