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

@foxpage/foxpage-cli

v3.0.2

Published

foxpage cli

Downloads

129

Readme

@foxpage/foxpage-cli

a CLI tool for foxpage

🖥 Environment Support

Minimum node.js version typescript version yarn

⌨️ Usage

The root level command is foxpage:

# see version
foxpage -v

# get help
foxpage -h

# init foxpage config
foxpage --init

The CLI provides two main commands:

  • create: Create new projects or packages
  • build: Build resources for projects or packages

foxpage create

Create new projects or packages. Supports two targets:

  1. Create a project:
foxpage create project [options]

Options:
  --name <targetName>    target name
  --component           create component project
  --plugin             create plugin project
  --server             create server project
  --repo <repository>  project git repository
  --uri <uri>         custom template repository URI (e.g., https://github.com/user/custom-template)
  # or
  --zip-uri <zipUri>  custom template zip download URI (e.g., https://github.com/user/custom-template/archive/refs/heads/main.zip)

The default template repositories:

  1. Create a package:
foxpage create package [options]

Options:
  --name <targetName>         target name
  --templates <templateDir>   templates dir location
  --template <templateDir>    template dir location
  --format                   format code after create
  --out-dir <directory>      out dir for new created package (default: "packages")

Examples:

# Create a component project
foxpage create project --component --name my-component-project

# Create a component project with custom template (using repository URI)
foxpage create project --component --name my-component-project \
  --uri https://github.com/user/custom-template

# Create a component project with custom template (using zip download)
foxpage create project --component --name my-component-project \
  --zip-uri https://github.com/user/custom-template/archive/refs/heads/main.zip

# Create a plugin project
foxpage create project --plugin --name my-plugin-project

# Create a plugin project with custom template (using repository URI)
foxpage create project --plugin --name my-plugin-project \
  --uri https://github.com/user/custom-plugin-template

# Create a plugin project with custom template (using zip download)
foxpage create project --plugin --name my-plugin-project \
  --zip-uri https://github.com/user/custom-plugin-template/archive/refs/heads/main.zip

# Create a package
foxpage create package --name my-package --format

foxpage build

Build resources for projects or packages:

foxpage build [options]

Options:
  --foxpage                   Build for foxpage
  --foxpage-root             Build foxpage in root
  --umd                      Build umd
  --umd-root                 Build umd in root
  --cjs                      Build cjs
  --cjs-root                 Build cjs in root
  --lib                      Build lib(cjs) for npm
  --es-module                Build es(es-module) for npm
  --schema-md                Build schema.md to describe the api of component
  --clean                    Clean dist directory (default: true)
  --no-clean                Set --clean to false
  --output <o>              Output path
  --assets-hash             Build files in assets using the WebPack Contenthash parameter
  --debug                   Debug: some temp file or data will be retained
  --packages <pattern...>   Packages need to build (default: ["packages/*"])
  --root-cache             Cache <root>/dist directory for all package (default: true)
  --no-root-cache          Set --root-cache to false
  --npm-client <npmClient> Executable used to run scripts (npm, yarn, ...) (default: "npm")
  --max-concurrency <n>    Limit the max number of concurrently running processes
  --concurrency <n>        Number of concurrently pending subprocess
  --modes <modes>         Build modes (comma separated):
                          - foxpage: "production,debug,node,editor"
                          - umd: "umd_prod,umd_dev"
                          - cjs: "cjs_prod,cjs_dev"
  --ignore-modes <modes>  Ignore specific build modes (comma separated)
  --manifest              Generate manifest.json (used with --file-hash)
  --file-hash            Build all files using the WebPack Contenthash parameter
  --progress-plugin      Use webpack.ProgressPlugin when webpack build
  --analyze              Use webpack-bundle-analyzer (only for --umd, --cjs, --foxpage)
  --css-in-js           Use style loader to include style in js file (only for --foxpage --umd)
  --generate-foxpage-json Generate foxpage.json file (default: true)
  --no-generate-foxpage-json Disable generate foxpage.json file
  --zip-fox             Automatically compress build resources (only for --foxpage)
  --no-zip-fox          Disable zip-fox
  --zip-fox-output <o>  Output path for zip-fox
  --babel-options <o>   Custom babel cli options (only for --es/lib)
  --ts-declaration      Generate typescript declaration (*.d.ts) (only for --es/lib)
  --no-ts-declaration   Disable ts-declaration
  --css-style          Build style from index.(less/scss) to index.css (only for --es/lib)
  --remove-style-import Remove style import for all ".js" file (only for --es/lib)
  --import-index-css   Add "import './index.css'" in root index.js (only for --es/lib)
  --remove-console     Remove console in final result (default: true)
  --no-remove-console  Keep console

Build output directories:

  • /dist: Resources for Foxpage platform registration
  • /es: ES Module format resources for NPM
  • /lib: CommonJS format resources for NPM

Examples:

# Build a component with foxpage format
foxpage build --foxpage

# Build a component in root directory
foxpage build --foxpage-root

# Build a component with all formats and styles
foxpage build --foxpage --lib --es-module --css-style --ts-declaration

# Build with specific modes
foxpage build --foxpage --modes production,debug

# Build with custom concurrency
foxpage build --foxpage-root --concurrency 4 --max-concurrency 8