Needs JOSE npm lib. Easiest thing to do is just install it in a temp working dir.
cd /tmp
npm i jose
node
Inside the REPL:
const jose = await import('jose')
const crypto = await import('crypto')
const key = crypto.generateKeyPairSync('ed25519')
await jose.exportJWK(key.publicKey)
await jose.exportJWK(key.privateKey)