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 --machine-user |
TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET | Client secret for login --machine-user |
TAILOR_PLATFORM_MACHINE_USER_NAME | Default machine user name for query, workflow start, function test-run |
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 using create-sdk. |
| generate | Generate files using Tailor configuration. |
| apply | Apply Tailor configuration to deploy your application. |
| remove | Remove all resources managed by the application from the workspace. |
| show | Show information about the deployed application. |
| open | Open Tailor Platform Console. |
| api | Call Tailor Platform API endpoints directly. |
TailorDB Commands
Commands for managing TailorDB tables, data, and schema migrations.
| Command | Description |
|---|---|
| tailordb truncate | Truncate (delete all records from) TailorDB tables. |
| tailordb migration generate | Generate migration files by detecting schema differences between current local types and the previous migration snapshot. |
| tailordb migration set | Set migration checkpoint to a specific number. |
| tailordb migration status | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
| tailordb erd export | Export Liam ERD dist from applied TailorDB schema. |
| tailordb erd serve | Generate and serve ERD locally (liam build + serve dist). (beta) |
| tailordb erd deploy | Deploy ERD static website for TailorDB namespace(s). |
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 all personal access tokens. |
| user pat create | Create a new personal access token. |
| user pat delete | Delete a personal access token. |
| user pat update | Update a personal access token (delete and recreate). |
Organization Commands
Commands for managing organizations and folders.
| Command | Description |
|---|---|
| organization folder create | Create a new folder in an organization. |
| organization folder delete | Delete a folder from an organization. |
| organization folder get | Show detailed information about a folder. |
| organization folder list | List folders in an organization. |
| organization folder update | Update a folder's name. |
| organization get | Show detailed information about an organization. |
| organization list | List organizations you belong to. |
| organization tree | Display organization folder hierarchy as a tree. |
| organization update | Update an organization's name. |
Workspace Commands
Commands for managing workspaces and profiles.
| Command | Description |
|---|---|
| workspace app health | Check application schema health |
| workspace app list | List applications in a workspace |
| workspace create | Create a new Tailor Platform workspace. |
| workspace delete | Delete a Tailor Platform workspace. |
| workspace get | Show detailed information about a workspace |
| workspace list | List all Tailor Platform workspaces. |
| workspace restore | Restore a deleted workspace |
| workspace user invite | Invite a user to a workspace |
| workspace user list | List users in a workspace |
| workspace user remove | Remove a user from a workspace |
| workspace user update | Update a user's role in a workspace |
| profile create | Create a new profile. |
| profile delete | Delete a profile. |
| profile list | List all profiles. |
| profile update | Update profile properties. |
Auth Resource Commands
Commands for managing Auth service resources.
| Command | Description |
|---|---|
| authconnection authorize | Authorize an auth connection via OAuth2 flow. |
| authconnection list | List all auth connections. |
| authconnection revoke | Revoke an auth connection. |
| machineuser list | List all machine users in the application. |
| machineuser token | Get an access token for a machine user. |
| oauth2client list | List all OAuth2 clients in the application. |
| oauth2client get | Get OAuth2 client credentials (including client secret). |
Workflow Commands
Commands for managing workflows and executions.
| Command | Description |
|---|---|
| workflow list | List all workflows in the workspace. |
| workflow get | Get workflow details. |
| workflow start | Start a workflow execution. |
| workflow executions | List or get workflow executions. |
| workflow resume | Resume a failed or pending workflow execution. |
Function Commands
Commands for viewing function execution logs.
| Command | Description |
|---|---|
| function logs | List or get function execution logs. |
| function test-run | Run a function on the Tailor Platform server without deploying. |
Executor Commands
Commands for managing executors and executor jobs.
| Command | Description |
|---|---|
| executor trigger | Trigger an executor manually. |
| executor jobs | List or get executor jobs. |
| executor list | List all executors |
| executor get | Get executor details |
| executor webhook list | List executors with incoming webhook triggers |
Secret Commands
Commands for managing secrets and vaults.
| Command | Description |
|---|---|
| secret vault create | Create a new Secret Manager vault. |
| secret vault delete | Delete a Secret Manager vault. |
| secret vault list | List all Secret Manager vaults in the workspace. |
| secret create | Create a secret in a vault. |
| secret update | Update a secret in a vault. |
| secret list | List all secrets in a vault. |
| secret delete | Delete a secret in a vault. |
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 all static websites in a workspace. |
| staticwebsite get | Get details of a specific 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. (beta) |
Completion
Generate shell completion scripts for bash, zsh, and fish.
| Command | Description |
|---|---|
| completion | Generate shell completion script |