Repository navigation
Brand in core: get_brand MCP tool, and once-ui brand / create --brand - #576
Merged
Merged
Conversation
once-ui-mcp gains get_brand: brand and accent schemes, the exact colour from the Brand Kit's src/brand/brand.ts, fonts, logo files with the <Logo> that renders them, and the app's mascot. Read from the files in the app's root, so it needs no network. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJu1KhHYnxDSec1Jd6QM
brand new generates four candidates and keeps one, brand list shows saved brands, brand pull writes one into an app (files from the server, then once-ui.config gets brand "custom" + brandSeed, the heading font and the name). create --brand does the same for a new app, by description or id. get_brand in once-ui-mcp also reads src/brand/brand.json, which pull writes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJu1KhHYnxDSec1Jd6QM
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Lorant · project thread
These are the core side of the Brand Kit MCP and API plan. The server side is once-ui-system/studio#310 (switch
brandKitApi).1.
get_brandinonce-ui-mcp(local, no network)It reads the app's own brand from its files:
once-ui.config: thestyleschemes and seeds, theme, border, surface, the font family per variant, andschema.name.src/brand/brand.json(written byonce-ui brand pull) orsrc/brand/brand.ts(the Brand Kit zip).It returns:
<Logo icon=… wordmark=…>, or<Logo text monogram>when there are no logo files.brandSeedhint when the config uses the nearest scheme rather than the exact hex.2. CLI:
once-ui brandandcreate --brandbrand new "<description>" [--pick 0-3] [--engine …]: generates four candidates on once-ui.com (Pro and Indie). It writes them as SVGs to a temp folder, prints the board link, and keeps the one you pick. Run inside an app, it writes the brand in.brand list,brand pull <id> [dir]: the files come from the server, and paths outside the app are refused. Thenonce-ui.configgetsbrand: "custom",brandSeed, the heading font and the name, andAGENTS.mdgets the brand note.create <dir> --brand "<description>"|<id>: the brand is settled before the scaffold, then written into the new app.The README and CHANGELOG are updated. These commands need studio#310 live with
brandKitApion for the account.Checks
packages/core:vitest run src/__tests__/mcp-server.test.ts, 11 passed.packages/cli:tsc --noEmitis clean.vitest run: 53 passed, including the newtest/brand.test.ts(config rewrite, apply, path escape, list, pull,create --brandby description and by id, against a mock server).🤖 Generated with Claude Code
https://claude.ai/code/session_016gNJu1KhHYnxDSec1Jd6QM