The Tailor Platform SDK provides a powerful command-line interface (CLI) for managing your Tailor Platform applications, workspaces, and resources.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tailor-platform/sdk/llms.txt
Use this file to discover all available pages before exploring further.
Installation
The CLI is distributed as part of the@tailor-platform/sdk package:
tailor-sdk command.
Basic Usage
Getting Help
View available commands:Version Information
Check the installed SDK version:Common Options
The following options are available across most CLI commands:Path to environment file (error if not found). Can be specified multiple times.
Path to environment file (ignored if not found). Can be specified multiple times.
Enable verbose logging. Shows stack traces on error for debugging.
Output results as JSON where applicable. Short alias:
-jWorkspace ID for deployment and resource commands. Short alias:
-wWorkspace profile name. Short alias:
-pPath to SDK config file. Short alias:
-cSkip confirmation prompts. Short alias:
-yEnvironment File Loading
Both--env-file and --env-file-if-exists 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
Due to a Node.js bug (#54232), you may see warnings about
--env-file flags. These can be safely ignored.Environment Variables
You can configure workspace and authentication using environment variables:Workspace ID for deployment commands. Used when
--workspace-id is not specified.Authentication token. Alternative to using
tailor-sdk login. Takes precedence over logged-in user credentials.Deprecated. Use
TAILOR_PLATFORM_TOKEN instead. Still supported for backward compatibility.Workspace profile name. Used when
--profile is not specified.Path to SDK config file. Used when
--config is not specified.Editor to open generated files. Examples:
vim, code, nanoResolution Priority
The CLI resolves configuration from multiple sources with a specific priority order:Authentication Token Priority
The CLI determines which authentication token to use in this order:TAILOR_PLATFORM_TOKENenvironment variableTAILOR_TOKENenvironment variable (deprecated)- Profile specified via
--profileoption orTAILOR_PLATFORM_PROFILEenvironment variable - Current user from platform config (
~/.config/tailor-platform/config.yaml)
Workspace ID Priority
The CLI determines which workspace to use in this order:--workspace-idcommand optionTAILOR_PLATFORM_WORKSPACE_IDenvironment variable- Profile specified via
--profileoption orTAILOR_PLATFORM_PROFILEenvironment variable
Config File Priority
The CLI locates the config file in this order:--configcommand optionTAILOR_PLATFORM_SDK_CONFIG_PATHenvironment variable- Search parent directories for
tailor.config.ts(default)
Command Categories
The CLI commands are organized into several categories:Application Management
init- Initialize a new projectgenerate- Generate files from configurationapply- Deploy application to workspaceremove- Remove application from workspaceshow- Show deployed application info
Authentication & Users
login- Login to Tailor Platformlogout- Logout from Tailor Platformuser- Manage users and personal access tokens
Workspace Management
workspace- Manage workspacesprofile- Manage workspace profiles
TailorDB
tailordb truncate- Truncate tablestailordb migration- Generate and manage migrationstailordb erd- Export and serve entity-relationship diagrams
Runtime Resources
workflow- Manage workflows and executionsexecutor- Trigger executors and view jobsfunction- View function execution logssecret- Manage secrets and vaultsstaticwebsite- Deploy and manage static websites
Auth Resources
machineuser- Manage machine users and tokensoauth2client- Manage OAuth2 clients
Utilities
completion- Generate shell completion scripts
Shell Completion
The CLI supports shell completion for bash, zsh, and fish:Example Workflows
Development Workflow
Production Deployment
CI/CD Pipeline
Configuration Storage
The CLI stores user credentials and profiles in:- User access tokens and refresh tokens
- Profile configurations (workspace ID + user mappings)
- Current user selection
The CLI automatically migrates from the legacy
~/.tailorctl/config file if found.Next Steps
- Learn about Authentication - Login, logout, and token management
- Explore Application Commands - Deploy and manage your applications
- Read about TailorDB Commands - Database schema and migrations