File tree Expand file tree Collapse file tree 2 files changed +420
-90
lines changed
Expand file tree Collapse file tree 2 files changed +420
-90
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,11 @@ import {
2828import { createRagApp } from './commands/init/createRagApp.js' ;
2929import { isConfigValid } from './utils/validation.js' ;
3030import { wrapCommand } from './utils/error-handling.js' ;
31+ import { readFileSync } from 'fs' ;
32+ import { dirname , resolve } from 'path' ;
3133
32- const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
34+ const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
35+ const packageJson = JSON . parse ( readFileSync ( resolve ( __dirname , '../package.json' ) , 'utf8' ) ) ;
3336
3437// Configuration setup
3538const CONFIG_PATH = process . env . CONFIG_PATH || (
6467program
6568 . name ( 'mongodb-rag' )
6669 . description ( 'MongoDB RAG CLI for managing vector search and RAG operations' )
67- . version ( process . env . npm_package_version || '0.0.0' ) ;
70+ . version ( packageJson . version ) ;
6871
6972// Create RAG App
7073program
You can’t perform that action at this time.
0 commit comments