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

@aliyun-meoo/cli

v0.2.8

Published

Meoo 平台命令行工具 — 管理项目、云服务、边缘函数和部署

Readme

Meoo CLI

Meoo 平台命令行工具 — 管理项目、云服务、边缘函数和部署。

安装

npm install -g @aliyun-meoo/cli

# 验证
meoo --version

快速开始

# 1. 登录(在 Meoo 平台「设置 → API 密钥」中创建 Key)
meoo login --ak meoo_ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# 2. 初始化项目
mkdir my-app && cd my-app
meoo init react-design

# 3. 安装依赖并启动
pnpm install
pnpm dev

# 4. 创建远程项目并关联
meoo projects create "我的应用"

# 5. 开通云服务
meoo cloud enable

# 6. 操作数据库
meoo db query "CREATE TABLE users (id serial primary key, name text)"
meoo db tables

命令参考

全局选项

| 选项 | 说明 | |------|------| | --json | 以 JSON 格式输出(适用于脚本和 AI Agent) | | --version | 显示版本号 |

身份认证

meoo login --ak <key>          # AK 登录
meoo login --ak <key> --api-url https://api.meoo.com  # 指定 API 地址
meoo logout                    # 退出登录
meoo whoami                    # 当前用户信息

支持环境变量(CI/CD 场景):

export MEOO_API_KEY=meoo_ak_xxxxxxxx
export MEOO_API_URL=https://api.meoo.com  # 可选
meoo whoami

项目管理

meoo projects list             # 列出我的项目
meoo projects list --all       # 包含协作项目
meoo projects create [name]    # 创建项目并设为当前项目
meoo projects use <urlId>      # 切换当前项目
meoo projects current          # 显示当前项目

模板初始化

meoo init --list               # 列出可用模板
meoo init react-design         # 初始化模板到当前目录(自动生成 AGENTS.md)

可用模板: | 模板 | 说明 | |------|------| | react-project | React 18 + Webpack 5 + Tailwind CSS | | react-vite-project | React 18 + Vite 5 + Tailwind CSS | | react-design | React 19 + Vite 7 + shadcn/ui + TanStack Router | | vue-project | Vue 3 + Vite 5 + Pinia | | taro-project | Taro 4 + React,微信小程序 + H5 |

云服务

meoo cloud enable              # 开通云服务(PostgreSQL + Auth + Storage)
meoo cloud status              # 查询云服务状态

云数据库

meoo db query "SELECT * FROM users"      # 执行 SQL
meoo db query --file query.sql           # 从文件执行 SQL
meoo db tables                           # 列出表结构
meoo db tables --schema public,auth      # 指定 schema
meoo db migrate --name create_users --sql "CREATE TABLE ..."  # DDL 迁移

边缘函数

meoo fn list                             # 列出函数和环境变量
meoo fn deploy <name>                    # 部署(默认从 ./functions/<name>/ 读取)
meoo fn deploy <name> --dir ./my-fn/     # 指定代码目录
meoo fn deploy <name> --no-verify-jwt    # 允许匿名调用
meoo fn delete <name>                    # 删除函数

环境变量

meoo secrets list                        # 列出环境变量
meoo secrets set <KEY> <VALUE>           # 设置环境变量
meoo secrets delete <KEY>                # 删除环境变量

环境信息

meoo info                    # 显示运行约束和平台信息(供 AI Agent 参考)
meoo --json info             # JSON 格式(AI Agent 可解析)

项目约束

通过 meoo init 初始化的项目会自动生成 AGENTS.md,包含以下约束:

  • 开发服务器必须运行在 3015 端口(唯一对外端口)
  • 构建产物目录 dist/,入口 dist/index.html
  • 禁止启动后端服务器,使用 Meoo Cloud 替代
  • 包管理器使用 pnpm

开发路线图

✅ P0 — 已完成

  • [x] 用户级 API Key 系统(oneday-api Entity + Service + 中间件认证)
  • [x] 前端设置页 API 密钥管理 Tab(onedayAssets)
  • [x] CLI 骨架 + Commander.js 装饰器命令注册
  • [x] meoo login/logout/whoami
  • [x] 环境变量 MEOO_API_KEY / MEOO_API_URL 支持
  • [x] 无参数 meoo login 展示 ASCII 引导图
  • [x] 非 localhost 强制 HTTPS
  • [x] AK 签名 timingSafeEqual 防时序攻击
  • [x] AK 格式优化(meoo_ak_ + 不透明随机串)

✅ P1 — 已完成

  • [x] 全局配置系统(~/.meoo/config.json
  • [x] meoo projects list/create/use/current
  • [x] meoo cloud enable/status
  • [x] meoo db query/tables/migrate
  • [x] meoo fn list/deploy/delete
  • [x] meoo secrets list/set/delete
  • [x] meoo init 模板初始化(5 个内置模板 + 自动生成 AGENTS.md)
  • [x] meoo info 环境约束透出
  • [x] 所有命令支持 --json 输出和 --project <urlId> 覆盖
  • [x] 统一鉴权中间件重构(BaseAuthMiddleware.tryApiKeyAuth)

🔲 P1 补全 — 近期

  • [ ] meoo domains list/add/remove — 自定义域名管理
  • [ ] meoo open — 浏览器打开当前项目工作台
  • [ ] meoo projects delete — 删除项目
  • [ ] npm publish 配置和发布

🔲 P2 — 中期

  • [ ] meoo deploy — 发布应用(需设计本地构建→上传方案)
  • [ ] meoo releases list/rollback — 版本管理和回滚
  • [ ] meoo logs <fn-name> — 边缘函数日志
  • [ ] meoo link — 将本地目录关联到远程项目
  • [ ] 自动更新检查(update-notifier)

🔲 P3 — 远期

  • [ ] meoo ai "<prompt>" — AI 驱动操作(差异化核心功能)
  • [ ] meoo skills search/install — 技能市场集成
  • [ ] meoo projects members list/add/remove — 成员管理
  • [ ] 浏览器 OAuth 登录
  • [ ] 系统 keychain 存储 AK(macOS Keychain / Linux Secret Service)

🔲 安全加固 — 持续

  • [x] AK 签名 timingSafeEqual
  • [x] CLI 端 HTTPS 强制
  • [x] 凭证文件 0o600 权限
  • [x] AK 一次性展示(数据库仅存哈希)
  • [ ] AK 验证失败频率限制(Redis 计数)
  • [ ] CLI 云服务接口项目权限校验
  • [ ] AK 创建时可选绑定 IP 白名单

技术架构

  • CLI: TypeScript + Commander.js + 装饰器命令注册
  • 认证: meoo_ak_ + 不透明随机串,SHA-256 哈希存储
  • 云服务: 复用 oneday-api 现有 CloudProxy 中间件代理 /sb/* 路径
  • 模板: 内置 npm 包,离线可用

License

MIT