Bench Command Documentations

Hello Admin,
I am fun getting familiar with the frappe framework. I will need help on documentation to understand various bench commands. please where do I go to find it detail for how to use command like below:

frappe [-h] [–make_app DESTINATION APP-NAME] [–install DB-NAME]
[–admin_password ADMIN-PASSWD] [–root_password ROOT-PASSWD]
[–sites_path SITES_PATH] [–install_app APP-NAME]
[–add_to_installed_apps [APP-NAME [APP-NAME …]]]
[–reinstall] [–restore DB-NAME SQL-FILE]
[–with_scheduler_enabled]
[–add_system_manager EMAIL [[FIRST-NAME] [LAST-NAME] …]]
[–port PORT] [–use] [-u [REMOTE [BRANCH …]]]
[–reload_gunicorn] [–patch PATCH-MODULE] [-l] [–sync_all]
[–update_all_sites [REMOTE [BRANCH …]]]
[–reload_doc “MODULE” “DOCTYPE” “DOCNAME”] [-b] [–make_copy]
[-w] [–backup] [–move] [–dest_dir DEST-DIR] [–with_files]
[–domain [DOMAIN [DOMAIN …]]]
[–make_conf [DB-NAME [DB-PASSWORD …]]]
[–make_custom_server_script DOCTYPE] [–init_list DOCTYPE]
[–set_admin_password [ADMIN-PASSWORD [ADMIN-PASSWORD …]]]
[–request URL-ARGS] [–mysql] [–serve] [–profile] [–smtp]
[–python] [–flush_memcache] [–ipython] [–execute FUNCTION]
[–get_site_status] [–update_site_config site-CONFIG-JSON]
[–resize_images PATH] [–clear_web] [–build_website]
[–sync_statics] [–clear_cache] [–reset_perms]
[–clear_all_sessions] [–run_scheduler]
[–celery [CELERY [CELERY …]]]
[–run_scheduler_event all | daily | weekly | monthly]
[–enable_scheduler] [–disable_scheduler]
[–replace SEARCH-REGEX REPLACE-BY FILE-EXTN]
[–export_doc “DOCTYPE” “DOCNAME”]
[–export_doclist DOCTYPE NAME PATH] [–export_csv DOCTYPE PATH]
[–export_fixtures] [–import_doc PATH] [–doctor]
[–purge_all_tasks] [–dump_queue_status]
[–build_message_files]
[–get_untranslated LANG-CODE TARGET-FILE-PATH]
[–update_translations LANG-CODE UNTRANSLATED-FILE-PATH TRANSLATED-FILE-PATH]
[–run_tests] [–app APP-NAME] [-d DOCTYPE] [-m MODULE]
[–tests [TEST FUNCTION [TEST FUNCTION …]]] [–serve_test]
[–driver [DRIVER]] [-f] [–all] [–verbose] [–quiet]
[site]
frappe: error: unrecognized arguments: -site

two hypens --site

Yes I was trying to edit admin password on a multitenent server with sites
I used this

bench frappe --site site2.name --admin_password newpassword

But it did not work, I had to going to mysql and change the password value, but is the a documentation to guide on how to run bench commands

Hi @kdevloper

Use --set_admin_password instead of --admin_password.

Thanks,
Makarand

See bench --help

bench --site [sitename] set-admin-password [password]

Documentation of the bench commands is a real issue.

The basic tasks are good covered by the tutorials. But if you leave the path of the standards you are lost in space.
Then you need the various special options, which are not documented. And diving the “use the force, get the source” is possible, but very time consuming.

It would be nice to have a documentation with all the parameters and all commands of the bench. This would make live more easy. And one does not need hours and days surfing the web for gathering bits of information.

Maybe it could be possible to auto document the stuff using the annotations in the source code and the doc-builder. The same style as creating the documentation of the DocTypes and so far.

@Idat-Consulting You’re right bench --help does explain some things, but not everything. I’m actually working on improving the documentation. But currently you can see additional information bench [command] --help

1 Like

Dear @vjFaLk, thank you very much for the hint. :heart_eyes:

This option i didn’t know before (on each command).

But it could really make sense to write a bench handbook, so new admins have a more flat learningcurve in using this tool. Such a handbook should also cover the real live scenarios, which occur in practice.

True, I plan to make a cheat-sheet for common bench commands.

1 Like

there is an attempt to start a manpage here https://github.com/Community-Apps-for-erpnext/bench_manpage/ feel free to fork and add to this.

my notes are here https://github.com/Community-Apps-for-erpnext/bench_manpage/blob/initial_notes/bench%20commands%20notebook.md