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.


        EXAMPLES
            $ mdb help
      

mdb update

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


          EXAMPLES
              $ 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.


          EXAMPLES
              $ 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.


          EXAMPLES 
              $ mdb register
        

Note: Social login not supported yet!


mdb login

Log in to the CLI using your MDB account. It will ask you to provide the username and password.


          EXAMPLES
              $ mdb login
        

Note: Social login not supported yet!


mdb logout

Log out from the CLI.


          EXAMPLES
              $ 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.


          EXAMPLES
              $ 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.


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

        EXAMPLES
            $ 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.

Note
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.


          USAGE
              $ mdb set-name [name]

          EXAMPLES
              $ 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.


          USAGE
              $ mdb create
        

mdb publish [OPTIONS]

Upload your current project to our remote server and access it under similar link: https://mdbgo.dev/<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.


          OPTIONS
              --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

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

mdb unpublish [name]

Remove your project from the remote server.

Note
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.


          USAGE
              $ mdb unpublish [name]

          EXAMPLES
              $ mdb unpublish
              $ mdb unpublish my-project-name
        

mdb projects

Display the list of all your published projects.


          EXAMPLES
              $ mdb projects
        

mdb get [name]

Clone your project into the local machine.

Note
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.


          USAGE
              $ mdb get [name]

          EXAMPLES
              $ mdb get
              $ mdb get my-project-name
        

mdb rename [name]

Rename the current project both locally and remotely.

Note
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.


          USAGE
              $ mdb rename [name]

          EXAMPLES
              $ 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.

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


          USAGE
              $ mdb set-domain-name [name]

          EXAMPLES
              $ mdb set-domain-name
              $ mdb set-domain-name example.com
        

mdb unset-domain-name

Unset the domain name for the current project.

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


          EXAMPLES
              $ mdb unset-domain-name
        

mdb orders

Display the list of your orders on the MDB site.


          EXAMPLES
              $ mdb orders