Creator and publisher CLI
Select template sources, publish and restore revisions, and define or filter artifact properties.
The public-release commands use bun create bricole to run the creator and bun run bricole-publish inside a project with its dependencies installed. Until the packages ship on npm, contributors can use the checkout commands below.
bun create bricole list
bun create bricole brief field-station Copy templates
| Command or option | Effect |
|---|---|
create-bricole list | Lists the selected Git revision’s catalog, default templates first. Use --json to read the entries as an array. |
create-bricole <name> [<dir>] | Copies one catalog entry into a new or empty directory. The destination defaults to ./<name>. The command refuses symbolic links in the copied content and skips node_modules, dist and .wrangler. |
--from <source> | Git URL or local repository path, available to both commands. Defaults to the Bricole GitHub repository. A local path uses committed content. Git credentials come from the caller’s helper or SSH keys. Keep secrets, URL query parameters and fragments out of the source. |
--ref <ref> | Branch, tag or full commit SHA, default main. Use a vetted commit when you need reproducibility. |
--help | Print usage. |
Test a catalog change from a checkout
Run these from the repository root to exercise the catalog at the current commit:
bun packages/create/src/cli.ts list --from . --ref HEAD --json
bun packages/create/src/cli.ts brief ../field-station --from . --ref HEAD Publish and restore
| Invocation | Options and behavior |
|---|---|
bricole-publish push [<folder>] --title <title> | Create an artifact. The default bundle directory is dist/. A create-compatible static bundle up to 4 MiB is sent inline. Other bundles get an empty artifact first, followed by a publish. |
bricole-publish push [<folder>] --artifact <id> | Publish a new revision of an existing artifact. An optional --title <title> renames it on publish. |
--config <path> | On either push, read the author config at this path. Default ./bricole.json is relative to the working directory, independent of the folder argument. |
--credential-stdin | On an existing-artifact push, read the complete JSON answer from mint_publish_credential through a pipe. The mint names the artifact and expected head. Mint again after another revision lands. |
bricole-publish rollback --artifact <id> --revision <n> | Publish the named positive revision’s manifest again as a new head. Data and applied SQL migrations persist. To restore a public website, its owner must explicitly release the resulting revision. |
--json | Print machine-readable results. A push or rollback includes the artifact, revision and request trace. A failed operation includes its error. Classification commands print the host’s response. |
--help | Print command usage without contacting a host. |
Set BRICOLE_URL to the intended host’s origin. Its default is http://localhost:8787. The publisher reads a service actor token from BRICOLE_TOKEN for every command that contacts a host, except a scoped push using --credential-stdin. The creator uses Git’s own authentication. See publishing and rollback for the credential handoff and revision-conflict workflow.
Classify and find artifacts
| Command | Inputs and output |
|---|---|
bricole-publish properties | List property definitions, closed options and values in use for open keys. |
bricole-publish list --relation owned | Choose owned or shared explicitly. The CLI follows pagination and lists newest first. Repeat --property <filter> for key, '!key' (absent) or key=value; keys combine with AND, values for one key with OR. Up to 20 filters. |
bricole-publish property <artifact> <key> | Supply one or more repeatable --add <value> or --remove <value> options. At most 20 additions and 20 removals per request. Removal happens before addition. A new value replaces the old value of a single-valued key. |
bricole-publish define <key> | Read the whole definition from a JSON object on stdin, e.g. bun run bricole-publish define phase < phase.json. Creating or updating a definition requires host administration. |
For example, save this fictional closed definition in phase.json:
{
"name": "Phase",
"cardinality": "one",
"options": [
{ "id": "survey", "name": "Survey" },
{ "id": "review", "name": "Review" }
]
} | Definition field | Meaning |
|---|---|
key | Inferred from the command argument. If present in stdin, it must match. Keys and option IDs start with a lowercase letter, then lowercase letters, digits or hyphens, up to 40 characters. |
name, description, disabled | Display name (1–60 characters), optional description (up to 500), and optional boolean disabling new assignments. These fields also apply to each option. |
cardinality | Required one or many. May widen from one to many. Each artifact can hold up to 20 values per key. |
options | Omit for an open text key, or supply up to 100 objects with unique id, name, optional description and optional disabled for a closed key. Existing keys retain their open or closed kind. Disable an old option to preserve existing assignments. |
setBy | Action required to assign values. Defaults to properties.write; choose grants.manage to restrict assignment further. |
A host can enable up to 50 keys. Each assigned value has at most 100 Unicode code points. Open values normalize whitespace and Unicode and compare case-insensitively. Closed values use the option ID.