logic2b
v0.4.0
Published
CLI for logic2b ui — add copy-paste components to your project.
Maintainers
Readme
logic2b
The command-line tool for logic2b ui — add beautifully designed, copy-paste components to your project. You own the code.
Usage
Initialize your project (creates components.json and the cn() helper):
npx logic2b@latest initAdd components (registry dependencies are resolved automatically):
npx logic2b@latest add button card dialogList everything available in the registry:
npx logic2b@latest listCommands
| Command | Description |
| --- | --- |
| init | Create components.json and install the cn() helper. |
| add <components...> | Add one or more components and their dependencies. |
| update [components...] | Pull registry changes into installed components with a 3-way merge — local edits survive; overlapping edits get git-style conflict markers. |
| diff [components...] | Show which installed components differ from the registry. |
| list | List all components available in the registry. |
add snapshots what it installs under .logic2b/base/ — that snapshot is the
base side of update's merge, so keep the directory (committing it is fine).
Files installed by older CLI versions have no snapshot; update leaves them
untouched and says so.
init and add install the required npm packages automatically, using
whichever package manager the project already uses (packageManager field or
lockfile — pnpm, npm, yarn or bun). Pass --no-install to just print the
install command instead.
Run npx logic2b@latest <command> --help for options.
Documentation
Full docs, live previews and the theme builder are at ui.logic2b.com.
License
MIT © logic2b. See LICENSE; third-party notices in the project repository.
