Skip to content

Commit 688b8cd

Browse files
committed
feat: cli version flag
1 parent 0583f4c commit 688b8cd

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apps/cli/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Commands
1818
status Show corpus statistics
1919
2020
Options
21-
--help Show help for a command
21+
--help, -h Show help for a command
22+
--version, -v Show version
2223
2324
Examples
2425
corpus scrape --crawl 3 --batch 100
@@ -35,6 +36,11 @@ async function main() {
3536
process.exit(0);
3637
}
3738

39+
if (command === "--version" || command === "-v") {
40+
console.log(VERSION);
41+
process.exit(0);
42+
}
43+
3844
const commandArgs = args.slice(1);
3945

4046
switch (command) {

0 commit comments

Comments
 (0)