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)"><</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)">></span><span style="color: var(--shiki-color-text)"> [options]</span></span>
<span></span>
Common Options
The following options are available for most commands:
| Option | Short | Description |
|---|---|---|
--env-file | -e | Specify a custom environment file path |
--verbose | Enable verbose logging (show stack traces on error) | |
--json | -j | Output as JSON (where applicable) |
--workspace-id | -w | Workspace ID (for deployment commands) |
--profile | -p | Workspace profile |
--config | -c | Path to SDK config file |
--yes | -y | Skip confirmation prompts |
Environment Variables
You can use environment variables to configure workspace and authentication:
| Variable | Description |
|---|---|
TAILOR_PLATFORM_WORKSPACE_ID | Workspace ID for deployment commands |
TAILOR_PLATFORM_TOKEN | Authentication token (alternative to login) |
TAILOR_TOKEN | Deprecated. Use TAILOR_PLATFORM_TOKEN instead |
TAILOR_PLATFORM_PROFILE | Workspace profile name |
TAILOR_PLATFORM_SDK_CONFIG_PATH | Path to SDK config file |
Authentication Token Priority
Token resolution follows this priority order:
TAILOR_PLATFORM_TOKENenvironment variableTAILOR_TOKENenvironment variable (deprecated)- Profile specified via
--profileoption orTAILOR_PLATFORM_PROFILE - Current user from platform config (
~/.config/tailor-platform/config.yaml)
Workspace ID Priority
Workspace ID resolution follows this priority order:
--workspace-idcommand optionTAILOR_PLATFORM_WORKSPACE_IDenvironment variable- Profile specified via
--profileoption orTAILOR_PLATFORM_PROFILE
Commands
Application Commands
Commands for managing Tailor Platform applications (work with tailor.config.ts).
| Command | Description |
|---|---|
| init | Initialize a new project |
| generate | Generate files from configuration |
| apply | Deploy application to workspace |
| remove | Remove application from workspace |
| show | Show deployed application info |
| tailordb truncate | Truncate TailorDB tables |
User & Auth Commands
Commands for authentication and user management.
| Command | Description |
|---|---|
| login | Login to Tailor Platform |
| logout | Logout from Tailor Platform |
| user current | Show current user |
| user list | List all users |
| user switch | Set current user |
| user pat list | List personal access tokens |
| user pat create | Create a personal access token |
| user pat delete | Delete a personal access token |
| user pat update | Update a personal access token |
Workspace Commands
Commands for managing workspaces and profiles.
| Command | Description |
|---|---|
| workspace create | Create a new workspace |
| workspace list | List all workspaces |
| workspace delete | Delete a workspace |
| profile create | Create a new profile |
| profile list | List all profiles |
| profile update | Update a profile |
| profile delete | Delete a profile |
Auth Resource Commands
Commands for managing Auth service resources.
| Command | Description |
|---|---|
| machineuser list | List machine users |
| machineuser token | Get machine user access token |
| oauth2client list | List OAuth2 clients |
| oauth2client get | Get OAuth2 client credentials |
Workflow Commands
Commands for managing workflows and executions.
| Command | Description |
|---|---|
| workflow list | List all workflows |
| workflow get | Get workflow details |
| workflow start | Start a workflow execution |
| workflow executions | List or get executions |
| workflow resume | Resume a failed execution |
Secret Commands
Commands for managing secrets and vaults.
| Command | Description |
|---|---|
| secret vault create | Create a vault |
| secret vault delete | Delete a vault |
| secret vault list | List all vaults |
| secret create | Create a secret |
| secret update | Update a secret |
| secret list | List secrets in a vault |
| secret delete | Delete a secret |
Static Website Commands
Commands for managing and deploying static websites.
| Command | Description |
|---|---|
| staticwebsite deploy | Deploy a static website from a local build directory |
| staticwebsite list | List static websites in a workspace |
| staticwebsite get | Get details of a static website |