Project creator
create-tsonic creates, installs, and validates one complete project:
npm create tsonic@latest <directory> -- --target <target-id>
For example:
npm create tsonic@latest server -- --target csharp
npm create tsonic@latest tool -- --target rust
Options
| Option | Meaning |
|---|---|
--target <id> | Required target id, such as csharp or rust |
--surface <id> | Explicit source surface; repeat for more than one |
--help | Print command help |
The destination must not exist. Its final path segment must be a lowercase unscoped npm package name beginning with a letter.
Transaction
The creator:
- creates a private sibling staging directory;
- writes a minimal npm package selecting the same release-wave version of the
CLI and
@tsonic/target-<id>; - runs
npm install; - loads the installed target’s immutable starter descriptor;
- validates its target selection, scripts, files, paths, and toolchain checks;
- verifies the native toolchain;
- writes
tsonic.json,.gitignore, and target-owned source; - atomically renames the staging directory to the requested destination.
An error removes the private staging directory and leaves the requested destination absent. Existing paths are never overwritten.
Ownership
The creator knows only the target id and the generic starter contract. The selected target package owns starter source, target options, native commands, and SDK requirements. The creator does not contain C#, Rust, .NET, or Cargo branches.
create-tsonic does not install native SDKs. Missing requirements produce the
failed command, exact remediation, and an official installation URL.