Compare commits

..

2 Commits

Author SHA1 Message Date
996105f9cd Add usage message for interactive terminal 2026-03-30 09:13:51 -07:00
4319229596 +x 2026-03-30 08:18:14 -07:00

6
src/cli.ts Normal file → Executable file
View File

@ -1,9 +1,15 @@
#!/usr/bin/env bun
import { isatty } from "node:tty"
import { renderMarkdown } from "./index"
const args = process.argv.slice(2)
if (args.length === 0 && isatty(0)) {
process.stderr.write(`Usage: tm <file>\n tm < file\n command | tm\n`)
process.exit(0)
}
let input: string
if (args.length > 0 && args[0] !== "-") {