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 🙏

© 2025 – Pkg Stats / Ryan Hefner

trsai

v1.0.1

Published

CLI tool for creating TRS AI projects and adding TRS AI components

Readme

TRS AI CLI

一个用于创建和管理 TRS AI 项目的命令行工具,支持远程仓库集成。

安装

全局安装

npm install -g trsai

使用 npx(推荐)

npx trsai create my-project

使用方法

创建新项目

# 通过交互式提示创建新项目
trsai create my-project

# CLI 会提示您选择:
# - 模板选择(Vue 3 + TypeScript/JavaScript)
# - 可选功能(Router、Pinia、Ant Design Vue、UnoCSS)
# - 仓库 URL(可选,留空使用默认值)
# - 分支名称(默认:master)

向现有项目添加 TRS AI 组件

# 向现有项目添加组件
trsai add

# CLI 会提示您选择:
# - 目标路径(默认:./src)
# - 文件夹名称(默认:trsAi)
# - 仓库 URL(可选)
# - 分支名称(默认:master)

清理缓存

# 清理下载的仓库缓存
trsai clear-cache

功能特性

  • 🚀 快速搭建:几秒钟内创建 Vue 3 + TypeScript 项目
  • 📦 远程组件:从远程仓库下载 TRS AI 组件
  • 🎨 现代技术栈:Vite、Vue 3、TypeScript、UnoCSS
  • 🔧 可配置:选择您喜欢的工具和库
  • 📱 响应式:移动优先的设计组件
  • 💾 智能缓存:缓存下载的仓库以提高后续操作速度
  • 🌐 灵活来源:支持自定义仓库 URL 和分支

工作原理

  1. 远程下载:从指定的 Git 仓库获取组件
  2. 智能缓存:本地缓存下载的仓库以便快速访问
  3. 动态生成:根据您的选择动态生成项目结构
  4. 版本控制:支持不同的分支和仓库 URL

模板

  • vue-ts:Vue 3 + Vite + TypeScript(推荐)
  • vue-js:Vue 3 + Vite + JavaScript

可选功能

  • Vue Router 用于路由
  • Pinia 用于状态管理
  • Ant Design Vue 用于 UI 组件
  • UnoCSS 用于原子化 CSS

项目结构

my-project/
├── src/
│   ├── trsAi/           # TRS AI 组件(从远程下载)
│   ├── components/      # 您的组件
│   ├── views/          # 页面组件
│   └── main.ts         # 入口文件
├── package.json
├── vite.config.ts
└── tsconfig.json

配置

默认仓库

默认情况下,CLI 使用:

  • 仓库:`https://git.trscd.com.cn/cdtrs/dev/13_ga/ai/trs-ai.git
  • 分支:master
  • 源路径:src/trsAi

自定义仓库

您可以在提示时指定自定义仓库 URL,或留空使用默认值。

缓存位置

下载的仓库缓存在:

  • Windows:%USERPROFILE%\.trsai-cache
  • macOS/Linux:~/.trsai-cache

开发

本地开发

git clone https://git.trscd.com.cn/cdtrs/dev/13_ga/ai/trs-ai.git
cd trs-ai/cli
npm install
npm link

测试

npm test

故障排除

网络问题

如果遇到网络问题:

  1. 检查您的网络连接
  2. 验证仓库 URL 是否可访问
  3. 尝试清理缓存:trsai clear-cache

权限问题

如果遇到权限错误:

  1. 确保您有访问仓库的权限
  2. 检查分支是否存在
  3. 验证您的 Git 凭据