From 040c3a8c47968c84bc2dd21d01f0c1aaa30d4d35 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 10 Mar 2026 10:18:54 -0700 Subject: [PATCH] version --- src/cli/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cli/index.ts b/src/cli/index.ts index 82f45b5..2a5e8ce 100755 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -43,9 +43,12 @@ async function findShoutFiles(paths: string[]): Promise { return files.sort() } +import pkg from "../../package.json" + program .name("shout") .description("$ shell output tester") + .version(pkg.version) program .command("test") @@ -154,6 +157,13 @@ program process.exit(failures.length > 0 ? 1 : 0) }) +program + .command("version") + .description("Print the version") + .action(() => { + console.log(pkg.version) + }) + program .command("example") .description("Print an example .shout file")