CLI Command Reference

MDB CLI Command Reference

These are the descriptions for each of the MDB CLI commands. You can also see basic help in your terminal with mdb help.

mdb help

Show the help prompt.

            $ mdb help

mdb update

Update the mdb-cli package to the latest version. It will ask you what package manager do you use first.

              $ mdb update

mdb version|-v|--version

Check the currently installed version of the mdb-cli package. It will ask you what package manager do you use first.

              $ mdb version
              $ mdb -v
              $ mdb --version

mdb register

Create your MDB account. It will ask you to provide your name, username, email and password. You will be automatically logged in.

              $ mdb register

mdb login [OPTIONS]

Log in to the CLI using your MDB account. It will ask you to provide the username and password. If you use --method=[provider] flag, it will open a browser window and ask to paste the code displayed on the screen after successful authentication.

            --method    sign in using social media. Possible values: google, facebook, twitter

            $ mdb login
            $ mdb login --method=google
            $ mdb login --method=facebook
            $ mdb login --method=twitter

mdb logout

Log out from the CLI.

              $ mdb logout

mdb list

List packages that are available on your account. If available, Yes will be displayed, No otherwise (also, the link to the product page will be displayed).
These are the packages that you can use to initialize your project.

              $ mdb list

mdb init [OPTIONS]

Initialize the starter project using one of the packages available on your account. The list of the packages can be seen using mdb list command. You won't be able to initialize your project using an unavailable package.

            -n, --name    set the name of your project right after initializing it
            -b, --blank   initialize blank project

            $ mdb init
            $ mdb init -n my-first-project
            $ mdb init --blank

mdb set-name [name]

Set the name of your project. It only changes the name locally in your local package.json file. The changes will take effect on the remote server after running mdb publish command.

After running this command, the first mdb publish will cause the new copy of your project to be published under the new name. The old project with the old name will still exist. In order to rename the project, you need to run mdb rename command.

              $ mdb set-name [name]

              $ mdb set-name
              $ mdb set-name new-project-name

mdb create

Create the Git repository on our GitLab server for the current project. It allows you to use MDB Go pipeline to deploy your project on our remote server and track the project builds.

              $ mdb create

mdb publish [OPTIONS]

Upload your current project to our remote server and access it under similar link:<username>/<project-name>/.
Use this command to either upload a new project or update the existing project with the latest changes.

You can publish your project in the two ways.

First and recommended is to use MDB Go pipeline. It means that your project will be using GitLab repository and Jenkins job to be deployed on our FTP server. In short, using this option means that your project will have configured CI/CD pipeline with all its advantages. It works like that by default.

Second way is to simply upload your files directly to the FTP server. That way you loose all of the advantages of having CI/CD configured for your project. In order to go that way you need to add --ftp parameter.

              --ftp         do not use MDB Go pipeline. Will upload directly to the remote server surpassing the automated build option
              --test, -t    before publishing, run the "test" script defined in the "package.json" file. If the script returns non-zero exit code, the project will not be published

              $ mdb publish
              $ mdb publish -t
              $ mdb publish --ftp
              $ mdb publish --ftp -t

mdb unpublish [name]

Remove your project from the remote server.

If you are using our MDB Go pipeline, your project will still exist as the GitLab repository. The Jenkins job will also remain untouched. However, if you are not using our CI/CD setup, you will have only your local copy of the project available after running this command.

              $ mdb unpublish [name]

              $ mdb unpublish
              $ mdb unpublish my-project-name

mdb projects

Display the list of all your published projects.

              $ mdb projects

mdb get [name]

Clone your project into the local machine.

This command is applicable only for projects that are using our GitLab repository. You cannot download a project that does not have a GitLab repository connected. To create and connect the GitLab repository to your project use mdb create command.

              $ mdb get [name]

              $ mdb get
              $ mdb get my-project-name

mdb rename [name]

Rename the current project both locally and remotely.

This command will change the project name in the package.json file and on the remote server. The local project directory name will remain unchanged.

              $ mdb rename [name]

              $ mdb rename
              $ mdb rename new-project-name

mdb set-domain-name [name]

Set the custom domain name which the current project will be available under. It requires you to configure the DNS record (A) in your domain name provider settings.

This command will modify the package.json file only. The changes will take effect after running mdb publish command.

              $ mdb set-domain-name [name]

              $ mdb set-domain-name
              $ mdb set-domain-name

mdb unset-domain-name

Unset the domain name for the current project.

This command will modify the package.json file only. The changes will take effect after running mdb publish command.

              $ mdb unset-domain-name

mdb orders

Display the list of your orders on the MDB site.

              $ mdb orders