Skip to content
UI Brok

Loading…

No results

Browse catalog

CLI

The ui:* Artisan commands fetch registry items, manage installed code, and keep your project in sync with upstream without overwriting your local edits. Run them from your Laravel application root after requiring jml/brok.

ui:install

Install the UI system into the current Laravel application.

Usage

terminal
php artisan ui:install [--alpine]

This command takes no arguments. Pass --alpine to write the Alpine.js bootstrap without prompting. It detects your project stack (Laravel version, Tailwind, Vite, Alpine, Livewire, dark-mode config) and then:

  • Writes ui.json and ui-lock.json if they do not already exist.
  • Copies resources/css/ui.css, resources/js/ui/index.js, and resources/views/components/ui/_styles.php into your project (existing files are preserved).
  • Appends the CSS and JS imports to your entrypoints when they can be detected (resources/css/app.css / resources/js/app.js).
  • Prints a manual step for any entrypoint it could not detect automatically.

Re-running the command is safe — existing files and imports are never overwritten or duplicated.


ui:list

List the components, blocks, pages, bundles, and themes available in the registry.

Usage

terminal
php artisan ui:list [<filter>] [--pro] [--type=<kind>] [--stability=<stability>] [--json]

Arguments & options

  • filter — Optional text filter matched against item names, titles, and descriptions.
  • --pro — Include Pro registry items. Requires ui:auth or a JML_TOKEN environment variable.
  • --type= — Keep only one kind: component, block, page, bundle, or theme.
  • --stability= — Keep only one stability level, such as stable, beta, or experimental.
  • --json — Print the raw item list as JSON for scripts or custom tooling.

The default output groups items by kind: components, blocks, pages, bundles, and themes. Use this before ui:add when you know roughly what you need but not the exact registry name.


ui:build

Turn a natural-language intent into a ranked registry build kit.

terminal
php artisan ui:build "analytics dashboard with filters" [--type=page] [--limit=8] [--pro] [--json]

Searches authored registry knowledge as well as item names and descriptions. The first result is the recommended starting point; JSON mode returns matched terms, scores, alternatives, and exact install commands for agents and scripts.


ui:manifest

Discover the installed CLI's capabilities without scraping help text.

terminal
php artisan ui:manifest [--json]

Describes every ui:* command, argument, option, mutation flag, response type, example, and stable error code. Integrations should inspect this manifest before constructing commands.


ui:foundation

Three-way update shared tokens and component recipes without discarding local edits.

terminal
php artisan ui:foundation [--check] [--dry-run] [--yes] [--ours|--theirs]

Updates resources/css/ui.css and _styles.php from portable bases stored in ui-lock.json. Registry items declare a minimum compatible foundation version.


ui:theme

Install a custom Theme Generator export as an editable token layer.

terminal
php artisan ui:theme ./brok-theme.json [--name=custom] [--dry-run] [--force] [--json]

Validates token names and values, writes resources/css/themes/<name>.css, and maintains a deduplicated import in resources/css/ui.css. Registry presets use the normal ui:add themes/<name> flow.


ui:show

Inspect one registry item without installing it.

terminal
php artisan ui:show <item> [--skeleton] [--json]

Shows the item's type, license, stability, version, dependencies, files, and usage. Prefix authenticated Pro names with pro/; use --skeleton for its compact regions, responsive contract, states, and composed primitives; combine it with --json for agents.


ui:add

Add a component or block from the registry.

Usage

terminal
php artisan ui:add [<item>] [--force] [--pin] [--dry-run]

Arguments & options

  • item — Registry item name, for example button or blocks/pricing-01. When omitted, interactive terminals open a searchable multi-select; non-interactive runs exit with an error.
  • --force — Overwrite locally modified files without prompting. Without this flag, the command asks before overwriting any file that already exists and differs from the incoming content.
  • --pin — Pin the selected root item or items at the installed version.
  • --dry-run — Preview resolved items, files, JS imports, and npm dependencies without writing.

Fetches the item JSON from the registry, validates file hashes, writes the target files into your project, and records the installed version and hash in ui-lock.json. Registry dependencies declared by the item are resolved and installed recursively (with a cycle guard). Any JS files placed under resources/js/ui/ are automatically added as imports to resources/js/ui/index.js. Required npm packages declared by the item are printed as a warning at the end.

Requires ui.json to be present — run ui:install first. Pro items can be prefixed with pro/ (e.g. pro/data-table) and require a stored auth token from ui:auth.


ui:update

Update installed UI components and blocks safely.

Usage

terminal
php artisan ui:update [<item>] [--check] [--dry-run] [--interactive] [--yes] [--force] [--major]

Arguments & options

  • item — Optional installed item name. When omitted, all items recorded in ui-lock.json are checked.
  • --check — Only check for available updates; no files are written. Implies --dry-run behaviour.
  • --dry-run — Show what would change without writing any files.
  • --interactive — Prompt for confirmation before applying each individual update.
  • --yes — Skip the full-plan confirmation and apply it.
  • --force — Include pinned items, which bulk updates otherwise skip.
  • --major — Allow breaking updates. Without this flag, items flagged as breaking are skipped with a warning.

For each item, the command compares the installed file against both the cached upstream base and the latest registry version. Files you have not edited are updated automatically. Files you have edited are merged with a three-way merge when possible; when a merge has conflicts, the incoming file and a unified diff are written to .jml/updates for you to review — the local file is never silently overwritten.


ui:pin

Freeze or unfreeze an installed item at its current version.

terminal
php artisan ui:pin [<item>] [--unpin] [--list]

Pinned items are skipped by bulk updates. Pass --unpin with an item to resume updates, or --list without an item to show all pins.


ui:remove

Remove an installed item's tracked files and lock state.

terminal
php artisan ui:remove <item> [--force] [--dry-run]

Use --dry-run to preview deletion. The command refuses to remove an item that another installed item still depends on; --force skips the confirmation prompt, not dependency safety.


ui:resolve

Complete conflicts staged by ui:update.

terminal
php artisan ui:resolve [<item>] [--theirs|--ours|--edit|--list]

List pending conflicts, accept incoming files, keep local files, or open them in $EDITOR. A successful resolution records the incoming version as the next merge base and removes its staging files.


ui:diff

Show local changes and upstream differences for an installed item.

Usage

terminal
php artisan ui:diff [<item>]

Arguments

  • item — Optional installed item name. When omitted, all installed items are shown.

This command has no options. For each file it prints two unified diffs: one between the cached upstream base and your local file (your edits), and one between the cached base and the current registry version (what has changed upstream). Use this to understand what you would be merging before running ui:update.


ui:status

Show installed UI items, local changes, updates, and registry status.

Usage

terminal
php artisan ui:status [--json]

This command takes no arguments. Pass --json for machine-readable per-item drift state. It checks whether the configured registry endpoint is reachable, then lists every item recorded in ui-lock.json with its installed version, the latest available version, and a status label (e.g. current, update available, local changes). A good first step before running ui:update on a large project.


ui:doctor

Verify the UI package registration and expected Laravel project paths.

Usage

terminal
php artisan ui:doctor [--offline] [--json]

This command takes no arguments. Pass --offline to skip network reachability checks or --json for machine-readable checks and advisories. It runs a series of environment checks and prints a pass/fail result for each:

  • Laravel application base path is available.
  • Brok package config (config/ui.php) is loaded.
  • Generated component, block, config-file, lock-file, and cache paths are set to the expected defaults.
  • The resources/ directory exists.

Exits with a non-zero status if any check fails, making it suitable for CI health checks.


ui:skill

Install Brok's agent instructions into the current project.

terminal
php artisan ui:skill [--check|--update] [--json]

Writes the Claude Code skill and Cursor/AGENTS guidance while preserving user-authored rules outside Brok's marker section. Use --check in CI and --update after package upgrades; --force remains an alias for update.


ui:auth

Authenticate with the Pro registry.

Usage

terminal
php artisan ui:auth [<license>] [--registry=<url>] [--label=<text>] [--machine=<hash>]

Arguments & options

  • license — Pro license key. If omitted, the command prompts for it securely (the input is hidden).
  • --registry= — Pro registry base URL, e.g. https://ui.example.com/r/pro. Defaults to the ui.pro_registry_url config value.
  • --label= — Optional activation label shown in the license dashboard. Defaults to the machine hostname.
  • --machine= — Override the generated machine hash used to activate the license seat. Normally auto-generated; use this for reproducible CI environments.

Sends the license key and a machine fingerprint to the Pro license server's activation endpoint. On success the returned bearer token is stored locally (the path is printed after authentication), and subsequent ui:add pro/<item> calls attach it automatically when fetching from the Pro registry.

Note

ui:auth is only required for Pro items. Open-core components and blocks can be installed without authenticating. Each machine running ui:add pro/… must be activated against your license key. Use --machine= to pin the hash in shared CI environments so the same seat is reused across runs.