CLI
@94ai-plus/cli is the Common UI command-line tool. The CLI ships its data and supports version, language, JSON and Markdown options.
site returns homepage (official homepage) and documentation (snapshot documentation URL); fixed versions use versions/<version>/. --offline reads matching bundled data or verified cache without visiting the website. Older snapshots without website metadata report WEBSITE_UNAVAILABLE; other queries remain available.
Highlights
- Bundled knowledge: component APIs, declarations, full examples and design rules ship with the CLI. Matching bundled data and verified cache work offline without a model API key.
- Exact versions: confirm the consuming project version, then query its snapshot. Missing data reports an error without substituting another version.
- Agent output: knowledge queries support
--format jsonwithprovenanceandresult; documentation can be returned as Markdown. - Eight languages and two themes: select knowledge with
--lang; query Chalk/OEM and Element Plus light/dark Design Tokens. - Project diagnostics: inspect environments, dependencies, component usage, static findings and two explicit knowledge snapshots without executing business modules.
- AI integrations: MCP, Skill installation and project setup are available. Upgrades and issue reports preview by default; writes require explicit execution options.
Installation
Requires Node.js 22.13.0 or later and npm/npx. Install it globally:
npm install -g @94ai-plus/cliAlternatively, install it as a project development dependency and run npx common-ui:
npm install -D @94ai-plus/cli
npx common-ui --helpRun a published CLI temporarily without installing it first:
npx --package @94ai-plus/cli common-ui listRun from local source
In the component-library source repository, build the CLI and replace common-ui with node packages/cli/dist/index.mjs. For example, node packages/cli/dist/index.mjs info NfTable --lang en-US is the local equivalent.
yarn build:components cli
node packages/cli/dist/index.mjs listQuick start
All commands are listed below. Use common-ui after global installation or npx common-ui after project installation. Replace <exact-version> with the library knowledge version and <exact-cli-version> with the CLI tool version. Prepare both JSON snapshots before using diff. List examples with demo before selecting a real example ID.
common-ui site --offline # Read the official homepage and snapshot documentation URLs offline
common-ui list # List components, packages and public exports
common-ui info NfTable # Read component APIs, declarations and provenance
common-ui doc NfTable --format markdown # Read the complete Markdown document
common-ui demo NfTable # List example IDs; use demo NfTable <example-id> to read source
common-ui theme --theme chalk # Query Chalk/OEM theme variables
common-ui token ElButton # Query Element Plus tokens and theme overrides
common-ui design # Read design rules for both themes
common-ui semantic NfTable # Query documented styling props and slots
common-ui changelog <exact-version> # Read notes for an exact version
common-ui versions # List published online documentation versions
common-ui env # Inspect runtime and project dependencies
common-ui doctor # Diagnose dependencies, versions and integration
common-ui usage ./src # Locate component imports and template/JSX usage
common-ui lint ./src # Check imports, legacy Vue syntax and parse issues
common-ui diff ./from.json ./to.json # Compare two explicit knowledge snapshots
common-ui mcp # Start the read-only MCP stdio server
common-ui setup --client cursor --mode both --dry-run # Preview project MCP and Skill configuration
common-ui skills install --dry-run # Preview the bundled Skill installation command
common-ui upgrade <exact-cli-version> --dry-run # Preview an explicit CLI version upgrade
common-ui bug --title "Component issue" --dry-run # Preview a component-library issue report
common-ui bug-cli --title "CLI issue" --dry-run # Preview a CLI issue report
common-ui --help # Show commands and options
common-ui --cli-version # Show the CLI tool package version--version local|<exact-version> · --lang en-US · --format json|text|markdown · --theme chalk|oem
Confirm the installed library version, then query props, events, slots, methods and full examples. Never infer support from a name. If documentation matching the project’s version cannot be found, an explicit error is reported; documentation for another version is not substituted automatically.
Install the Skill
After installing a published CLI, run this in the consuming project and select AI tools when prompted. It installs the bundled Skill through npx with the pinned skills@1.7.6 installer; npm/npx and registry access are required. Copy installation preserves SKILL.md and references independently of the temporary npx cache.
npx common-ui skills install
npx common-ui skills install --agent codex --yes
npx common-ui skills install --dry-runUse --agent codex to select a tool, --global for user scope, --yes to skip Skills prompts, or --project <directory> to choose the project. The default is interactive project installation. --dry-run previews without downloading or installing. MCP is not configured.
Documentation versions and offline queries
CLI and MCP prefer matching bundled knowledge or verified cache, then download an exact snapshot if missing. --offline disables networking; --refresh revalidates online data.
common-ui versions --format json
common-ui doc NfTable --version <exact-version> --offline --format json
common-ui doc NfTable --version <exact-version> --refresh --format jsonProject tools and maintenance
Project scans recognize import aliases, Vue templates and JSX, reporting locations without executing business modules. Dynamic usage and cross-file type inference still need review. diff compares two explicit knowledge JSON files.
upgrade previews an explicit CLI version installation; --yes executes it. bug / bug-cli preview reports; after review, --submit --yes with GITHUB_TOKEN creates a GitHub Issue. Runtime components are not upgraded automatically and issues are not sent automatically.
common-ui env --format json
common-ui doctor --format json
common-ui usage ./src --filter NfTable --format json
common-ui lint ./src --only migration --format json
common-ui diff ./from.json ./to.json --format json
common-ui upgrade <exact-cli-version> --dry-run
common-ui bug-cli --title "CLI issue" --description "Reproduction details" --dry-runSet up the project
Run in the consuming project after installing a published CLI. Supported clients: claude, cursor, vscode, codex; modes: mcp (default), skill, both. Skill mode copies the complete bundled Skill and references without downloading Skills CLI.
npx common-ui setup --client claude --lang en-US
npx common-ui setup --client cursor --mode both --lang en-US
npx common-ui setup --client vscode --write-instructions --lang en-US
npx common-ui setup --client codex --dry-run --lang en-US
npx common-ui setup --client codex --check --lang en-US--project <directory> selects the project; --version <exact-version> selects component knowledge; --lang selects the language. --write-instructions appends a managed instruction block and preserves existing text. MCP configuration pins the current CLI package version and records the absolute project path.
--dry-run previews paths, actions and the proposed MCP server; --check checks file consistency and exits 1 on missing or different content. Both are read-only and make no network requests. Setup preserves unrelated services, JSON comments and TOML text. Identical files are unchanged; conflicting common-ui entries or Skill files must be reconciled manually. Clients still need to load/approve the server; Codex project settings apply only to trusted projects.
Use with AI tools
The CLI bundles the common-ui Skill, which guides agents to confirm the component library version before looking up its APIs, complete examples and design guidelines, and to choose appropriate CLI commands. Run the following command and select your AI tool and installation scope:
npx --package @94ai-plus/cli common-ui skills install| Tool | Instructions |
|---|---|
| Claude Code | Add --agent claude-code when installing the Skill to select this tool. See the documentation |
| Cursor | Add --agent cursor when installing the Skill to select this tool. See the documentation |
| Codex | Add --agent codex when installing the Skill to select this tool. See the documentation |
| Gemini CLI | Add --agent gemini-cli when installing the Skill to select this tool. See the documentation |
Other agents supported by the Skills installer are also available through its interactive prompts. Invoking the CLI requires an available common-ui command; see Installation. Installing the Skill does not start or configure MCP.
