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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sparkflare

v0.0.4

Published

CLI to interact with Cloudflare and improve the DX for cloudflare pages

Downloads

89

Readme

Sparkflare CLI

Sparkflare CLI is a command-line interface for manage your Cloudflare Pages projects.

Installation

npm install -g sparkflare

Usage

Initialize

To initialize the CLI, run the following command:

sparkflare init

This command will ask you for your Cloudflare API token, the account ID, the project name, and which package manager you are using. You can also don't provide the values and set them later in the .config.vars file.

[!TIP] You can read the Cloudflare API documentation to learn how to get your API token and account ID.

Pull Environment Variables

To pull environment variables from Cloudflare Pages, run the following command:

sparkflare environment:pull

This will pull the environment variables from the selected environment and save them locally, after pulling the environment variables, you can use the sparkflare environment:switch command to select the environment you want to use.

Switch Environment

To switch between environments, run the following command:

sparkflare environment:switch

This will prompt you to select an environment from the list of environments you have set up.

Deploy

To deploy your project, run the following command:

sparkflare deploy

This command will build your project and deploy it to Cloudflare Pages.

Flags and Environment Variables

Global

| Flag | Variable | Description | Used on | | -------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------- | -------------------------------- | | -y, --yes | SPARKFLARE_SKIP_CONFIRMATION | If present or true, indicates to skip all user confirmations | init, deploy | | -t, --token | SPARKFLARE_CLOUDFLARE_TOKEN | If present, prefer the specified token instead of the one in the config | init, deploy, environment:pull | | -a, --account-identifier | SPARKFLARE_CLOUDFLARE_ACCOUNT_IDENTIFIER | If present, prefer the specified account ID instead of the one in the config | init, deploy, environment:pull | | -n, --project-name | SPARKFLARE_CLOUDFLARE_PROJECT_NAME | If present, prefer the specified project name instead of the one in the config | init, deploy, environment:pull | | -p, --package-manager | SPARKFLARE_PACKAGE_MANAGER | If present, prefer the specified package manager instead of the one in the config | init, deploy |

Subcommand

init

| Flag | Variable | Description | | ------------- | --------------------- | ---------------------------------------------------- | | -f, --force | SPARKFLARE_FORCE_INIT | If present, it will override the .config.vars file |

deploy

| Flag | Variable | Description | | ------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -e, --environment | SPARKFLARE_ENVIRONMENT | If present, it will switch and deploy to the specified environment with this flag/env. Possible values: preview, production. Requires environment:pull |

environment:switch

| Flag | Variable | Description | | ------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | -e, --environment | SPARKFLARE_ENVIRONMENT | If present, prefer the specified environment instead of the one in the config. Possible values: local, preview, production |