Skip to content

Commit 527a049

Browse files
committed
CLI: read version from package.json instead of hardcoding
1 parent 64b8966 commit 527a049

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/cli/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ import { GRACEFUL_SHUTDOWN_TIMEOUT_MS, MAX_PASSWORD_LEN } from '@/lib/defaults';
1313

1414
const program = new Command();
1515

16+
const pkgJsonPath = path.resolve(__dirname, '../../package.json');
17+
const pkgVersion: string = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8')).version;
18+
1619
program
1720
.name('graphmemory')
1821
.description('MCP server for semantic graph memory from markdown docs and source code')
19-
.version('1.3.1');
22+
.version(pkgVersion);
2023

2124
const parseIntArg = (v: string) => parseInt(v, 10);
2225

0 commit comments

Comments
 (0)