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

@metajoy/cli

v1.0.0

Published

A command line interface for metajoy

Downloads

4

Readme

Metajoy CLI 使用文档

概述

Metajoy CLI (mji) 是一个多功能命令行工具,当前实现了从 Google Play 或 Apple App Store 爬取应用信息,并生成官网详情页的功能。该工具设计为扩展性强的平台,未来将支持更多功能。

安装

npm install -g @metajoy/cli
# 或
yarn global add @metajoy/cli

基本使用

安装完成后,可以通过 mji 命令访问 Metajoy CLI:

mji <命令> [子命令] [选项]

主要功能

网站生成

mji www generate detail 命令用于从应用商店爬取应用信息并生成详情页面。

mji www generate detail [选项]

选项

  • --yes, -y - 使用默认值
  • --images, -i <path> - 图片目录
  • --details, -d <path> - 详情目录
  • --template, -t <name> - 输出模板
  • --listSymbols, -l <symbols> - 列表符号,多个用逗号分隔
  • --batch, -b - 批量生成

示例

# 使用默认配置生成详情页
mji www generate detail --yes

# 指定图片和详情目录
mji www generate detail -i ./images -d ./details

# 指定输出模板并使用自定义列表符号
mji www generate detail -t modern -l "•,◦,▪"

# 批量生成多个应用的详情页
mji www generate detail --batch

帮助信息

在任何命令级别,都可以使用 --help 参数来查看帮助信息:

# 查看顶级命令帮助
mji --help

# 查看 www 子命令帮助
mji www --help

# 查看 generate 子命令帮助
mji www generate --help

# 查看 detail 命令的具体用法和选项
mji www generate detail --help

配置文件

Metajoy CLI 使用 c12 库读取配置,支持多种配置文件格式:

支持的配置文件格式

  • JavaScript: metajoy.config.js, metajoy.config.js, metajoy.config.mjs, metajoy.config.cjs
  • TypeScript: metajoy.config.ts, metajoy.config.ts, metajoy.config.mts, metajoy.config.cts
  • JSON 相关: metajoy.config.json, metajoy.config.jsonc, metajoy.config.json5
  • YAML: metajoy.config.yaml, metajoy.config.yml
  • TOML: metajoy.config.toml

配置文件示例

TypeScript 格式 (metajoy.config.ts):

import { defineMetajoyConfig } from "@metajoy/cli";
export default defineMetajoyConfig({
  www: {
    generate: {
      detail: {
        dirs: {
          images: "xxxx",
          details: "xxxx",
        },
        template: "xxxx",
        filename(detail) {
          return detail.title;
        },
        //...
      },
      //...
    },
    //...
  },
  //...
});

YAML 格式 (.metajoy.yaml):

www:
  generate:
    detail:
      dirs:
        images: "xxxx"
        details: "xxxx"
      template: "xxxx"

有关更多详细信息和高级用法,请使用 --help 参数查看命令帮助。 有关更多配置文件参数,请查看 defineMetajoyConfig 的 ts 代码提示信息。