0.0.78 • Published 1 month ago

@bedframe/cli v0.0.78

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@bedframe/cli

Bedframe - Make, Version & Publish cross-browser extensions continously with ease bedframe-cli

The Bedframe Command Line Interface (CLI) lets you make and manage your BED directly from the terminal.

Installation

#  with pnpm
pnpm add @bedframe/cli -g

# with npm
npm install @bedframe/cli -g

# with yarn
yarn add @bedframe/cli -g

After installation, you will have access to the bedframe executable in your command line. You can verify that it is properly installed by simply running bedframe, which should present you with an intro and help message.

>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli [options] [command]

Bedframe CLI - your Browser Extension Development framework (dev utility)

Options:
  -V, --version                output the version number
  -h, --help                   display help for command

Commands:
  make [options] [name]        make your B E D
  version [options]            create or update git release of current version
                               (changeset version)
  publish [options]            • publish new or update existing extension(s)
                               ├ • C W S: Chrome Web Store
                               ├ • A M O: Mozilla/Firefox Add-ons
                               └ • M E A: MS Edge Add-ons
  dev [browsers]               start Vite dev server for one or more browsers
                               concurrently
  build [browsers]             generate prod builds for 1 or more browsers concurrently
  codemod [options] <browser>  perform after-build manifest and features code mods (🍝)
                               by browser
  zip [options] [browsers]     zip browser dist directories
  help [command]               display help for command

You can check you have the right version with this command:

bedframe --version

Making your BED

To create a new bedframe project, run:

bedframe make

Then follow the prompts!

You can specify the project name as the first argument of the make command. Using . for the project name will scaffold the project in the current directory.

# scaffold project called `chrome-extension`
bedframe make chrome-extension

# scaffold project in the current directory
bedframe make .

You will then be prompted to configure your BED, picking Framework, Language, Browser to target, etc. All configurations can be manually edited once you generate the project.

Commands

M A K E

The Bedframe make command walks you through creating a Vite-powered, prod-ready Browser Extension Environment: one codebase continously deployed to version control and automatically published to all browser stores (currently Chrome, Firefox, and Edge).

You end up with a familiar Vite-powered project you're used to.

Run the make command to launch the project gen prompts.

Alternatively: this command is also available as the standalone create-bedframe package.

>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli make [options] [name]

make your B E D

Arguments:
  name                                   project name

Options:
  -b, --browsers <browsers>              specify comma-separated list browsers (chrome, edge,
                                         firefox)
  -v, --version <version>                specify project version (0.0.1)
  -d, --description <description>        specify project description
  -a, --author <author>                  specify project author  (name, email, url)
  --license <license>                    specify project license (MIT)
  -p, --private                          specify visibility of project (true)
  -t, --type <type>                      specify extension type (popup)
  --position <position>                  specify overlay extension position (center)
  --override <override>                  specify page to override (newtab)
  --options <options>                    specify whether to and how render options (embedded)
  -p, --packageManager <packageManager>  Specify package manager to use (pnpm)
  -f, --framework <framework>        specify framework to use (react)
  -l, --language <language>              specify language to use (typescript)
  -s, --style <style>                    specify CSS framework to use (tailwind)
  -o, --lintFormat                       add linting with formatting (true)
  -t, --tests                            add tests (vitest + testing library) (true)
  -g, --git                              initialize git for source control (true)
  -h, --gitHooks                         add git hooks (true)
  -c, --commitLint                       add commit linting (true)
  -x, --changesets                       add changesets (true)
  -i, --installDeps                      add & install dependencies (true)
  -y, --yes                              make your BED w/ preconfigured defaults (false)
  --help                                 display help for command

Args

Flags / Options

You can optionally by-pass the prompts if you pass in the requisite flags to the make command.

As an example, to scaffold a multi-extension project i.e. BED environment targeting Chrome, Brave, Opera and Edge browsers you can run:

$ bedframe make multi-extension-project \
  --browsers 'chrome, firefox, safari, brave, opera, edge' \
  --version '0.0.0'  \
  --description 'this is my BED! there are many like it, but this one is... MINE!!!'  \
  --author 'joe, joe@bedframe.dev, https://bedframe.dev'  \
  --license MIT  \
  --private  \
  --type overlay  \
  --override newtab  \
  --options embedded  \
  --packageManager bun \
  --framework react \
  --language typescript \
  --style tailwind \
  --lintFormat \
  --tests \
  --git \
  --gitHooks \
  --commitLint \
  --changesets \
  --installDeps

If any required configuration isn't passed in via flags the CLI will prompt you for the missing requirements.

Options

Flag (short)Flag (long)TypeDescriptionDefault
-v--versionstringSpecify project version0.0.1
-b--browsersBrowser[]Specify comma-separated list of target browserschrome
-p--packageManager PackageManagerSpecify package manager to useyarn
-f--frameworkFrameworkSpecify framework to usereact
-l--languageLanguageSpecify language to usetypescript
-s--styleStyleSpecify CSS solution to usetailwind
-o--lintFormatbooleanConfigure linting with formattingtrue
-g--gitbooleanInitialize git source controltrue
-h--gitHooksbooleanAdd git hooks (Husky + lint staged)true
-t--testsbooleanAdd tests (Vitest + Testing Library + jsdom)true
-c--commitLintbooleanAdd commit lintingtrue
-x--changesetsbooleanAdd changesetstrue
-i--installDepsbooleanAdd & install dependenciestrue
-y--yesbooleanSet up Bedframe w/ preconfigured defaultsfalse
--helpdisplay help for command

V E R S I O N

create or update git release of current version

>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli version [options]

create or update git release of current version (changeset version)

Options:
  --ignore <package>  skip a package from being published
  --snapshot          create a snapshot release for testing
  -h, --help          display help for command

P U B L I S H

publish new or update existing extension(s)

>_

B R O W S E R
E X T E N S I O N
D E V E L O P M E N T
F R A M E W O R K

Usage: @bedframe/cli publish [options]

• publish new or update existing extension(s)
├ • C W S: Chrome Web Store
├ • A M O: Mozilla/Firefox Add-ons
└ • M E A: MS Edge Add-ons

Options:
-b, --browsers <browsers...> specify browsers to publish (chrome,firefox,edge)
-h, --help display help for command

D E V

start vite dev server for 1 or more browsers. alias for vite dev w/ --mode <browser>

B U I L D

generate prod builds for 1 or more browsers alias for vite build w/ --mode <browser>

C O D E M O D

perform after-build manifest and features code mods

>_

B R O W S E R
E X T E N S I O N
D E V E L O P M E N T
F R A M E W O R K

Usage: @bedframe/cli codemod [options] <browser>

perform after-build manifest and features code mods (🍝) by browser

Arguments:
browser browser name

Options:
--manifest perform manifest.json codemods (default: true)
--features perform in-code features codemods (default: true)
-h, --help display help for command

Z I P

create zip archive(s) for 1 or more browsers

>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli zip [options] [browsers]

zip browser dist directories

Arguments:
  browsers                 list of browser names

Options:
  -d, --distDir <distDir>  current dist dir to create archive from (e.g. -d
                           ./dist/<browser>)
  -n, --name <name>        what to name the zip file (including .zip)
  -h, --help               display help for command
0.0.78

1 month ago

0.0.77

2 months ago

0.0.74

2 months ago

0.0.75

2 months ago

0.0.76

2 months ago

0.0.73

4 months ago

0.0.40

9 months ago

0.0.41

9 months ago

0.0.42

9 months ago

0.0.43

9 months ago

0.0.44

9 months ago

0.0.46

9 months ago

0.0.47

9 months ago

0.0.37

9 months ago

0.0.38

9 months ago

0.0.39

9 months ago

0.0.30

10 months ago

0.0.31

10 months ago

0.0.32

10 months ago

0.0.33

10 months ago

0.0.34

10 months ago

0.0.35

9 months ago

0.0.36

9 months ago

0.0.70

8 months ago

0.0.71

8 months ago

0.0.72

7 months ago

0.0.26

10 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.62

8 months ago

0.0.63

8 months ago

0.0.64

8 months ago

0.0.65

8 months ago

0.0.66

8 months ago

0.0.67

8 months ago

0.0.68

8 months ago

0.0.69

8 months ago

0.0.25

10 months ago

0.0.60

8 months ago

0.0.61

8 months ago

0.0.59

8 months ago

0.0.51

9 months ago

0.0.52

9 months ago

0.0.53

9 months ago

0.0.54

8 months ago

0.0.55

8 months ago

0.0.56

8 months ago

0.0.57

8 months ago

0.0.58

8 months ago

0.0.50

9 months ago

0.0.48

9 months ago

0.0.49

9 months ago

0.0.20

11 months ago

0.0.21

11 months ago

0.0.10

11 months ago

0.0.22

11 months ago

0.0.11

11 months ago

0.0.23

11 months ago

0.0.12

11 months ago

0.0.24

11 months ago

0.0.13

11 months ago

0.0.14

11 months ago

0.0.15

11 months ago

0.0.9

11 months ago

0.0.16

11 months ago

0.0.19

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago