import fs from "fs/promises"; import path from "path"; import url from "url"; export const description = "Prints out the version of the tool."; export const options = []; export const main = async (opts) => { const pkgfile = new URL("../package.json", import.meta.url); const info = JSON.parse(await fs.readFile(pkgfile)); console.log(info.version); }