Shipping Components

The ship command is the core of the Tricox lifecycle. It analyzes your code, snapshots your files, and secures them in the registry.

Basic Usage

Pass the path to your entry component (e.g., a React component or an index file).

$tricox ship src/components/Button.tsx

Command Flags

FlagDescription
-n, --nameExplicit component name (default: filename)
-m, --messageVersion message (git-style)
-v, --versionOverride auto-versioning (e.g., 2.0.0)
--publicMake component available to the public gallery

How it Works (Under the Hood)

1Static Graph Analysis

Tricox parses your code using a custom Babel AST explorer. It recursively finds all local imports and includes them in the component "Vessel". It also detects external NPM dependencies for auto-installation later.

2Content-Addressed Storage

Every file is hashed using SHA-1. If you ship a component where only one file changed, Tricox only uploads the changed file, saving bandwidth and space.

Smart Versioning

By default, Tricox uses SemVer auto-incrementing. If it detects no changes since the last upload, it will skip the version creation and inform you that your local code is already in the registry.