File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ import * as readline from "node:readline/promises";
3
3
import { stdin , stdout } from "node:process" ;
4
4
import { join } from "node:path" ;
5
5
import { homedir } from "node:os" ;
6
- import { Agent } from "./src" ;
7
6
import type { StdioServerParameters } from "@modelcontextprotocol/sdk/client/stdio.js" ;
8
- import { ANSI } from "./src/utils" ;
9
7
import type { InferenceProvider } from "@huggingface/inference" ;
8
+ import { ANSI } from "./src/utils" ;
9
+ import { Agent } from "./src" ;
10
+ import { version as packageVersion } from "./package.json" ;
10
11
11
12
const MODEL_ID = process . env . MODEL_ID ?? "Qwen/Qwen2.5-72B-Instruct" ;
12
13
const PROVIDER = ( process . env . PROVIDER as InferenceProvider ) ?? "nebius" ;
@@ -37,6 +38,11 @@ if (process.env.EXPERIMENTAL_HF_MCP_SERVER) {
37
38
}
38
39
39
40
async function main ( ) {
41
+ if ( process . argv . includes ( "--version" ) ) {
42
+ console . log ( packageVersion ) ;
43
+ process . exit ( 0 ) ;
44
+ }
45
+
40
46
if ( ! process . env . HF_TOKEN ) {
41
47
console . error ( `a valid HF_TOKEN must be present in the env` ) ;
42
48
process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments