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

yicoclaw

v3.2.12

Published

yicoclaw - AI Agent Workspace

Downloads

4,989

Readme

AI Agent Workspace

AI 对话工作台,支持多模型切换、自定义模型管理、Markdown 渲染及技能管理。

功能特性

  • 多模型支持:支持预置模型和自定义模型配置
  • 流式对话:实时流式输出,打字机效果
  • 模型管理:可视化配置自定义模型(API Key、地址等)
  • 技能管理:上传和管理技能包
  • 用户认证:基于用户名密码的登录系统
  • Markdown 渲染:支持代码高亮、表格等 GFM 扩展

技术栈

  • Framework: Next.js 16 (App Router)
  • Core: React 19pn
  • Language: TypeScript 5
  • UI 组件: shadcn/ui (基于 Radix UI)
  • Styling: Tailwind CSS 4
  • LLM SDK: coze-coding-dev-sdk

快速开始

1. 安装依赖

pnpm install

2. 启动开发服务器

pnpm dev

服务将在 http://localhost:5000 上运行。

3. 访问应用

打开浏览器访问 http://localhost:5000

默认登录账号:

  • 用户名:admin
  • 密码:admin123

CLI 命令行工具

安装

# 从源码安装
cd packages/yicoclaw
pnpm install && pnpm build && npm link

命令

| 命令 | 描述 | |------|------| | yicoclaw install | 安装并配置 CLI | | yicoclaw install --port 5000 | 指定默认端口 | | yicoclaw install --skills /path | 指定技能存放路径 | | yicoclaw install --yes | 使用默认配置 | | yicoclaw start | 启动服务 | | yicoclaw start --port 9527 | 指定端口启动 | | yicoclaw doctor | 检查安装状态 |

配置文件

安装后,用户配置保存在 ~/.yicoclaw/config.json

{
  "defaultPort": 5000,
  "skillsPath": "/home/user/.yicoclaw/skills",
  "installPath": "/path/to/project"
}

配置说明

config.json 结构

{
  "app": {
    "name": "AI Agent Workspace",
    "version": "1.0.0"
  },
  "auth": {
    "enabled": true,
    "users": [
      {
        "username": "admin",
        "password": "admin123",
        "role": "admin"
      }
    ],
    "sessionTimeout": 86400
  },
  "fileOperations": {
    "enabled": true,
    "allowedPaths": ["${COZE_WORKSPACE_PATH}", "/tmp"],
    "maxFileSize": 10485760,
    "allowedFileTypes": [".txt", ".md", ".json", ".js", ".ts"]
  },
  "skills": {
    "enabled": true,
    "skillsPath": "/workspace/projects/skills",
    "allowedOperations": ["create", "read", "update", "delete"]
  },
  "modelSelection": {
    "mode": "manual",
    "defaultModel": "custom-glm-4-001",
    "customModels": [
      {
        "id": "custom-glm-4-001",
        "name": "GLM-4",
        "modelName": "glm-4",
        "apiKey": "your-api-key",
        "baseUrl": "https://open.bigmodel.cn/api/paas/v4",
        "description": "智谱大模型"
      }
    ]
  }
}

添加自定义模型

在左侧菜单点击「模型管理」,添加自定义模型:

| 字段 | 说明 | |------|------| | 模型显示名称 | 界面中显示的名称 | | OpenAI 模型名称 | API 调用的实际模型名 | | API Key | 模型的 API 密钥 | | API URL | API 基础地址 |

API 接口

用户登录

POST /api/auth/login
Content-Type: application/json

{
  "username": "admin",
  "password": "admin123"
}

流式聊天

POST /api/chat/stream
Content-Type: application/json

{
  "message": "用户消息",
  "modelId": "custom-glm-4-001",
  "history": [
    { "role": "user", "content": "历史消息" },
    { "role": "assistant", "content": "历史回复" }
  ]
}

文件操作

POST /api/files
Content-Type: application/json

{
  "action": "create|read|update|delete|list",
  "filePath": "/path/to/file.txt",
  "content": "文件内容"
}

技能上传

POST /api/skills/upload
Content-Type: multipart/form-data

file: 技能包文件 (.zip, .tar.gz)

开发指南

# 开发模式
pnpm dev

# 构建生产版本
pnpm build

# 启动生产服务
pnpm start

# 代码检查
pnpm lint
pnpm ts-check

项目结构

├── src/
│   ├── app/
│   │   ├── api/          # API 路由
│   │   ├── login/        # 登录页面
│   │   ├── page.tsx      # 主页面
│   │   └── layout.tsx    # 根布局
│   ├── components/       # 组件
│   │   ├── sidebar.tsx   # 侧边栏
│   │   ├── chat-page.tsx # 对话页面
│   │   ├── models-page.tsx   # 模型管理
│   │   └── skills-page.tsx   # 技能管理
│   └── lib/              # 工具库
├── packages/
│   └── yicoclaw/         # CLI 工具
├── public/               # 静态资源
├── config.json           # 配置文件
└── skills/               # 技能存储

安全注意事项

  1. API Key 安全:不要将包含真实 API Key 的 config.json 提交到版本控制
  2. 文件操作权限:配置 allowedPaths 限制可操作的目录
  3. 文件类型限制:配置 allowedFileTypes 限制可创建的文件类型
  4. 文件大小限制:配置 maxFileSize 防止创建过大文件