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

@postar/cli

v1.0.0

Published

一个前端项目脚手架工具,专注于团队开发效率提升和规范统一,让项目初始化更简单、更规范。

Downloads

10

Readme

Postar CLI

npm version license

一个企业级项目脚手架工具,支持前端、后端、移动端等多种项目类型,专注于团队开发效率提升和规范统一。

✨ 特性

  • 🚀 团队定制化 - 支持团队私有模板,可配置团队特定开发规范
  • 📦 灵活模板 - 支持多种模板源(内置、本地、远程仓库)
  • 🎯 简单易用 - 交互式配置,智能默认值,历史记录复用
  • 🔒 规范统一 - 统一项目结构和代码风格,降低维护成本
  • 🎨 最佳实践 - 集成团队积累的开发经验和解决方案
  • 🔄 扩展性强 - 支持多种技术栈,可根据需求进行定制

🎯 核心功能

  • 项目模板管理
  • 配置中心管理
  • 团队规范集成
  • 多平台仓库支持
  • 开发工具链集成
  • 团队协作支持

📦 安装

npm install @postar/cli -g
# 或者
pnpm install @postar/cli -g
# 或者
yarn global add @postar/cli

🚀 快速开始

创建项目

# 交互式创建项目
postar-cli create

# 指定模板创建项目
postar-cli create <name> [-t|--template]

(团队/个人)配置

以下gist只是参考,请输入自己团队/个人的gist/gist_id/snippet_id/api_url/access_token/token等信息。

# 远程配置github(-gh) gist
postar-cli config -gh 4eca301ad8c8e83679a5140bce923844

# 远程配置gitee(-ge) gist 需要传入gist_id 和 access_token 用逗号隔开
postar-cli config -ge m86xsqcbn1fjv3og7y9le77,15f4a89e94e601bfb3946139d39e41c7

# 远程配置gitlab(-gl) snippet 需要传入gitlab地址,snippet_id 和 token 用逗号隔开
postar-cli config -gl http://xxx.xxx.xxx.xxx:xxxx,2,xxxxxxxxxxx

# 远程配置自定义api(-api) 需要传入api地址,用逗号隔开
postar-cli config -api http://localhost:3000/api/templates,get,"{ 'Authorization': 'Bearer 1234567890' }"

# 本地配置(复制路径,或直接拖入)
postar-cli config -local xxx

# 切换到github(-gh) gist
postar-cli use -gh

# 切换到gitee(-ge) gist
postar-cli use -ge

# 切换到gitlab(-gl) snippet
postar-cli use -gl

# 切换到自定义api(-api)
postar-cli use -api

# 切换到本地配置(-local)
postar-cli use -local

配置管理

# 查看当前配置
postar-cli config --list
postar-cli config -l

# 清除配置
postar-cli config --clear
postar-cli config -c

# 设置配置
postar-cli config --set
postar-cli config -s
postar-cli config  # 默认是设置配置

# 强制重新配置
postar-cli config --set --force
postar-cli config -s -f

📝 模板源参考地址

1. GitHub Gist

{
  "type": "github",
  "url": "https://gist.github.com/zkr-1211/4eca301ad8c8e83679a5140bce923844"
}

2. Gitee Gist

{
  "type": "gitee",
  "url": "https://gitee.com/zhangkerong/codes/m86xsqcbn1fjv3og7y9le77"
}

3. GitLab Snippet

{
  "type": "gitlab",
  "url": "http://xxx.xxx.xxx.xxx:xxxx/snippets/2#notes"
}

4. 自定义 API

需要返回符合配置规范的 JSON 文件

💡 为什么选择 Postar CLI?

与市面上开源脚手架的显著不同

1. 团队定制化配置

Postar CLI:支持团队私有配置源,灵活适配团队需求

  • 支持多种配置源(GitHub Gist、Gitee Gist、GitLab Snippet、自定义 API)
  • 团队可以维护自己的模板库和开发规范

传统脚手架:固定模板,选择有限

  • create-react-app:固定的 React 模板
  • vue-cli:预设的 Vue 模板选项
  • vite:有限的模板选择

2. 多平台模板源支持

Postar CLI

  • ✅ GitHub Gist
  • ✅ Gitee Gist
  • ✅ GitLab Snippet
  • ✅ 自定义 API
  • ✅ 本地配置

传统脚手架

  • ❌ 通常只支持单一平台(如 GitHub)
  • ❌ 模板源固定,无法自定义

3. 配置历史和切换

Postar CLI

# 支持多配置源快速切换
postar-cli use -gh    # 切换到 GitHub
postar-cli use -ge    # 切换到 Gitee
postar-cli use -gl    # 切换到 GitLab

传统脚手架

  • ❌ 配置相对固定
  • ❌ 缺少配置管理功能

4. 中文本土化

Postar CLI

  • ✅ 完全中文界面和文档
  • ✅ 支持 Gitee 等国内平台
  • ✅ 符合国内开发习惯

传统脚手架

  • ❌ 主要面向国际用户
  • ❌ 英文为主,中文支持有限

5. 企业级团队管理

Postar CLI:专门为团队协作设计

  • ✅ 团队模板分组管理
  • ✅ 支持团队开发规范统一
  • ✅ 历史配置记录和复用

传统脚手架

  • ❌ 主要面向个人开发者
  • ❌ 团队功能相对薄弱

6. 轻量级和灵活性

Postar CLI

  • ✅ 专注于模板管理和配置
  • ✅ 不绑定特定技术栈
  • ✅ 可以管理任意类型的项目模板

传统脚手架

  • ❌ 通常与特定框架绑定
  • ❌ 功能相对重量级

核心差异对比

| 特性 | Postar CLI | 传统开源脚手架 | |------|-----------|---------------| | 定位 | 团队定制化工具 | 通用开发工具 | | 模板源 | 多平台、可配置 | 固定、有限 | | 本土化 | 深度中文化 | 国际化为主 | | 团队功能 | 专门设计 | 相对薄弱 | | 灵活性 | 高度可配置 | 相对固定 | | 配置管理 | 支持切换和历史 | 基本不支持 |

提升开发效率

  • 自动化项目结构生成
  • 预配置开发工具链
  • 集成团队最佳实践
  • 提供组件和页面模板

规范团队协作

  • 统一项目结构
  • 统一代码风格
  • 统一技术选型
  • 降低维护成本

优化开发体验

  • 清晰的命令行界面
  • 友好的错误提示
  • 详细的操作日志
  • 灵活的配置管理

总结:Postar CLI 更像是一个团队级的模板管理平台,而不是传统意义上的项目生成器。

⚠️ 注意事项

  • 确保已安装 Node.js (>= 16.0.0)
  • 模板配置需要符合规范要求
  • 自定义 API 需要返回标准格式的 JSON