0.0.4 • Published 10 months ago

sparkflare v0.0.4

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

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

FlagVariableDescriptionUsed on
-y, --yesSPARKFLARE_SKIP_CONFIRMATIONIf present or true, indicates to skip all user confirmationsinit, deploy
-t, --tokenSPARKFLARE_CLOUDFLARE_TOKENIf present, prefer the specified token instead of the one in the configinit, deploy, environment:pull
-a, --account-identifierSPARKFLARE_CLOUDFLARE_ACCOUNT_IDENTIFIERIf present, prefer the specified account ID instead of the one in the configinit, deploy, environment:pull
-n, --project-nameSPARKFLARE_CLOUDFLARE_PROJECT_NAMEIf present, prefer the specified project name instead of the one in the configinit, deploy, environment:pull
-p, --package-managerSPARKFLARE_PACKAGE_MANAGERIf present, prefer the specified package manager instead of the one in the configinit, deploy

Subcommand

init

FlagVariableDescription
-f, --forceSPARKFLARE_FORCE_INITIf present, it will override the .config.vars file

deploy

FlagVariableDescription
-e, --environmentSPARKFLARE_ENVIRONMENTIf present, it will switch and deploy to the specified environment with this flag/env. Possible values: preview, production. Requires environment:pull

environment:switch

FlagVariableDescription
-e, --environmentSPARKFLARE_ENVIRONMENTIf present, prefer the specified environment instead of the one in the config. Possible values: local, preview, production
0.0.4

10 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago