Authoring and Publishing
Publish tested TypeScript source through generated shadcn registry JSON
Start with a working implementation of a supported category contract:
- Custom gateways defines gateway exports, capabilities, credentials, and model defaults.
- Authoring tools defines server and renderer exports, registration descriptors, and environment requirements.
Keep source in code
In this repository, gateway source lives under
packages/registry/src/gateways/<id>/ and tool source under
packages/registry/src/tools/<id>/. Declare files, dependencies, installation
targets, and metadata in packages/registry/registry.ts.
Use standard shadcn dependencies for npm packages and registryDependencies
for shared registry items. ChatJS metadata describes the category contract.
The public item name does not have to contain the category name.
Generate and publish JSON
Run bun run --cwd packages/registry build. The build serializes the typed
registry definition and descriptors, then runs shadcn to embed source files in
packages/registry/dist/r/*.json. Treat these files as generated artifacts.
Publish the generated item files at your registry endpoint. Configure an alias
using a URL template ending in {name}.json, as described in
Namespaces. Consumers install those files through shadcn or the
ChatJS CLI, and own the resulting source in their app.
Before publishing, follow Building and Testing to check both the source and its installation into an independent app.