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

yl-graph

v1.0.7

Published

yl-graph 开箱即用的图表智能助手

Readme

yl-graph

开箱即用的图表智能助手,支持通过自然语言描述快速生成各类专业图表(Mermaid、思维导图、ER 图、流程/时序/甘特等),并在同一端口提供 Web UI 与 API。

项目介绍

yl-graph 是一个基于 AI 的智能图表生成工具,采用 Vue 3 + TypeScript + Express 的现代化技术栈,提供流畅的交互体验和强大的扩展能力。

核心特性

  • 开箱即用:无需繁琐配置,npx 一键启动,配置模型即用
  • 多 LLM 支持:OpenAI、Azure、Anthropic、Moonshot、DeepSeek、GLM、Ollama 等
  • 多图表支持:内置多种解析能力,支持多种图表绘制
  • 实时预览:所见即所得,随时调整
  • 数据持久化:本地持久化,随时找回历史图表
  • 现代化架构:Vue 3 + TypeScript + Express
  • 安全可靠:除三方大模型调用外,操作均在本地完成
  • 国际化:中英双语 i18n
  • 响应式设计:适配桌面端与移动端

支持的 LLM 提供商

| 提供商 | 说明 | 特点 | |--------|------|------| | OpenAI | GPT 系列 | 高质量对话与代码生成 | | Azure OpenAI | 企业级 OpenAI | 合规性与数据隐私 | | Anthropic | Claude 系列 | 超长上下文,安全性高 | | Moonshot | 月之暗面/Kimi | 中文优化,超长上下文 | | DeepSeek | DeepSeek Chat/Coder | 代码生成,性价比高 | | GLM | 智谱 AI | 中文场景,支持思维链 | | Ollama | 本地部署 | 完全本地,数据安全 |

更详细的接入参数与示例,可参见项目文档或设置页面说明。

快速开始(开箱即用)

首先全局安装yl-graph:

npm -g yl-graph
  • npx 一键启动:
    • npx yl-graph --port 3000

系统要求

  • Node.js ≥ 18(推荐 LTS)
  • Windows / macOS / Linux
  • 现代浏览器(推荐最新版本的 Chrome/Edge)

使用指南

  1. 启动应用后,进入设置配置你的 LLM 提供商(OpenAI、Azure、Ollama 等)。
  2. 在聊天输入框上方使用“快捷提问气泡”快速填充问题。
  3. 可上传文档(.docx/.pdf/.md/.txt)辅助生成图表。
  4. 生成后可复制/调整,支持多种图表类型与导出。

目录结构(本仓库)

graph-tool/
├─ client/                 # 前端(Vue 3 + Vite)
│  └─ dist/                # 前端构建产物
├─ server/                 # 后端(Express + TypeScript)
│  ├─ src/public/dist/     # 默认托管的前端静态目录(SPA)
│  └─ bin/ylgraph.cjs      # CLI 启动器(发布后支持 npx ylgraph)
├─ prisma/                 # Prisma schema(如有使用)
└─ README.md               # 项目总览

环境变量

  • PORT:服务端口,默认 3000
  • CORS_ORIGIN:允许的跨域来源(逗号分隔),例如 http://localhost:5173,https://example.com
  • NODE_ENV:development / production
  • LOG_LEVEL:日志级别 error|warn|info|debug

常见 Q&A

  • 打开空白页或 Cannot GET /?
    • 先执行 npm run build:client,并确保构建产物位于 server/src/public/dist;然后 npm start。
  • 控制台出现 CSP 'unsafe-eval' 报错?
    • 服务器已放宽 script-src 以兼容个别前端依赖;生产建议移除对 eval/new Function 的依赖并收紧 CSP。
  • 端口被占用?
    • 使用 PORT=3001 npm start 或 ylgraph --port 3001。
  • 前端路由刷新 404?
    • 已启用 SPA 回退,确保静态目录正确且未被上层网关拦截。
  • SSE 无输出?
    • 确保代理/网关未缓冲 SSE,或直连本地端口测试。

版本支持与兼容性

  • Node.js:≥ 18(推荐 LTS)
  • 前端:Vue 3.x,Vite 构建
  • 后端:Express + TypeScript(tsx 直跑)