If you want to play around with note revisions (if they are still enabled and still exist) then you can use this guide Restoring Deleted Notes
The notes in the terminal app are identical to the ones in the desktop app, in fact I'm pretty sure you can just transplant the sqlite database between them. Just make sure you don't open the application without making sure you don't accidentally sync it (i.e. disconnect from network etc.)
You should also be able to just export from the terminal app to .jex using export
like joplin export ./test.jex --format jex