@click.command(u'new-site')
@click.argument(u'site')
@click.option(u'--db-name', help=u'Database name')
@click.option(u'--mariadb-root-username', default=u'root', help=u'Root username for MariaDB')
@click.option(u'--mariadb-root-password', help=u'Root password for MariaDB')
@click.option(u'--admin-password', help=u'Administrator password for new site', default=None)
@click.option(u'--verbose', is_flag=True, default=False, help=u'Verbose')
@click.option(u'--force', help=u'Force restore if site/database already exists', is_flag=True, default=False)
@click.option(u'--source_sql', help=u'Initiate database with a SQL file')
@click.option(u'--install-app', multiple=True, help=u'Install app after installation')
def new_site(site, mariadb_root_username=None, mariadb_root_password=None, admin_password=None, verbose=False, install_apps=None, source_sql=None, force=None, install_app=None, db_name=None):
 frappe.init(site=site, new_site=True)
 _new_site(db_name, site, mariadb_root_username=mariadb_root_username, mariadb_root_password=mariadb_root_password, admin_password=admin_password, verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
 if (len(frappe.utils.get_sites()) == 1):
  use(site)

@ click . command ( u'new-site' ) @ click . argument ( u'site' ) @ click . option ( u'--db-name' , help = u'Database name' ) @ click . option ( u'--mariadb-root-username' , default = u'root' , help = u'Root username for MariaDB' ) @ click . option ( u'--mariadb-root-password' , help = u'Root password for MariaDB' ) @ click . option ( u'--admin-password' , help = u'Administrator password for new site' , default = None ) @ click . option ( u'--verbose' , is_flag = True , default = False , help = u'Verbose' ) @ click . option ( u'--force' , help = u'Force restore if site/database already exists' , is_flag = True , default = False ) @ click . option ( u'--source_sql' , help = u'Initiate database with a SQL file' ) @ click . option ( u'--install-app' , multiple = True , help = u'Install app after installation' ) def new_site ( site , mariadb_root_username = None , mariadb_root_password = None , admin_password = None , verbose = False , install_apps = None , source_sql = None , force = None , install_app = None , db_name = None ) : frappe . init ( site = site , new_site = True ) _new_site ( db_name , site , mariadb_root_username = mariadb_root_username , mariadb_root_password = mariadb_root_password , admin_password = admin_password , verbose = verbose , install_apps = install_app , source_sql = source_sql , force = force ) if ( len ( frappe . utils . get_sites ( ) ) == 1 ) : use ( site )
create a new site in the bench .