TheDocumentation 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.
tailordb erd commands help you generate Entity Relationship Diagrams (ERDs) from your TailorDB schema using Liam ERD. These commands export schema artifacts, serve ERDs locally, and deploy them as static websites.
Commands
tailordb erd export
Export Liam ERD distribution files from your applied TailorDB schema.Options
Workspace ID for the operation
Workspace profile to use
Path to SDK config file
TailorDB namespace name (optional if only one namespace is defined in config)
Output directory path for tbls-compatible ERD JSON (writes to
<outputDir>/<namespace>/schema.json)Output results as JSON
How It Works
- Fetches the applied TailorDB schema from your workspace
- Converts the schema to tbls-compatible JSON format
- Runs the Liam CLI (
liam erd build) to generate static ERD files - Outputs the built ERD distribution to
<outputDir>/<namespace>/dist
Examples
Output
The command generates the following structure:tailordb erd serve
Generate and serve ERD locally (combinesliam build + serve dist).
Options
Workspace ID for the operation
Workspace profile to use
Path to SDK config file
TailorDB namespace name (uses first namespace in config if not specified)
How It Works
- Exports ERD artifacts (same as
erd export) - Starts a local development server using the
servepackage - Opens the ERD in your browser (typically at
http://localhost:3000)
If multiple namespaces are found, the command serves the first one and displays commands to serve the others.
Examples
Requirements
Theserve package must be installed:
tailordb erd deploy
Deploy ERD static website for TailorDB namespace(s) to the Tailor Platform.Options
Workspace ID for the operation
Workspace profile to use
Path to SDK config file
TailorDB namespace name (optional - deploys all namespaces with erdSite if omitted)
Output deployment results as JSON
How It Works
- Builds ERD artifacts for the specified namespace(s)
- Uploads the static files to the configured static website
- Returns the deployed URL
Configuration
ConfigureerdSite in tailor.config.ts for each namespace you want to deploy:
The
erdSite value must match a static website name defined in your workspace.Examples
Output
On success, the command displays:Complete Workflow Example
1. Configure ERD Site
AdderdSite to your TailorDB namespace configuration:
2. Preview Locally
Generate and serve the ERD locally:3. Deploy to Production
Once satisfied with the ERD, deploy it:Requirements
Dependencies
The ERD commands require the following packages:Configuration
For deployment, you must:- Define
erdSitein your db namespace configuration - Ensure the static website exists in your workspace
- Have appropriate permissions to deploy to the workspace
Troubleshooting
”No TailorDB namespaces found”
Cause: Nodb configuration found in tailor.config.ts.
Solution: Add TailorDB configuration:
“No erdSite configured for namespace”
Cause: TheerdSite property is missing from the namespace configuration.
Solution: Add erdSite to your db config:
“Failed to run @liam-hq/cli”
Cause: The@liam-hq/cli package is not installed or not found.
Solution: Install the package:
“serve CLI exited with a non-zero code”
Cause: Theserve package is not installed or encountered an error.
Solution: Install the package:
See Also
- TailorDB Documentation - Learn about TailorDB schema design
- staticwebsite deploy - Deploy static websites
- Liam ERD - ERD visualization tool