Daily use bench commands
Bench Commands
restore default requirment
bench setup requirements
create bench
bench init {name} --frappe-branch version-15
download all apps
bench get-app payments --branch version-15 (&&)
bench get-app erpnext --branch version-15
from github account
bench get-app {url}
example
bench get-app https://github.com/yasser1248/translations_ar_eg.git
if the app is sercet it asks me for a password and its in puplice foldar
$ bench restart
$ bench --site {site} clear-cache
$ bench --site {site} build
$ bench --site {site} migrate
$ bench init frappe-bench : This will create a directory named
$ bench start: start the Frappe web server by this command
$ bench new-app {app-name}: create app
$ bench new-site {site-name} : create a new site
$ bench --site {library.test} add-to-hosts: tell our operating system that library.test should point to localhost
$ bench --site {site-name} install-app {app-name}: To install our app on our site
$ bench --site {site-name} list-apps: should see apps-name to confirm if the app was installed
$ bench --site {sitename} set-admin-password {new-passowrd}: Change Password
$ bench -- site {sitename} restore {path/}
$ bench migrate
$ bench build
$ bench --site {site name} migrate OR
$ bench --site {site name} migrate
$ bench use {site name}: make a specific site a default
$bench --site {site name } clear-cach
$bench --site {site name } clear-website-cach
$bench export-fixtures //: to export fixtures | must type ( fixtures = ["Custom Field"] ) first in "hooks.py" file.
bench export-fixtures --app {APP}
to enable developer mode
bench set-config developer_mode 1
to access to db
bench mariadb
restart all server
SO DANGEROUS
sudo reboot
bench enable-scheduler
bench doctor (check this status)
bench update --reset --no-backup
bench console
To Kill posrts -- you can use stop.py script instead
sudo lsof -t -i tcp:12103 -s tcp:listen | sudo xargs kill
CLI Commands
to find a file named {name}
find ~/{frappe-bench} -iname "script_report_tutorial*"
find {location} -iname "file_name" ===> {.} (to indcate current directory)