For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /dolan/cli/index.md.

CLI

The @blotch/dolan CLI copies UI components into your app. Later, it tells you when they change and merges the updates for you.

npx @blotch/dolan <command> [options]
  • Run every command from your project folder.
  • npx runs your installed copy once @blotch/dolan is a dependency (see installation). The shorter npx dolan <command> works too.
  • npx @blotch/dolan --help lists the commands, and <command> --help lists a command's options. --version prints the version.
  • Every command except init and info needs a dolan.config.json. Run init first: it writes the file.
  • In CI, a script or an AI agent, the commands ask nothing. See Without a terminal.
CommandWhat it does
initSet up dolan and copy the theme files
addCopy components into your app
listShow installed components and their status
infoShow a component's files and dependencies
diffShow how your copy differs from the bundled source
outdatedList components that aren't up to date (exits 1 if any)
updateMerge the bundled source into your copies
removeDelete a component
ejectStop recording a component's file hashes
themeList theme files, or start a new one
doctorCheck your setup

Where updates come from

The CLI package contains the component source. It doesn't download anything. So "upstream" in every command means the source bundled with the @blotch/dolan version you have installed.

To get newer components, upgrade the CLI and then update:

npm install @blotch/dolan@latest
npx @blotch/dolan update

The CLI keeps two files at the project root. Commit both.

  • dolan.config.json: where components and theme files go. Paths are relative to the project folder.
  • dolan.lock.json: a hash of every copied file, as it was when dolan wrote it. dolan compares it with your file and the bundled source to tell who changed what.
dolan.config.json
{
  "aliases": {
    "components": "src/components/ui",
    "theme": "src/styles"
  }
}

If your project has an .oxfmtrc.json and oxfmt installed, dolan formats the .ts files it writes with your settings.

Without a terminal

In CI, a script or an AI agent, a command's input isn't a terminal, so nobody can answer its questions.

  • The commands ask nothing. Each question takes its default answer.
  • Some stop instead. Where a question has no default, or its default would cancel the run, the command exits with code 1. It does so before changing anything, and says what to pass instead.
CommandQuestionWithout a terminal
initWhere should components and theme files go?Uses --components and --theme, or the defaults.
Overwrite dolan.config.json?Exits 1. Add --force to overwrite it.
Overwrite theme files that differ?Keeps yours.
addWhich components? (no names given)Exits 1. Name them: add button card.
Overwrite installed components?Skips them. Add --force to overwrite them.
updateApply the auto-updates?Applies them.
How should each conflict be resolved?Applies the rest, leaves the conflicts alone and exits 1. See update.
Every file, with --selectiveExits 1.
diffWhich component? (no name given)Shows every changed component.
removeRemove it, though others depend on it?Exits 1. Add --force to remove it anyway.
Also remove orphaned dependencies?Removes them.
ejectStop tracking it?Exits 1. Add --force to eject it.

To get the same in a terminal, redirect the input, as in npx @blotch/dolan update < /dev/null. init also takes --yes.

init

Sets up dolan in your project and copies the theme files.

npx @blotch/dolan init
Argument or optionDescription
--components <path>Install components here instead of asking. Default: src/components/ui.
--theme <path>Install the theme files here instead of asking. Default: src/styles.
-y, --yesAsk nothing: use the default folders, keep theme files that differ, and stop on an existing config.
-f, --forceOverwrite an existing dolan.config.json and theme files without asking.

It asks where to install components and theme files, then sets up the project:

  • Writes dolan.config.json. If one exists, it asks before overwriting (default No).
  • Copies the theme files into the theme folder: default.css, dark.css and tailwind.css.
    • On Tailwind 3, it copies tailwind-plugin.ts in place of tailwind.css. That's an app with a tailwind.config.*, or without Tailwind 4 installed.
    • With the testing library, it also copies the plugin's test, tailwind-plugin.test.ts. That's when your package.json lists @blotch/angular-lynx-testing-library (see add).
    • If a theme file is already there and differs, it asks before overwriting (default No), and keeps yours otherwise.
  • Records the theme files' hashes in dolan.lock.json, so update can tell whether you've edited them.
  • Installs @blotch/dolan as a dependency if package.json doesn't list it, with your package manager. The copied components import its utilities. If the install fails, the next steps say how to run it.
  • Creates the components folder and prints the next steps.
    • The @import lines for the theme files, and on Tailwind 3, the Tailwind plugin for your config.
    • They're written relative to your global stylesheet: the first styles entry in angular.json, src/styles.css by default.

Without a terminal, or with --yes, init asks nothing:

npx @blotch/dolan init --yes --components src/app/ui --theme src/app/theme
  • The folders come from --components and --theme, or are the defaults.
  • Theme files that differ are kept, and init lists them. Add --force to replace them.
  • An existing dolan.config.json stops init with exit code 1, before it changes anything. Add --force to overwrite it.

theme

Lists your theme files, or starts a new theme.

npx @blotch/dolan theme [name]
Argument or optionDescription
[name]Create a theme file with this name.
  • Without a name, it lists the .css files in your theme folder.
  • With a name, it copies default.css to <theme folder>/<name>.css for you to edit. It stops if that file exists.

Import the new file in place of default.css. See Theming.

doctor

Checks your setup, and exits with code 1 if any check fails.

npx @blotch/dolan doctor

Options: none. It runs these checks in order:

CheckIf it doesn't pass
dolan.config.json exists, is valid JSON and has components and theme pathsFails and stops
The components and theme folders existFails
The theme folder has tailwind.css (tailwind-plugin.ts on Tailwind 3), and default.css or dark.cssWarns
default.css sets a font size on page (see below)Warns
Each color the plugin maps with themeColor() has a matching -rgb twin in every theme fileWarns
The theme sets and maps the colors the installed components read, such as Glass's glass-* colorsWarns
tailwindcss is installed, and the app is set up for its version (see below)Warns
No theme files for the other Tailwind version (see below)Warns
On Tailwind 4, the global stylesheet imports tailwind.css; on Tailwind 3, the config mentions blotchPluginWarns
package.json lists @angular/core, @blotch/angular-lynx and @blotch/dolanFails
Every component folder is a known component, has all its files and has its dependenciesWarns
No component has tests without @blotch/angular-lynx-testing-library to run themWarns
package.json lists the npm packages the components import, such as class-variance-authorityFails
What the checks look for
  • Font size: the components are sized in rem for a 16px root, where Lynx's own is 14px.
  • Tailwind set up for its version: no tailwind.config.* on Tailwind 4, and a tailwind.config.* on Tailwind 3.
  • The other version's theme files: tailwind-plugin.ts and its test on Tailwind 4, or tailwind.css on Tailwind 3.
  • -rgb twins are what opacity modifiers such as bg-primary/50 read. The check suggests the line to add for a missing one.
  • Components' colors are missing from a theme copied before the component existed. The check quotes dolan's lines for them.
  • Ejected components: their files aren't checked.
  • A utils path in an older config is allowed but not needed.

Finding Tailwind

doctor looks for tailwindcss the way the build does, from your app's folder, and reports its version:

◆  tailwindcss 4.3.3 found, set up for Tailwind 4
  • It finds Tailwind that your workspace root installs. It also finds the one @tailwindcss/postcss brings, when your package.json lists only that.
  • A tailwind.config.* with Tailwind 4 installed gets a warning. dolan sets the theme up for Tailwind 3 while the config is there (see Move to Tailwind 4).
  • So does Tailwind 3 without a config, which the build needs to run it.