Lolly
ऐप खोलें
  1. ऑटोमेट करें
  2. टूल और डिज़ाइन सिस्टम बनाएँ

Build a brand pack

This page is for a developer or an agent with a source checkout of Lolly. A brand pack is a folder that holds an organisation's design system and files for every tool, the CLI, the MCP server and a Lolly Work instance. To set up a design system in the app instead, see From brand guidelines to a design system. Configuration covers how packs and profiles fit together.

Run the commands from the root of a checkout (Clone and set up). In a checkout, lolly is pnpm run cli. The examples build harbour, a pack for Harbour Shire Water, an invented water utility.

What a pack holds

PartWhereWhat it is
The token documentcatalog/assets/<ns>/tokens/brand.jsonThe design system in DTCG JSON: colours, type, logo slots, colourways and rules
Marks and other filescatalog/assets/<ns>/…The logos and the other files the brand keeps
The indexcatalog/assets/index.jsonOne entry per file, with its id, tags, checksum and licence
A profileprofiles.jsonWhich tools and which catalog a run uses

<ns> is the pack's name with its hyphens removed, because an asset id cannot have a hyphen in its first part.

Write the token document

Three sets and two themes: base holds the named values, and light and dark point the seven colour roles at them. This document uses Lolly Demo's values, trimmed:

{
  "$metadata": { "tokenSetOrder": ["base", "light", "dark"] },
  "$themes": [
    { "name": "light", "selectedTokenSets": { "base": "enabled", "light": "enabled" },
      "$extensions": { "com.suse.lolly": { "axis": { "kind": "mode" } } } },
    { "name": "dark", "selectedTokenSets": { "base": "enabled", "dark": "enabled" },
      "$extensions": { "com.suse.lolly": { "axis": { "kind": "mode" } } } }
  ],
  "base": {
    "color": { "$type": "color", "brand": {
      "spearmint": { "$value": "#033633", "$description": "Spearmint",
        "$extensions": { "com.suse.lolly": { "cmyk": [100, 31, 59, 79],
          "spot": { "name": "H190_L020_C020", "book": "freieFarbe HLC Colour Atlas XL" } } } },
      "green-apple": { "$value": "#50c369", "$description": "Green Apple" },
      "bunyapine":   { "$value": "#008657", "$description": "Bunyapine" },
      "liquorice":   { "$value": "#09141a", "$description": "Liquorice" },
      "sugar":       { "$value": "#ffffff", "$description": "Sugar" },
      "basalt":      { "$value": "#373e44", "$description": "Basalt" },
      "pebble":      { "$value": "#99a0a4", "$description": "Pebble" } } },
    "font": { "$type": "fontFamily",
      "brand":   { "$value": ["SUSE", "Arial"] },
      "display": { "$value": "Outfit" },
      "mono":    { "$value": "SUSE Mono" } },
    "asset": { "logo": {
      "horizontal-primary":         { "$type": "asset", "$value": "harbour/logo/horizontal" },
      "horizontal-primary-reverse": { "$type": "asset", "$value": "harbour/logo/horizontal-reverse" } } }
  },
  "light": { "color": { "$type": "color", "semantic": {
    "primary":    { "$value": "{color.brand.spearmint}" },
    "on-primary": { "$value": "{color.brand.sugar}" },
    "secondary":  { "$value": "{color.brand.bunyapine}" },
    "surface":    { "$value": "{color.brand.sugar}" },
    "text":       { "$value": "{color.brand.liquorice}" },
    "muted":      { "$value": "{color.brand.basalt}" },
    "edge":       { "$value": "{color.brand.pebble}" } } } },
  "dark": { "color": { "$type": "color", "semantic": {
    "primary":    { "$value": "{color.brand.green-apple}" },
    "on-primary": { "$value": "{color.brand.liquorice}" },
    "secondary":  { "$value": "{color.brand.bunyapine}" },
    "surface":    { "$value": "{color.brand.liquorice}" },
    "text":       { "$value": "{color.brand.sugar}" },
    "muted":      { "$value": "{color.brand.pebble}" },
    "edge":       { "$value": "{color.brand.basalt}" } } } }
}

Tools read the seven roles under color.semantic: primary, on-primary, secondary, surface, text, muted and edge. $description is the name Lolly shows for a colour, so keep the organisation's own name there and an ink reference in spot. Design Tokens covers the format.

What the tokens can say

To sayWriteRead more
A colour's print valuescmyk and spot under the colour's $extensions["com.suse.lolly"]The format
A fallback faceA fontFamily array, in order of preferenceThe format
A logo for each groundasset.logo.<slot> pointing at an asset id: horizontal-primary for a light ground, horizontal-primary-reverse for a dark oneLogos
ColourwaysA theme group of kind colourway, with each option's colours for each lookIn the token file
A campaign with datesA theme group of kind campaign, with a window on each optionWhat a theme group means
Colour roles in the brand's own wordsroles and bindings in the brandSystem recordColour roles in each colourway
House rulesrules in the brandSystem recordRules
The app's own roomA color.chrome group in light and in darkApp chrome from a design pack

Lolly checks seven kinds of house rule in Lolly Design: text-weight, text-align, text-case, color-pairing, stroke-on-rounded, dash-reserved and logo-surface. The record sits at the document root, under $extensions["com.suse.lolly"].brandSystem. One rule, in the shape Lolly Demo uses:

{ "$extensions": { "com.suse.lolly": { "brandSystem": {
  "schemaVersion": 1, "id": "harbour", "label": "Harbour Shire Water",
  "roles": [], "bindings": [],
  "rules": [
    { "id": "headline-case", "label": "Headlines are never set in capitals", "kind": "text-case",
      "roleIds": [], "parameters": { "target": "headline", "forbid": "upper" },
      "scope": { "tools": ["design"] }, "requirement": "required",
      "origin": { "kind": "source", "reference": "Harbour Shire Water brand standards", "locator": "Typography" },
      "review": { "state": "approved", "authority": "Harbour Shire Water brand team" } }
  ] } } } }

Lolly gives behaviour to the mode and colourway kinds. A campaign group is kept and offered as a plain theme choice, and nothing applies its window to new work yet.

Tokens from another product

ingest:brand and Add from… keep a Tokens Studio, Penpot or other DTCG file whole. What Lolly reads from the file:

In the fileWhat Lolly does
Colours, links, sets and themesReads them
Values under color.semantic. and font.Tools draw with them
The product's own colour names, with no color.semanticKeeps them. No tool draws with them until the seven roles point at them
Token maths, such as {scale.base}*1.5Keeps the text and does not work out the value
A theme group with no stated kindOffers the group as a plain theme choice. A light and dark pair needs "kind": "mode", as in the sample above

In the app, the review on import maps a file's own colour words to roles (A file with its own colour words).

Marks and fonts

Put each mark under catalog/assets/<ns>/logo/ and give it an index entry:

{
  "id": "harbour/logo/horizontal",
  "name": "Harbour Shire Water - Horizontal",
  "type": "vector",
  "version": "1.0.0",
  "tier": "core",
  "tags": ["logo", "horizontal", "primary", "on-light"],
  "formats": [{ "format": "svg", "url": "/catalog/assets/harbour/logo/horizontal.svg",
                "checksum": "sha256-PLACEHOLDER", "size": 0 }],
  "license": "LicenseRef-Harbour-Shire-Water-Marks"
}

Build, validate and serve

pnpm run ingest:brand ./tokens.json --name harbour --label "Harbour Shire Water" --register
# add the marks and their index entries under brands/harbour/catalog/assets/
LOLLY_PROFILE=harbour pnpm run build:catalog
LOLLY_PROFILE=harbour pnpm run validate:catalog
LOLLY_PROFILE=harbour pnpm run dev:web

ingest:brand writes the pack to brands/harbour/, and --register adds the profile to profiles.json. build:catalog writes the tool index and the checksums. validate:catalog checks every file against its entry.

To keep the pack out of the checkout, move it into a folder of its own with a profiles.json and a link to the checkout's community folder:

harbour-root/
├── profiles.json
├── community -> /path/to/lolly/community
└── brands/
    └── harbour/
{
  "default": "harbour",
  "profiles": {
    "harbour": {
      "label": "Harbour Shire Water",
      "tools": ["community"],
      "assets": ["community/emoji-packs", "community/fallback-fonts"],
      "catalog": "brands/harbour/catalog"
    }
  }
}

Then set LOLLY_ROOT to that folder, and every command above reads the pack from there:

export LOLLY_ROOT=/path/to/harbour-root LOLLY_PROFILE=harbour
pnpm run build:catalog
pnpm run validate:catalog

ingest:brand writes only inside the checkout, so run it there and move brands/harbour/ afterwards.

Check from a terminal

  1. Read the brief. lolly system context --json lists the colours by name, the type roles, the logo for each ground and the house rules. Its origin says which design system answered. Check each count against what you wrote.
  2. Read a tool's inputs. lolly describe quote-card lists each input, its type and its default.
  3. Render one piece in three shapes.
    lolly run quote-card --quote="Water is everyone's" --width=1080 --height=1350 --output=portrait.png
    lolly run quote-card --quote="Water is everyone's" --width=1920 --height=1080 --output=landscape.png
    lolly run quote-card --quote="Water is everyone's" --width=1080 --height=1080 --output=square.png

Open each picture and look at the mark, the colours and the type. A PNG of a page-layout tool needs the browser tier: run pnpm run dev:web under the same LOLLY_ROOT and LOLLY_PROFILE, and set LOLLY_WEB_BASE to its address (What the CLI can render).

  1. Set an input whose id is also a flag with --input.<id>=: lolly run wordmark --input.text=Harbour. The sample command lolly describe wordmark prints uses --text=, which the CLI refuses, because --text takes outline or live.

Give the pack to a Lolly Work instance

Lolly Work mounts a pack as its instance pack: a folder with profiles.json, such as the one you set as LOLLY_ROOT, a built tools/ and catalog/ tree, or a brands/<name>/catalog folder. An operator mounts the folder and redeploys every replica after a change. An administrator then selects the pack's design system (Review and apply). Sources and storage and Build a verified instance pack have the details.

Not yet