You can use the following command to generate a hash from a plain text password before inserting it in the database:
php -r "echo password_hash('correcthorsebatterystaple', PASSWORD_BCRYPT) . PHP_EOL;"
correcthorsebatterystaple is the password.
Important: using the command above will most likely end up logging up the password in plain text in your bash history. Using the PHP interactive console has the same issue. So I'd recommend creating a temporary random password that way, then set a new secure password via Flarum's password change system.
Other options to not log the password include running the code from a file, or re-writing the code to prompt for the password during runtime.
Or of course, just use an online hasher. But who trusts those? 😇