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 🙏

© 2025 – Pkg Stats / Ryan Hefner

synthia-cli

v0.0.2

Published

Synthia Engine CLI工具 - 统一前端工程化命令行工具

Readme

Synthia CLI

统一前端工程化命令行工具

安装

# 仅项目内安装(推荐)
npm install -D synthia-cli

配置

Synthia CLI 提供了 defineConfig 函数用于定义项目配置:

// synthia.config.ts
import { defineConfig } from 'synthia-cli';

export default defineConfig({
  name: 'my-project',
  version: '1.0.0',
  // ... 其他配置
  plugins: [
    // 以包名形式声明插件,CLI 会自动加载
    'synthia-cache',
    'synthia-doctor',
  ],
});
// synthia.config.js
const { defineConfig } = require('synthia-cli');

module.exports = defineConfig({
  name: 'my-project',
  version: '1.0.0',
  // ... 其他配置
  plugins: ['synthia-cache', 'synthia-doctor'],
});

命令使用

初始化项目

synthia init

自动识别构建工具并初始化配置。

开发模式

synthia dev [options]

启动开发服务器,支持热更新。

当前版本未对外暴露命令行选项;后续版本将加入端口、host、打开浏览器等参数。

示例:

synthia dev

构建项目

synthia build [options]

构建生产版本。

选项:

  • -o, --out-dir <dir>: 输出目录 (默认: dist)
  • --mode <mode>: 构建模式 (development|production)
  • --analyze: 分析构建产物
  • --sourcemap: 生成 sourcemap
  • --minify: 压缩代码

示例:

synthia build --out-dir build --analyze

生产服务

synthia serve [options]

启动生产服务器。

选项:

  • -p, --port <port>: 端口号 (默认: 5000)
  • -h, --host <host>: 主机地址 (默认: localhost)
  • -d, --dir <dir>: 静态文件目录 (默认: dist)
  • -o, --open: 自动打开浏览器
  • --spa: SPA模式,所有路由返回index.html

示例:

synthia serve --port 8080 --spa

插件管理

synthia plugin [options]

管理插件。

选项:

  • --list: 列出已安装的插件
  • --install <name>: 安装插件
  • --uninstall <name>: 卸载插件
  • --update <name>: 更新插件
  • --status <name>: 检查插件状态
  • --version <version>: 指定插件版本

示例:

synthia plugin --list
synthia plugin --install synthia-cache
synthia plugin --install synthia-doctor

全局选项

  • -v, --verbose: 显示详细输出
  • --no-color: 禁用颜色输出

支持的构建工具

  • Vite
  • Webpack

环境要求

  • Node.js >= 16

许可证

MIT