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

edgeone

v1.4.2

Published

Command-line interface for TencentCloud Pages Functions

Readme

Overview

EdgeOne Pages is a front-end development and deployment platform built on Tencent EdgeOne infrastructure, designed for modern web development. It enables developers to quickly build and deploy static sites and serverless applications. By integrating edge function capabilities, it ensures efficient content delivery and dynamic functionality expansion, supporting fast access for users worldwide.

EdgeOne CLI can help you manage and debug Pages Functions in the project more efficiently.

1. Preparations

If you are a China site user, please go to the corresponding Pages console.

2. Quick Start

1. Install

In the cloned project during the preparation stage, you can use npm to install the CLI:

npm install -g edgeone

Use the edgeone -v command to check if the installation is successful. Use the edgeone -h command to view all relevant commands.

2. Log in

Execute the login command, follow the prompts to select Global (International) or China, then complete the login in the pop-up browser window.

edgeone login

After completing the login, you can use the edgeone whoami command to view the current login account information.

3. Initialize

After successful login, execute the initialization command to initialize the basic environment required by Edgeone Pages in the project:

edgeone pages init

After initialization, an edge-functions or cloud-functions folder and sample functions will be generated in the root directory of the project. You can continue to add and develop functions in this folder.

4. Local Development

After completing initialization, enter the local development stage:

edgeone pages dev

The run command by default creates a service locally on port 8088. Both the Pages Function service and the Pages project service run on the same port, with no need for additional proxying.

You can access the front-end page via http://localhost:8088/. In the front-end project, use the Fetch API directly, where the access path is the path of function files in folder edge-functions or cloud-functions.

// ./cloud-functions/api/my-functions.js
fetch('/api/my-functions', {
  method: 'POST',
  body: JSON.stringify({ data: 'example' }),
});

Note:

  • The dev service will read devCommand from edgeone.json to start your dev server. If absent, it will read the dev script from your project's package.json.
  • Edge Functions debug service has a limit on the number of times it can start up, so try to avoid frequently logging out and starting the dev service (hot updates within the dev service will not increase the startup count).

5. Associated Project

If you need to use the Key-Value Storage capability or synchronize the environment variables set in the console to local debugging, you can execute the Associated Project commands, enter the project name as required. The project name here is the one created in the Preparation Work of the Pages project.

edgeone pages link

If you need to link a project that does not exist, you can also create a new project directly under the CLI guide.

6. Deploy

Build locally and deploy to EdgeOne Pages. If you need to link an existing project, it must be of the direct upload type.

edgeone pages deploy [<directoryOrZip>] [-n <projectName>] [-e <env>]

Parameters

  • <directoryOrZip>: Path of folder or ZIP package to deploy
  • -n, --name: Project name for deployment (creates new or updates existing project)
  • -e, --env: Environment to deploy to, choices: 'production' or 'preview' (default: 'production')

Note:

  • When you execute the deploy command, the CLI will automatically build and deploy your project.
  • If you build manually, you need to place the Pages Functions related folders and package.json into the output directory (such as dist), and then run edgeone pages deploy ./dist.

Usage Examples

# Deploy build folder to production
edgeone pages deploy

# Deploy ZIP package to preview environment
edgeone pages deploy -e preview

Alternative: Git-based Deployment

You can also push the project code to the Git remote to trigger the CI build and deployment in the Pages backend, completing the entire development process.

7. Switching Accounts

If you need to switch to another Tencent Cloud account, you can execute the following command and then log in again:

edgeone switch

3. CI/CD Integration

This section provides guidance on integrating EdgeOne CLI into your CI/CD pipelines for automated deployments.

Automated Deploy Command

For CI/CD pipelines, you can use the same deploy command with an API Token for authentication:

edgeone pages deploy [<directoryOrZip>] -n <projectName> -t <token> [-e <env>]

Parameters

  • <directoryOrZip>: Path of folder or ZIP package to deploy
  • -n, --name: Project name for deployment (creates new or updates existing project) (required)
  • -e, --env: Environment to deploy to, choices: 'production' or 'preview' (default: 'production')
  • -t, --token: API Token for CI/CD pipelines (required for automated deployments)

Note:

  • By default, when executing deploy, the CLI automatically builds and packages frontend code, cloud-functions (or node-functions for legacy projects), and edge-functions into the .edgeone folder and deploy to Pages.
  • If you choose to build the project manually, you need to manually copy the Pages Functions related folder and package.json to dist (suppose the output directory is dist), then rerun edgeone pages deploy ./dist.

CI/CD Pipeline Examples

# Basic CI deployment to production with API token
edgeone pages deploy -n edgeone-pages-project -t $EDGEONE_API_TOKEN

# CI deployment to preview environment with API token
edgeone pages deploy -n edgeone-pages-project -e preview -t $EDGEONE_API_TOKEN

Obtaining an API Token

How to create an API Token

  1. Access the Pages console and switch to the "API Token" Tab.
  2. Click "Create API Token".
  3. Enter "Token description" to help you remember the purpose of the API Token.
  4. Select "expiration time" to ensure your information security.
  5. Click Submit.

For more information, please refer to https://pages.edgeone.ai/document/api-token

4. Environment Vars Management

// List all environment variables configured in the console
edgeone pages env ls


// Pull environment variables from the console to a local file
edgeone pages env pull
// Specify a local file when pulling environment variables
edgeone pages env pull -f .env.prod


// Add a new environment variable
edgeone pages env add ENV_VAR_KEY env_var_value


// Delete an environment variable
edgeone pages env rm ENV_VAR_KEY

References

Pages IntroductionPages Functions

To access the China site documentation, please click here.

Contact

If you need technical support, please contact us.