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

Usage:

        
            
        mdb [entity] [command] [args] [flags]

        EXAMPLES:
        // login to mdb
        mdb login username

        // initialize new empty project
        mdb blank init

        //publish project
        mdb publish
      
        
    

Entities

Entity Description
backend Manage backend projects
wordpress Manage WordPress projects
frontend Manage frontend projects
blank Manage custom (frontend) projects
database Manage databases
repo Manage GitLab repository
config Manage project configuration
order Manage created orders
app Manage MDB CLI app
user Manage users

Available commands

Command Description
help Display this help info. Use with entities: <none>, app (default)
update Update MDB CLI app to the latest version. Use with entities: <none>, app (default)
version Check currently installed version of MDB CLI. Use with entities: <none>, app (default)
register Create a new MDB account. Use with entities: <none>, user (default)
login Log in to your MDB account. Use with entities: <none>, user (default)
logout Log out from MDB CLI. Use with entities: <none>, user (default)
ls List entity content. Use with entities: <none>, starter, frontend (default), backend, database, wordpress, order
init Create something of entity type. Use with entities: <none>, starter, blank, frontend (default), backend, wordpress, database, repo
publish Publish project. Use with entities: <none>, frontend (default), backend, wordpress
get Download a project to the current directory. Use with entities: backend, frontend, wordpress
info Display info about entity. Use with entities: backend, database
delete Completely delete an entity. Use with entities: backend, database, frontend, wordpress
kill Stop a project. Use with entities: backend
destroy Alias for `kill`
logs Display logs of a project. Use with entities: backend
rename Change the project name locally and on public server. Use with entities: <none>

mdb help

Display this help info. Use with entities: <none>, app (default)

        
            
        $ mdb help
      
        
    

mdb update

Update the mdb-cli package to the latest version.

        
            
          $ 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

          ALIASES
            $ 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
        
        
    

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.

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

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

mdb logout

Log out from the CLI.

        
            
          EXAMPLES
            $ mdb logout
        
        
    

mdb [ENTITY] ls

List entity content. Use with entities: <none>, starter, frontend (default), backend, database, wordpress, order
If you use mdb ls without entity it will by default list your frontend projects.
You can use mdb ls -a which will list all projects (frontend, backend, wordpress), databases and orders.

        
            
          EXAMPLES
            $ mdb backend ls    list all backend projects
            $ mdb ls            list all frontend projects
            $ mdb ls -a         list all
        
        
    

mdb frontend ls (default)

lists your frontend projects. MDBGO supports seamlessly frontend projects built in: JavaScript, Vue, React & Angular. (MDBGO also supports backend projects, backend docs below)

        
            
        mdb frontend ls
      
        
    

mdb backend ls

lists your backend projects. MDBGO supports seamlessly backend projects built in: PHP and Node.js. In order to deploy backend project use mdb mdb backend publish --platform

        
            
        mdb backend ls
      
        
    

mdb wordpress ls

lists your wordpress projects.

        
            
        mdb wordpress ls
      
        
    

mdb database ls

lists your databases.

        
            
        mdb database ls
      
        
    

mdb [ENTITY] init [OPTIONS]

Initialize new entity of a kind. Available entities: starter, blank, frontend (default), backend, wordpress, database, repo

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

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

mdb frontend init

Initialize frontend project. Displays list of available frontend starters.

        
            
        mdb frontend init
      
        
    

mdb backend init

Initialize backend project. Displays list of available backend starters.

        
            
        mdb backend init
      
        
    

mdb blank init

Initialize blank (empty) project. You can choose either yarn or npm

        
            
        mdb blank init
      
        
    

mdb wordpress init

Initialize Wordpress instance.

        
            
        mdb wordpress init
      
        
    

Note: This command should be run inside [...]/wp-content/themes directory. Once you initialize project inside wp-content/themes folder you can activate theme on your local WordPress instance.

mdb database init

Initialize database. You can choose either SQL (MySQL) or no-SQL (Mongo).

        
            
        mdb database init
      
        
    

mdb repo init

Initialize a repo.

        
            
        mdb repo init
      
        
    

mdb publish [OPTIONS]

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

Note: In order to deploy backend project you have to use -p flag and provide correct platform. Otherwise mdb will publish your project as static one. Check backend publish docs for list of supported technologies.

        
            
          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
            --p           specify backend platform
          EXAMPLES
            $ mdb publish
            $ mdb publish -t
            $ mdb publish --ftp
            $ mdb publish --ftp -t
            $ mdb backend publish -p <platform> </platform>
        
        
    

mdb [frontend|backend|wordpress] publish --ftp

Use --ftp flag to upload directly to FTP.

        
            
          mdb publish --ftp
        
        
    

mdb [frontend|backend] publish -t

Run tests (execute "test" script defined in the package.json)

Only available with backend and frontend

        
            
          mdb publish --test          publish project as frontend and run tests
          mdb backend publish --test  publish backend project and run tests
        
        
    

mdb backend publish -p

Publish backend project. Use -p flag to specify backend platform. Allowed platforms: node8, node10, node12, php7.2, php7.3, php7.4, php-laravel

        
            
          mdb publish --p node10
          mdb backend publish --p php7.3
        
        
    

mdb get -n [name]

Clone your project into the local machine.

If your project has repo connected it will download project from git server. Otherwise it will download latest version from FTP.

        
            
          USAGE
            $ mdb get -n [name]

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

mdb [entity] info

Displays info about entity (current status). Use with backend/database.

        
            
          USAGE
            $ mdb frontend info
            $ mdb backend info
        
        
    

mdb backend info

Lists your backend projects. Once user choose one application from the list, displays information about the app.

        
            
        mdb backend info
      
        
    

mdb database info

Lists your database projects. Once user choose one application from the list, displays information about the app.

        
            
        mdb database info
      
        
    

mdb delete -n [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 delete -n [name]

          EXAMPLES
            $ mdb delete
            $ mdb delete -n my-project-name
        
        
    

mdb kill

Stop a backend project.

        
            
          EXAMPLES
            $ mdb backend kill
        
        
    

mdb logs

Display logs of a given backend project.

        
            
          EXAMPLES
            $ mdb backend logs
        
        
    

mdb rename -n [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 -n [name]

          EXAMPLES
            $ mdb rename
            $ mdb rename -n new-project-name
        
        
    

mdb config

mdb config command allows you to :

  • Add custom domain (mydomain.com) to your project
  • Change password to the database

        
            
          EXAMPLES
            //Update database password
            $ mdb database config password <new_password>

            // Set domain for a project
            $ mdb config domain <mydomain.com>
        
        
    

mdb orders

Display the list of your orders on the MDB site.

        
            
          EXAMPLES
            $ mdb orders
        
        
    

Access via FTP

You can access your projects via FTP protocol. You can use i.e. Filezilla

        
            
          CONFIG
            host: ftp.mdbgo.com
            username: <your_mdb_username>
            password: <your_mdb_password>
            port: 21