Is there a way to get a crash report (not a core dump) for a command line program?
Looking back, past crashes are logged in the log system, and also individual dump files are saved for about a month in /Library/Logs/DiagnosticReports
Looking forward, to cause them is a bit harder and risky. You could try issuing a SIGABRT or SIGQUIT signal if you know the process:

How to crash an application to produce Crash Report

Something more generic would be the general system diagnostics will capture  much more. The main difference in these two options is a crash has an end point, system diagnosis grabs an arbitrary snapshot, so it isn’t necessarily as final as a crash. I don’t recommend forcing an app to crash and certainly don’t recommend forcing a kernel panic but you could try both. Why not start with a general diagnostic dump:
sudo sysdiagnose

You can pass a process ID or process name to sysdiagnose or also trigger it from the Activity Monitor app.

https://support.apple.com/guide/activity-monitor/welcome/mac

If you need to halt the program or process, try Instruments from Xcode.

https://apps.apple.com/us/app/xcode/id497799835?mt=12