In PyCharm, the accepted answer works but instead of
streamlit.cli
use
streamlit.web.cli
as module (Streamlit v.1.45.0).