Skip to content

tari template init

Sets up an existing template crate for metadata generation.

Terminal window
tari template init [PATH] [OPTIONS]
ArgumentDescription
[PATH]Path to the template crate directory (default: .)
OptionDescription
--tags <TAGS>Comma-separated tags (e.g. token,fungible,defi)
--category <CATEGORY>Template category (e.g. token, nft, defi)
--documentation <URL>Documentation URL
--homepage <URL>Homepage URL
-y, --non-interactiveSkip interactive prompts, use only CLI args
Terminal window
tari template init ./my-template

Prompts for tags, category, documentation, and homepage.

Terminal window
tari template init ./my-template -y \
--tags token,fungible,defi \
--category token \
--documentation https://docs.example.com \
--homepage https://example.com
  1. Adds tari_ootle_template_build to [build-dependencies] in Cargo.toml
  2. Creates build.rs with TemplateMetadataBuilder (or warns if build.rs already exists)
  3. Writes [package.metadata.tari-template] section with the provided metadata fields

The command is idempotent — running it twice will not duplicate entries.