@lingshugroup/ls-web-cli
v1.1.1
Published
CLI for LS Components Plus - query component knowledge and demos
Readme
LS Web CLI
CLI for LS Components Plus - query component knowledge, read docs, and get demos. Ships the component sources and docs inside the package, so the CLI/MCP work fully offline — no git clone, no network access needed.
Install
npm install -g @lingshugroup/ls-web-cliUsage
ls-web-cli list # list all components
ls-web-cli info button # get Button props, events, slots, and exposes
ls-web-cli doc table # read Table markdown docs
ls-web-cli demo form # get Form code examples
ls-web-cli mcp # start MCP server for IDE integrationMCP Server news
Add to your IDE's MCP config (e.g. .mcp.json for Claude):
{
"mcpServers": {
"ls-web": {
"command": "npx",
"args": ["-y", "@lingshugroup/ls-web-cli", "mcp"]
}
}
}Tools exposed:
| Tool | Description |
|------|-------------|
| ls_list | List all components |
| ls_info | Get component props, events, slots, and exposes |
| ls_doc | Read full markdown documentation |
| ls_demo | Get demo code examples |
Prompts exposed:
| Prompt | Description |
|--------|-------------|
| ls-expert | LS Components Plus expert assistant |
| ls-page-generator | Generate Vue 3 pages with LS components |
Data sources (offline by default)
The CLI/MCP reads LS Components Plus data (component sources + docs/demos) from the first location that exists:
--project <dir>flag orLS_COMPONENTS_PLUS_DIRenvironment variable- Bundled data shipped inside the installed package (
data/ls-components-plus) — used by the published package, fully offline - A local
ls-components-pluscheckout next to the CLI repository ~/.ls-web-cli/ls-components-pluscache (cloned on demand as a fallback, with a 120s timeout; configurable viaLS_WEB_GIT_TIMEOUT_MS)
Development
npm install
npm run build
npm start -- listThe build step runs scripts/prepare-data.mjs, which copies the component
sources and docs into data/ls-components-plus so they ship with the package.
Data sources, in order of preference:
LS_COMPONENTS_SOURCE_DIR— point at a local ls-components-plus checkout (fully offline build).cache/ls-components-plus— an existing local clone (no network)- Shallow clone of
LS_COMPONENTS_SOURCE_REPO(defaults to GitHub; set it to an internal mirror if needed)
License
MIT
