npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ansstory/hias

v1.0.31

Published

CLI scaffolding tool with project templates and component generators for Vue/React/uni-app

Readme

hias-cli 操作手册

npm version license

hias-cli 是一个面向前端项目的命令行工具,包含项目模板创建、Vue/React/Redux 文件生成、端口关闭、CLI 语言切换。

本文是操作手册,按真实使用顺序组织:先安装,再配置,再执行项目创建和组件生成。

文档已迁移

翻译相关功能已迁移至 https://ansstory.github.io/hitf-cli-md/。以下文档不再包含翻译功能说明。

环境要求

  • Node.js >= 18
  • Windows、macOS、Linux 均可使用

安装与检查

全局安装:

npm i @ansstory/hias -g

检查安装结果:

hias -v
hias --help

只清理全局配置,不卸载包:

hias clear-config

命令总览

| 命令 | 别名 | 用途 | | ----------------------- | ----- | ------------------------------ | | create <project> | crt | 交互式创建项目模板 | | adv <name> | - | 生成 Vue 组件 | | adr <name> | - | 生成 React JSX 组件 | | adrt <name> | - | 生成 React TSX 组件 | | adrd <name> | - | 生成 Redux JSX store | | adrdt <name> | - | 生成 Redux TSX store | | gitignore | - | 将 .hias 写入 .gitignore | | close-port <ports...> | - | 关闭占用端口的进程 | | lang [language] | - | 切换或查看 CLI 显示语言 |

推荐工作流

首次使用时,建议按下面顺序执行:

cd your-project
hias setting
hias gitignore
hias create my-app

如果需要创建项目:

hias create my-app

命令会进入交互式选择流程,从模板仓库下载项目到 my-app。

可用模板:

| 模板 | 说明 | | ------------ | ----------------------- | | vue2 | Vue 2 模板 | | vue3 | Vue 3 模板 | | vue-ts | Vue 3 + TypeScript 模板 | | uni-vite | uni-app + Vite 模板 | | nuxt-web | Nuxt.js 网页模板 | | vue-screen | Vue 数据大屏模板 | | react | React JSX 模板 | | react-ts | React TypeScript 模板 |

生成组件和 store

默认生成到 src/components:

hias adv Demo
hias adr Demo
hias adrt Demo

指定目录:

hias adv Demo -d src/views/user
hias adr Demo -d src/components
hias adrt Demo -d src/components

生成 Redux store:

hias adrd useUserStore -d src/store/modules
hias adrdt useUserStore -d src/store/modules

当名称为 index 时,生成文件会使用父目录名称。例如:

hias adv index -d src/views/user

会生成类似 src/views/user/user.vue 的文件。

CLI 语言

hias lang zh-CN
hias lang en
hias lang -l

支持:

  • zh-CN
  • en

配置保存于:

~/.hias-cli/config.json

本项目开发命令

在 hias-cli 仓库中:

npm install
npm test
npm run build
npm run doc:dev
npm run doc:build

脚本说明:

| 脚本 | 用途 | | -------------------------- | --------------------------- | | npm test | 运行 Node.js 测试 | | npm run build | 构建 dist/index.js 和模板 | | npm run build:obfuscated | 混淆构建,用于发布 | | npm run doc:dev | 启动 VitePress 文档站 | | npm run doc:build | 构建文档站 | | npm run doc:preview | 预览文档站构建产物 |

常见问题

文档已迁移至 https://ansstory.github.io/hitf-cli-md/