flask --app myproject run looks for an app or application object, and failing that for a create_app or make_app factory, which it calls with no arguments. That automatic discovery is why a project with a factory often works without configuration and then stops working the moment the factory grows a required parameter.
The explicit form is flask --app "myproject:create_app" to name the factory, and flask --app "myproject:create_app('dev')" to pass arguments. The parenthesised call is parsed by Flask, not evaluated as arbitrary Python, so only literals are allowed inside it.
A path with a slash or a .py suffix is treated as a file to import, while a plain name is treated as an importable module, which is the difference between --app app.py and --app app. FLASK_APP holds the same value in the environment. When discovery fails the error names every location it looked in, which is usually enough to tell whether the problem is the import path or the factory signature.