Skip to content

Commit 905181b

Browse files
authored
[Agent] cli: print --version (#1389)
1 parent 917b66e commit 905181b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/mcp-client/cli.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import * as readline from "node:readline/promises";
33
import { stdin, stdout } from "node:process";
44
import { join } from "node:path";
55
import { homedir } from "node:os";
6-
import { Agent } from "./src";
76
import type { StdioServerParameters } from "@modelcontextprotocol/sdk/client/stdio.js";
8-
import { ANSI } from "./src/utils";
97
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";
1011

1112
const MODEL_ID = process.env.MODEL_ID ?? "Qwen/Qwen2.5-72B-Instruct";
1213
const PROVIDER = (process.env.PROVIDER as InferenceProvider) ?? "nebius";
@@ -37,6 +38,11 @@ if (process.env.EXPERIMENTAL_HF_MCP_SERVER) {
3738
}
3839

3940
async function main() {
41+
if (process.argv.includes("--version")) {
42+
console.log(packageVersion);
43+
process.exit(0);
44+
}
45+
4046
if (!process.env.HF_TOKEN) {
4147
console.error(`a valid HF_TOKEN must be present in the env`);
4248
process.exit(1);

0 commit comments

Comments
 (0)