I had to migrate a web site from Foswiki to Wiki.js and I didn't want to copy/paste. I couldn't find an easy way to import things, so I wrote one. I called it 'jsw' and it's patterned after other commands like the aws command line or Xen's xe command. It has a bunch of subcommands that each have subcommands. So, for example a command like:
jsw page cp home/Welcome.md
would find a local file named Welcome.md, copy it up to the wiki, set its type to markdown, and set its path to /home/Welcome. (Filesystem on your local device needs to match what you want the path to be on the wiki, for now).
A copy of the output of 'jsw page ls --sort UPDATED --order DESC' is attached (with a few small redactions).
This is a clunky first effort. I'm not a super good developer, and it's incomplete. But it does work and I used it to copy up a bunch of pages and assets. So I'm sharing it in case others want to use it or maybe extend it some. For now it only copies up from your local device to the wiki. No copying down. It also cannot rename anything, even though the APIs could. I've just got some basic cp, ls, and rm functionality built.
Since pages and assets behave pretty differently, it has 2 subcommands ('jsw page' and 'jsw asset') that deal with them. It's released under GPL3 license. Code is here:
Sorry if this isn't the right place to sorta announce this thing. It's not a bug and it's not a question. :)