Skip to main content

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.

Initialize a new Tailor Platform project using the create-sdk scaffolding tool. This command detects your package manager and runs the appropriate create command with the specified template.

Command Syntax

tailor-sdk init [options] [name]

Arguments

name
string
Project name for the new application. If not provided, you’ll be prompted interactively.

Options

--template
string
default:"undefined"
Template name to use for project initialization. Available templates are provided by @tailor-platform/sdk.Alias: -t

Common Options

The following common options are also available:
  • --env-file / -e - Path to environment file (error if not found)
  • --env-file-if-exists - Path to environment file (ignored if not found)
  • --verbose - Enable verbose logging (show stack traces on error)

Usage Examples

Initialize with Interactive Prompts

tailor-sdk init
This will prompt you for the project name and template selection.

Initialize with Project Name

tailor-sdk init my-app
Creates a new project named “my-app” using the default template.

Initialize with Specific Template

tailor-sdk init my-app --template basic
Creates a new project using the “basic” template.
tailor-sdk init --template advanced
Prompts for project name but uses the “advanced” template.

Implementation Details

The init command:
  1. Detects your package manager (npm, yarn, pnpm, or bun) from the npm_config_user_agent environment variable
  2. Falls back to npm if detection fails
  3. Runs the appropriate create command: <package-manager> create @tailor-platform/sdk@<version>
  4. Passes through the project name and template arguments
The SDK version used for initialization matches the version of your installed tailor-sdk CLI, ensuring compatibility.

After Initialization

Once your project is initialized, navigate to the project directory:
cd my-app
Then install dependencies and start development:
npm install
npm run dev
  • generate - Generate files from your Tailor configuration
  • apply - Deploy your application to a workspace

Build docs developers (and LLMs) love