@sanring/cli
v0.24.1
Published
CLI for adding Sanring UI components to your Angular project
Readme
@sanring/cli
CLI for adding Sanring UI components to your Angular project. Components are copied directly into your project as source — you own the code.
Features
- No runtime UI package to depend on — nothing to install or version-pin.
sanring addresolves component dependencies, peer packages, and shared utilities automatically.sanring diff/sanring updateprotect customized files by showing a diff before overwriting.
Usage
npx @sanring/cli@latest init
npx @sanring/cli@latest add date-pickerAngular CLI users can bootstrap with:
ng add @sanring/cliCommands are grouped by what stage of your workflow they belong to:
# Install
npx @sanring/cli@latest init # set up sanring.config.json + theme
npx @sanring/cli@latest add date-picker # copy a component into your project
npx @sanring/cli@latest remove date-picker # remove an installed component
# Explore
npx @sanring/cli@latest list # browse available components
npx @sanring/cli@latest search date # search by name or description
npx @sanring/cli@latest info date-picker # preview what would be installed
# Maintain
npx @sanring/cli@latest diff date-picker # compare local files against registry
npx @sanring/cli@latest migrate date-picker # check for breaking-change migration steps
npx @sanring/cli@latest update date-picker # apply registry changes
npx @sanring/cli@latest doctor # check environment + project healthbuild generates a registry.json for publishing your own registry, and mcp starts an MCP server for AI coding agents — see below.
Every command accepts --registry <url-or-path> to point at a custom registry. sanring.config.json also supports registries and defaultRegistry for permanent alias configuration. Run any command with --help for the full flag list, or see ui.sanring.dev/cli for complete documentation.
Notes
- Requires Node.js >= 18, Angular >= 22, Tailwind CSS.
initcreatessanring.config.jsonand writessrc/sanring-theme.css. Add the theme file to your global CSS once:@import './sanring-theme.css';addrecords a content hash per file sodiff/updatecan tell untouched files from customized ones — untouched files update silently, customized files always prompt first.mcpstarts an MCP server over stdio for AI coding agents (npx @sanring/cli@latest mcp).buildgenerates aregistry.jsonfrom your own Angular component source tree for publishing a private registry (npx @sanring/cli@latest build --help).
Links
- Documentation: ui.sanring.dev
- GitHub: github.com/sanringtech/ui
License
MIT
