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")