A highlighter built with Shiki for the command line.
pnpm add shiki-command-line
import { highlightCode } from "shiki-command-line"
console.log(
await highlightCode("<div>Hello, World!</div>", {
lang: "html",
theme: "github-dark-default",
}),
)
console.log(
await highlightCode(
`body {
content: "Hello, World!";
}`,
{
lang: "css",
theme: "github-dark-default",
},
),
)
console.log(
await highlightCode('console.log("Hello, World!")', {
lang: "js",
theme: "github-dark-default",
}),
)