5.0.4 • Published 2 months ago

@gofynd/fdk-cli v5.0.4

Weekly downloads
372
License
MIT
Repository
github
Last release
2 months ago

Fynd Development Kit

NPM Version NPM Downloads Coverage Status

Fynd development Kit (FDK CLI) is a cli tool developed by Fynd to create and update themes, extensions and various other components of the Fynd Platform.

Quick Links

| Fynd Platform | Fynd Partners | Documentation | Other Projects | Contributing |

Prerequisites

  • Git
  • Nodejs
  • Optional Prerequisites - Maven (To use fdk extension init for java extension initialization) - pip (To use fdk extension init for python extension initialization)

Note: Experimental support for Windows is available, but please be aware that it may not be fully stable.

Installation

npm install -g @gofynd/fdk-cli

Basic Commands

To help you get started, there are some basic commands you can use.

fdk --help

To see the available theme commands, enter:

fdk theme

To see the available extension commands, enter:

fdk extension

See the Command overview for a listing of all available commands, or the Command reference for syntax details and usage examples of the commands.

Debug Mode

Add the --verbose flag to the command you want to run in debug mode.

This will create debug.log file at the current working directory. In case you encounter any issues, this log file can be shared with maintainers for effective issue resolution.

Example

fdk login --verbose

Commands Overview

All FDK CLI commands start with fdk. The general syntax for the commands is as follows:

fdk [module] [method] [options]

This command can be broken down as follows:

SyntaxExample
moduletheme
methodinit
options--verbose

Commands


Environment Commands

CommandDescription
env getShows current environment
env setSet active environment to the value provided by the user. Default environment: fynd

Authentication Commands

CommandDescription
loginLogin user
userShows user details of logged in user
logoutLogout user

Theme Commands

CommandDescription
newCreate new theme
initInitialize an existing theme
contextAdd context of a theme
context-listList all available contexts
active-contextshow currently active context
serveStart theme serving on 127.0.0.1
syncSync theme to application
pullPull latest theme code
pull-configPull latest theme config
openpreview theme
packageCreate a zip file of theme

Extension Commands

CommandDescription
initInitialize extension
setupsetup development environment
preview-urlGet extension preview url
launch-urlGet/set lanuch url

Partner Commands

CommandDescription
connectAdd partner access token

Commands Reference


Environment Commands

Before you start using FDK CLI you will have to set an environment

env set

This command sets the active environment to the value provided by the user.

Syntax

fdk env set [options]

Example

fdk env set -u api.fynd.com

Command Options

OptionDescriptionRequired
--url, -uPlatform API domainYes
--helpShow helpNo
--verbose, -venable debug modeNo

env get

This command displays the active environment set by the user. Default environment: api.fynd.com

Syntax

fdk env get

Authentication Commands

After setting the environment the user has to login to the cli.

login

This command allows user to login via partner panel.

Syntax

fdk login

Command Options

OptionDescription
--helpShow help
--verbose, -venable debug mode

Example

fdk login

user

This command show user details of the currently logged in user.

Syntax

fdk user

logout

This command will logout the user.

Syntax

fdk logout

Theme Commands

A theme is a VueJS project that developers can scaffold using this cli tool. Themes change the look and feel of websites built using Fynd Platform. Always create a new directory while creating or initializing a theme.

new

This command is used to create a new theme for your application

Syntax

fdk theme new [options]

Command Options

OptionDescriptionRequired
--name, -nTheme nameYes
--helpShow helpNo
--verbose, -venable debug modeNo

Example

fdk theme new -n [your-theme-name] 

init

This command is used to initialize an exisiting theme on your local system.

Syntax

fdk theme init [options]

Command Options

OptionDescription
--helpShow help
--verbose, -venable debug mode

Example

fdk theme init

context

Context is a JSON object which holds the configurations related the the application and theme. When you initialize or create a new theme a context is created with the name provided in the commands and assigned as the active context. You can add multiple contexts if you want to use the same theme on multiple applications or envoirnments. This command is used to add a new context.

Syntax

fdk theme context [options]

Command Options

OptionDescriptionRequired
--name, -nContext nameYes
--helpShow helpNo
--verbose, -venable debug modeNo

Example

fdk theme context -n [context-name] 

context-list

This command is used to get a list of available context. You can also set active context by selecting one of the options in the list

Syntax

fdk theme context-list

active-context

This command is used to get currently active context.

Syntax

fdk theme active-context

serve

This command is used to run a theme on your local system.

Syntax

fdk theme serve [options]

Command Options

OptionDescription
--ssrEnable/disable Server-side rendering
--portPass custom port number to serve theme. Default: 5001
--helpShow help
--verbose, -venable debug mode

By default Server-side rendering is enable. To disable it use --ssr false with the serve command

Example

fdk theme serve
fdk theme serve --port 5002

sync

This command is used to sync your theme to the application.

Syntax

fdk theme sync

Always verify if you have set the correct context before syncing your theme. Refer context commands.


pull

This command is used to pull latest theme code.

Syntax

fdk theme pull

pull-config

This command is used to pull latest theme config.

Syntax

fdk theme pull-config

package

This command is used to create a zip file of theme.

Syntax

fdk theme package

open

This command is used to preview the theme on browser.

Syntax

fdk theme open 

Extension Commands

Extensions are pluggable snippets of code that can be installed in your applications so improve the feature set of your application. To know more visit - Fynd Partners

Set the active environment before running extension commands

fdk env set -u api.fynd.com

init

This command is used to create a extension's initial code with required dependency. It will also register extension for you on your partner account.

**Syntax**

fdk extension init [options]

Command Options

OptionDescription
--target-dirTarget Directory
--helpShow help
--verboseenable debug mode

Example

fdk extension init --target-dir [your-directory]

setup

This command is used to setup extension's development environment in local machine with required dependencies created on Fynd Partners panel.

**Syntax**

fdk extension setup [options]

Command Options

OptionDescription
--target-dirTarget Directory
--helpShow help
--verboseenable debug mode

Example

fdk extension setup --target-dir [your-directory]

preview-url

This command will return the preview URL, which the user can use to launch or install the extension.

**Syntax**

fdk extension preview-url [options]

Command Options

OptionDescription
-p, --portPort on which Extension is running
--company-idspecify company id
--update-authtokenupdate Ngrok authtoken
--api-keyExtension API key
--helpShow help
--verboseenable debug mode

Example

fdk extension preview-url --port 3000
fdk extension preview-url -p 3000 --update-authtoken
fdk extension preview-url -p 3000 --company-id 999 --update-authtoken

launch-url

This command is used to get or set the launch url of your extension

Syntax

fdk extension launch-url get/set [options]

Command Options

OptionDescription
--urlURL to be set
--api-keyExtension ID
--helpShow help
--verboseenable debug mode

Set Launch URL Example

fdk extension launch-url set --url [url] --api-key [Extension API Key]

Get Launch URL Example

fdk extension launch-url get --api-key [Extension API Key]

Partner Commands

connect

This command is used to add your partner access token to update extension details on partners panel.

Syntax

fdk partner connect [options]

Command Options

OptionDescription
--helpShow help
--verbose, -venable debug mode

Example

fdk partner connect

Other Fynd projects

ProjectLink
Nitrozen VueKnow more
Javascript SDKsnapshot
Extension SDKsnapshot
Extension Bridgesnapshot

Contributing

Checkout CONTRIBUTING.md for more information on how to get started contributing to this repository.


5.0.4

2 months ago

5.0.3

2 months ago

5.0.2

2 months ago

5.0.1

3 months ago

5.0.1-beta.3

3 months ago

5.0.1-alpha.1

3 months ago

5.0.0

3 months ago

5.0.1-alpha.2

3 months ago

5.0.0-alpha.3

3 months ago

4.0.8

3 months ago

4.0.7

3 months ago

5.0.0-alpha.2

4 months ago

5.0.0-alpha.1

4 months ago

4.0.6

4 months ago

4.0.5-alpha.2

4 months ago

4.0.5-alpha.3

4 months ago

4.0.5-alpha.1

4 months ago

4.0.1-alpha.20

4 months ago

4.0.1-alpha.19

5 months ago

3.0.4-alpha.1

9 months ago

3.0.4-alpha.9

8 months ago

3.0.4-alpha.7

8 months ago

3.0.4-alpha.6

8 months ago

3.0.4-alpha.5

8 months ago

3.0.4-alpha.4

9 months ago

3.0.4-alpha.3

9 months ago

3.0.4-alpha.2

9 months ago

4.0.0-alpha.2

7 months ago

4.0.4

5 months ago

4.0.1

6 months ago

4.0.0

8 months ago

4.0.3

5 months ago

4.0.2

6 months ago

3.0.2-alpha.28

9 months ago

3.0.2-alpha.29

9 months ago

3.0.2-alpha.27

10 months ago

3.0.2-alpha.33

9 months ago

3.0.2-alpha.31

9 months ago

3.0.2-alpha.32

9 months ago

3.0.2-alpha.30

9 months ago

3.0.4

8 months ago

3.0.3

9 months ago

3.0.5

6 months ago

4.0.1-alpha.10

6 months ago

4.0.1-alpha.13

6 months ago

4.0.1-alpha.11

6 months ago

4.0.1-alpha.12

6 months ago

4.0.1-alpha.15

6 months ago

4.0.1-alpha.16

6 months ago

4.0.1-alpha.6

7 months ago

4.0.1-alpha.4

7 months ago

4.0.1-alpha.5

7 months ago

4.0.1-alpha.8

6 months ago

4.0.1-alpha.9

6 months ago

4.0.1-alpha.2

7 months ago

4.0.1-alpha.3

7 months ago

4.0.1-alpha.1

7 months ago

4.0.0-beta.2

7 months ago

4.0.0-beta.1

8 months ago

4.0.4-alpha.1

5 months ago

4.0.4-alpha.2

5 months ago

4.0.4-alpha.3

5 months ago

3.0.3-alpha.2

10 months ago

3.0.3-alpha.3

9 months ago

3.0.3-alpha.4

9 months ago

3.0.4-alpha.11

6 months ago

3.0.4-alpha.10

6 months ago

4.1.0

8 months ago

3.0.3-alpha.1

10 months ago

3.0.2-alpha.19

11 months ago

3.0.2-alpha.24

10 months ago

3.0.2-alpha.25

10 months ago

3.0.2-alpha.22

11 months ago

3.0.2-alpha.23

11 months ago

3.0.2-alpha.20

11 months ago

3.0.2-alpha.21

11 months ago

3.0.2-alpha.26

10 months ago

3.0.2

10 months ago

3.0.2-alpha.13

11 months ago

3.0.2-alpha.11

12 months ago

3.0.2-alpha.12

12 months ago

3.0.2-alpha.10

12 months ago

3.0.2-alpha.17

11 months ago

3.0.2-alpha.18

11 months ago

3.0.2-alpha.15

11 months ago

3.0.2-alpha.16

11 months ago

3.0.1-alpha.6

12 months ago

3.0.1-alpha.2

12 months ago

3.0.1-alpha.3

12 months ago

3.0.1-alpha.14

11 months ago

3.0.1-alpha.15

11 months ago

3.0.2-alpha.4

12 months ago

3.0.2-alpha.5

12 months ago

3.0.2-alpha.7

12 months ago

3.0.2-alpha.8

12 months ago

3.0.2-alpha.9

12 months ago

3.0.2-alpha.1

12 months ago

3.0.2-alpha.2

12 months ago

3.0.2-alpha.3

12 months ago

2.4.16

1 year ago

2.4.15

1 year ago

2.5.0-alpha.1

1 year ago

2.4.15-alpha.2

1 year ago

2.5.0-alpha.3

1 year ago

2.5.0-alpha.2

1 year ago

2.5.0-alpha.4

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.4.16-alpha.3

1 year ago

2.4.16-alpha.2

1 year ago

3.0.1-alpha.1

1 year ago

2.4.14-alpha.2

1 year ago

2.4.15-alpha.1

1 year ago

2.4.14-alpha.3

1 year ago

2.4.14-alpha.4

1 year ago

2.4.14-alpha.1

1 year ago

2.4.14

1 year ago

2.4.13

1 year ago

2.4.12

1 year ago

2.4.11

1 year ago

2.4.10-alpha.5

1 year ago

2.4.11-alpha.1

1 year ago

2.4.9-alpha.2

1 year ago

2.4.10

1 year ago

2.4.9

1 year ago

2.4.10-alpha.3

1 year ago

2.4.10-alpha.1

1 year ago

2.4.10-alpha.4

1 year ago

2.4.8-alpha.7

1 year ago

2.4.8-alpha.5

1 year ago

2.4.8-alpha.6

1 year ago

2.4.8-alpha.4

1 year ago

2.4.0

1 year ago

2.4.3

1 year ago

2.4.2

1 year ago

2.4.5

1 year ago

2.4.4

1 year ago

2.4.9-alpha.1

1 year ago

2.4.1-alpha.1

1 year ago

2.4.1-alpha.2

1 year ago

2.4.7

1 year ago

2.4.6

1 year ago

2.4.4-alpha.1

1 year ago

2.4.8

1 year ago

2.4.4-alpha.2

1 year ago

2.4.8-alpha.1

1 year ago

2.4.8-alpha.2

1 year ago

2.4.8-alpha.3

1 year ago

2.4.0-alpha.2

1 year ago

2.4.0-alpha.1

1 year ago

2.4.6-alpha.5

1 year ago

2.3.14

2 years ago

2.4.6-alpha.4

1 year ago

2.4.6-alpha.3

1 year ago

2.4.6-alpha.2

1 year ago

2.4.6-alpha.1

1 year ago

2.3.13-alpha.2

2 years ago

2.3.13-alpha.3

2 years ago

2.3.13-alpha.1

2 years ago

2.3.14-alpha.1

2 years ago

2.3.13

2 years ago

2.3.14-alpha.2

2 years ago

2.3.4-alpha.5

2 years ago

2.3.9-alpha.1

2 years ago

2.3.9-alpha.2

2 years ago

2.3.6

2 years ago

2.3.10-alpha.1

2 years ago

2.3.10-alpha.2

2 years ago

2.3.8

2 years ago

2.3.7

2 years ago

2.3.9

2 years ago

2.3.7-beta.7

2 years ago

2.3.7-beta.5

2 years ago

2.3.7-beta.6

2 years ago

2.3.7-beta.3

2 years ago

2.3.7-beta.4

2 years ago

2.3.7-beta.1

2 years ago

2.3.7-beta.2

2 years ago

2.3.8-beta.3

2 years ago

2.3.12-alpha.1

2 years ago

2.3.8-beta.4

2 years ago

2.3.8-alpha.7

2 years ago

2.3.8-alpha.6

2 years ago

2.3.8-alpha.4

2 years ago

2.3.8-alpha.2

2 years ago

2.3.8-alpha.1

2 years ago

2.3.6-beta.3

2 years ago

2.3.6-beta.2

2 years ago

2.3.6-beta.0

2 years ago

2.3.11-alpha.1

2 years ago

2.3.8-beta.1

2 years ago

2.3.12

2 years ago

2.3.11

2 years ago

2.3.10

2 years ago

2.3.6-beta.1

2 years ago

2.2.7-beta.1

2 years ago

2.2.7-beta.2

2 years ago

2.2.7-beta.3

2 years ago

2.3.0

2 years ago

2.3.2

2 years ago

2.3.1

2 years ago

2.3.4

2 years ago

2.3.3

2 years ago

2.3.5

2 years ago

2.3.2-beta.1

2 years ago

2.3.2-beta.2

2 years ago

2.3.2-beta.3

2 years ago

2.2.10

2 years ago

2.3.2-beta.4

2 years ago

2.3.2-beta.5

2 years ago

2.3.2-beta.6

2 years ago

2.3.2-beta.7

2 years ago

2.3.3-beta.2

2 years ago

2.3.3-beta.1

2 years ago

2.2.9

2 years ago

2.2.8

2 years ago

2.2.2-beta.2

2 years ago

2.2.2-beta.1

2 years ago

2.1.21

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.1.19

2 years ago

2.1.20

2 years ago

2.1.16

2 years ago

2.1.17

2 years ago

2.1.18

2 years ago

2.1.14

2 years ago

2.1.15

2 years ago

2.1.12

2 years ago

2.1.13

2 years ago

2.1.11

3 years ago

2.1.10

3 years ago

2.1.9

3 years ago

2.1.8

3 years ago

2.1.6

3 years ago

2.1.7

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.3

3 years ago

2.1.0

3 years ago

2.0.58

3 years ago

2.0.56-beta.1

3 years ago

2.0.56-beta.2

3 years ago

2.0.57

3 years ago

2.0.56

3 years ago

2.0.55

3 years ago

2.0.54

3 years ago

2.0.53

3 years ago

2.0.52

3 years ago

2.0.51

3 years ago

2.0.50

3 years ago

2.0.49

3 years ago

2.0.48

3 years ago

2.0.47

3 years ago

2.0.46

3 years ago

2.0.45

3 years ago

2.0.44

3 years ago

2.0.43

3 years ago

2.0.42

3 years ago

2.0.41

3 years ago

2.0.40

3 years ago

2.0.39

3 years ago

2.0.37

3 years ago

2.0.38

3 years ago

2.0.36

3 years ago

2.0.35

3 years ago

2.0.34

3 years ago

2.0.33

3 years ago

2.0.32

3 years ago

2.0.31

3 years ago

2.0.30

3 years ago

2.0.29

3 years ago

2.0.28

3 years ago

2.0.27

3 years ago

2.0.26

3 years ago

2.0.25

3 years ago

2.0.24

3 years ago

2.0.23

3 years ago

2.0.22

3 years ago

2.0.21

3 years ago

2.0.20

3 years ago

2.0.19

3 years ago

2.0.17

3 years ago

2.0.18

3 years ago

2.0.16

3 years ago

2.0.15

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.12

3 years ago

2.0.11

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.8

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

0.0.48

3 years ago

0.0.47

3 years ago

0.0.46

3 years ago

0.0.44

3 years ago

0.0.45

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.41

3 years ago

0.0.40

3 years ago

0.0.39

3 years ago

0.0.38

3 years ago

0.0.37

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.36

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago