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

@wuhrai/wuhr-ai

v2.0.0

Published

WuhrAI - 企业级智能运维助手,支持多AI模型、MCP工具扩展和自动化运维

Downloads

14

Readme

WuhrAI - 企业级智能运维助手

WuhrAI Logo

🚀 专为DevOps和系统管理员设计的AI助手

npm version Docker License 中文文档

English | 中文 | 安装指南 | 使用文档 | Docker部署

🎯 项目简介

WuhrAI 是一个专为企业级运维场景设计的智能AI助手,基于先进的大语言模型技术,为DevOps工程师和系统管理员提供智能化的运维支持。

✨ 核心特性

  • 🤖 多模型支持 - 支持OpenAI、DeepSeek、Gemini等主流AI模型
  • 🔧 智能运维 - 自动化脚本生成、配置检查、故障诊断
  • 📁 文件分析 - 支持配置文件安全检查和优化建议
  • 🖥️ Shell集成 - 直接执行系统命令并提供智能分析
  • 🌐 云厂商兼容 - 支持所有OpenAI兼容格式的API
  • 🐳 容器化部署 - 完整的Docker支持
  • 🎨 中文界面 - 完全中文化的用户界面
  • 🔐 安全模式 - 沙盒环境和权限控制

🏢 适用场景

  • 系统监控 - CPU、内存、磁盘使用情况分析
  • 配置管理 - Nginx、MySQL、Redis等服务配置优化
  • 故障诊断 - 日志分析、网络问题排查
  • 自动化脚本 - 监控脚本、部署脚本生成
  • 安全检查 - 配置文件安全性审计
  • 性能优化 - 系统性能分析和优化建议

🚀 快速开始

方式一:npm 安装(推荐)

# 全局安装
npm install -g @wuhrai/wuhr-ai

# 启动助手
wuhr-ai

方式二:Docker 部署

# 拉取镜像
docker pull wuhrai/wuhr-ai:2.0.0

# 运行容器
docker run -it --rm \
  -e OPENAI_API_KEY="your-api-key" \
  -e OPENAI_BASE_URL="https://api.openai.com/v1" \
  wuhrai/wuhr-ai:2.0.0

方式三:Docker Compose

# 下载配置文件
curl -O https://raw.githubusercontent.com/wuhrai/wuhr-ai/main/docker-compose.wuhrai.yml

# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加您的API密钥

# 启动服务
docker-compose -f docker-compose.wuhrai.yml up -d

⚙️ API配置

WuhrAI 支持多种AI模型提供商,您可以选择其中一种进行配置:

OpenAI兼容API(推荐)

export OPENAI_API_KEY="your-api-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"

支持的云厂商:

  • OpenAI官方
  • Azure OpenAI
  • 阿里云通义千问
  • 腾讯云混元
  • 百度文心一言
  • 本地Ollama
  • OneAPI统一接口

DeepSeek API

export DEEPSEEK_API_KEY="your-deepseek-key"

Google Gemini API

export GEMINI_API_KEY="your-gemini-key"

交互式配置

首次运行时,WuhrAI会自动启动配置向导:

wuhr-ai
# 按照提示选择API提供商并输入密钥

📖 使用指南

基本运维任务

# 系统监控
echo "检查系统CPU、内存、磁盘使用情况" | wuhr-ai --yolo

# 配置检查
echo "@/etc/nginx/nginx.conf 检查配置安全性" | wuhr-ai

# 日志分析
echo "@/var/log/syslog 分析最近的错误" | wuhr-ai

# 脚本生成
echo "生成系统监控脚本" | wuhr-ai --yolo

交互式使用

# 启动交互式界面
wuhr-ai

# 在界面中输入:
# - 直接提问:如何优化MySQL性能?
# - 文件分析:@/etc/ssh/sshd_config
# - 执行命令:!df -h
# - 查看帮助:/help

高级功能

# 指定模型
wuhr-ai --provider deepseek --model-name deepseek-coder

# 安全模式
wuhr-ai --sandbox --telemetry false

# 调试模式
wuhr-ai --debug

# 自动执行模式
wuhr-ai --yolo

🐳 Docker 部署

构建镜像

# 克隆仓库
git clone https://github.com/wuhrai/wuhr-ai.git
cd wuhr-ai

# 构建镜像
docker build -f Dockerfile.wuhrai -t wuhrai/wuhr-ai:2.0.0 .

环境变量配置

创建 .env 文件:

# AI API 配置
OPENAI_API_KEY=your-openai-api-key
OPENAI_BASE_URL=https://api.openai.com/v1

# 或者使用 DeepSeek
# DEEPSEEK_API_KEY=your-deepseek-key

# WuhrAI 配置
WUHRAI_TELEMETRY=false
WUHRAI_AUTO_EXECUTE=false

持久化配置

# 创建配置卷
docker volume create wuhrai_config

# 运行容器
docker run -it --rm \
  --env-file .env \
  -v wuhrai_config:/home/wuhrai/.gemini \
  -v $(pwd)/workspace:/workspace \
  wuhrai/wuhr-ai:2.0.0

🛠️ 开发指南

本地开发

# 克隆仓库
git clone https://github.com/wuhrai/wuhr-ai.git
cd wuhr-ai

# 安装依赖
npm install

# 构建项目
npm run build

# 本地测试
npm link
wuhr-ai

项目结构

wuhr-ai/
├── packages/
│   ├── cli/                 # 命令行界面
│   └── core/               # 核心功能
├── docs/                   # 文档
├── Dockerfile.wuhrai       # Docker配置
├── docker-compose.wuhrai.yml
└── README.zh.md           # 中文文档

📋 命令参考

命令行选项

wuhr-ai [选项]

选项:
  -m, --model              AI模型名称
  -p, --prompt             提示词
  -s, --sandbox            沙盒模式
  -d, --debug              调试模式
  -y, --yolo               自动执行模式
  --provider               API提供商
  --base-url               API基础URL
  --api-key                API密钥
  --help                   显示帮助

交互式命令

/help                      # 显示帮助
/auth                      # 配置认证
/clear                     # 清除历史
/theme                     # 更改主题
/tools                     # 显示工具
/quit                      # 退出

🤝 贡献指南

我们欢迎社区贡献!请查看 CONTRIBUTING.md 了解详细信息。

报告问题

如果您发现bug或有功能建议,请在 GitHub Issues 中提交。

提交代码

  1. Fork 本仓库
  2. 创建功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m 'Add amazing feature')
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 创建 Pull Request

📄 许可证

本项目采用 Apache 2.0 许可证 - 查看 LICENSE 文件了解详情。

🙏 致谢

📞 联系我们

  • 项目主页: https://github.com/wuhrai/wuhr-ai
  • 问题反馈: https://github.com/wuhrai/wuhr-ai/issues
  • 邮箱: [email protected]

⭐ 如果这个项目对您有帮助,请给我们一个星标!

Made with ❤️ by WuhrAI Team