API Reference
CLI Commands

CLI Commands

tship build

Compiles the project.

OptionDescription
-p, --project <path>Path to tsconfig.json
--formats <cjs,esm>Comma-separated formats (only when tship is active)
--cjs-out <dir>Output directory for CJS
--esm-out <dir>Output directory for ESM
--cleanClean output before build

If no tship configuration is present, tship build behaves exactly like tsc.

tship watch

Builds and watches for changes. Falls back to tsc --watch when tship is not configured.

OptionDescription
-p, --project <path>Path to tsconfig.json

tship init

Initializes tship configuration.

OptionDescription
--tsconfigAdd tship to tsconfig.json instead of creating a separate file

tship info

Prints resolved configuration and diagnostics.

OptionDescription
-p, --project <path>Path to tsconfig.json