tailor-sdk
Tailor Platform SDK - The SDK to work with Tailor Platform
Usage
tailor-sdk <command> [options]Global Options
| Option | Alias | Description | Required | Default |
|---|---|---|---|---|
--env-file <ENV_FILE> | -e | Path to the environment file (error if not found) | No | - |
--env-file-if-exists <ENV_FILE_IF_EXISTS> | - | Path to the environment file (ignored if not found) | No | - |
--verbose | - | Enable verbose logging | No | false |
--json | -j | Output as JSON | No | false |
Common Options
The following options are available for most commands:
| Option | Short | Description |
|---|---|---|
--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 File Loading
Both --env-file and --env-file-if-exists can be specified multiple times and follow Node.js --env-file behavior:
- Variables already set in the environment are not overwritten
- Later files override earlier files
--env-filefiles are loaded first, then--env-file-if-existsfiles
# Load .env (required) and .env.local (optional, if exists)
tailor-sdk apply --env-file .env --env-file-if-exists .env.local
# Load multiple files
tailor-sdk apply --env-file .env --env-file .env.productionEnvironment Variables
You can use environment variables to configure workspace and authentication:
| Variable | Description |
|---|---|
TAILOR_PLATFORM_WORKSPACE_ID | Workspace ID for deployment commands |
TAILOR_PLATFORM_ORGANIZATION_ID | Organization ID for organization commands |
TAILOR_PLATFORM_FOLDER_ID | Folder ID for folder 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 |
TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID | Client ID for login --machineuser |
TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET | Client secret for login --machineuser |
VISUAL / EDITOR | Preferred editor for commands that open files (e.g., vim, code, nano) |
TAILOR_CRASH_REPORTS_LOCAL | Local crash log writing: on (default) or off |
TAILOR_CRASH_REPORTS_REMOTE | Automatic crash report submission: off (default) or on |
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 Commands
Commands for managing TailorDB tables, data, and schema migrations.
| Command | Description |
|---|---|
| tailordb truncate | Truncate TailorDB tables |
| tailordb migration generate | Generate migration files from schema snapshot |
| tailordb migration set | Set migration checkpoint manually |
| tailordb migration status | Show migration status |
| tailordb erd export | Export ERD artifacts from TailorDB schema (beta) |
| tailordb erd serve | Serve ERD locally (beta) |
| tailordb erd deploy | Deploy ERD static website (beta) |
Note: Migration scripts are automatically executed during tailor-sdk apply. See Automatic Migration Execution for details.
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 & Organization Commands
Commands for managing workspaces, profiles, organizations, and folders.
| Command | Description |
|---|---|
| organization list | List organizations you belong to |
| organization get | Show detailed information about an organization |
| organization update | Update an organization's name |
| organization tree | Display organization folder hierarchy as a tree |
| organization folder list | List folders in an organization |
| organization folder get | Show detailed information about a folder |
| organization folder create | Create a new folder in an organization |
| organization folder update | Update a folder's name |
| organization folder delete | Delete a folder from an organization |
| 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 |
Function Commands
Commands for viewing function execution logs.
| Command | Description |
|---|---|
| function logs | List or get function execution logs |
Executor Commands
Commands for managing executors and executor jobs.
| Command | Description |
|---|---|
| executor trigger | Trigger an executor manually |
| executor jobs | List or get executor jobs |
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 |
Crash Report Commands
Commands for managing crash reports.
| Command | Description |
|---|---|
| crash-report list | List local crash report files |
| crash-report send | Submit a crash report to help improve the SDK |
Setup Commands
Commands for setting up project infrastructure.
| Command | Description |
|---|---|
| setup github | Generate GitHub Actions workflow for deployment |
Completion
Generate shell completion scripts for bash, zsh, and fish.
| Command | Description |
|---|---|
| completion | Generate shell completion script |