Install your first item
Manteen requires Node 22.12 or newer. Install the CLI with the package manager already used by your application:
npm install --save-dev manteenFrom the application root, inspect the initialization plan and then apply it:
npx manteen init --dry-runnpx manteen initinit supports Vite, Next App Router, Next Pages Router, valid Next hybrids, and framework-mode
React Router. It configures Mantine’s provider, theme, core styles, a Manteen-owned package-style
file, PostCSS, and TypeScript aliases while preserving the framework’s generated structure.
Install a component from the live registry:
npx manteen info @house/article-cardnpx manteen add @house/article-cardThe source is copied into your aliases and belongs to your project afterward. In manteen@0.3.0
and newer, Manteen records the source URL, ownership, installed hash, pristine-base hash, theme
contribution, and package styles in the receipt-v3 manteen.lock.json. The exact pristine source
for each ordinary file lives under .manteen/bases/. Commit the receipt, installed source, and
.manteen/bases/ together so updates remain reproducible in every clone.
Maintain installed source
Section titled “Maintain installed source”npx manteen diffnpx manteen diff --statnpx manteen update @house/article-carddiff shows what changed from the pristine base to your local file, what changed upstream, and
what the proposed result would change locally. By default, update performs that same three-way
merge: non-overlapping local and upstream edits are preserved together.
Line diff3 remains the first merge path. If it conflicts on a .ts or .tsx file, Manteen
automatically tries one conservative AST-assisted fallback for changes to distinct stable imports
or exported top-level declarations. The AST only identifies exact source ranges; it never
reformats output. Ambiguous or same-declaration changes remain conflicts.
If both sides changed the same text incompatibly, Manteen refuses before modifying the project;
--force does not clear the conflict and conflict markers are never written. After reviewing the
diff, explicitly discard local edits and reset to upstream only when that is what you intend:
npx manteen update @house/article-card --take-upstreamThat reset also rebuilds a missing or corrupt pristine base. Files removed upstream are reported
and retained by update; Manteen does not infer deletions or renames.
First discover every file proven absent from the same current registry item:
npx manteen remove --upstream-removed --dry-runThen preview the exact POSIX receipt destination you intend to remove, and rerun without
--dry-run only after reviewing it:
npx manteen remove --upstream-removed --file src/components/ui/old.tsx --dry-runnpx manteen remove --upstream-removed --file src/components/ui/old.tsxIf the local file differs from its pristine upstream base, the selection refuses as adapted. Preserve the file, or repeat the same exact selection with the additional destructive intent only when discarding that adaptation is deliberate:
npx manteen remove --upstream-removed \ --file src/components/ui/old.tsx \ --discard-adaptedThe removal transaction covers that project file, its obsolete base, and its exact receipt record.
It does not infer a rename or uninstall the item, dependencies, theme contributions, or managed
styles. A real run without an exact --file refuses as usage rather than broadening the deletion.
Next, learn how to build your own registry.