Skip to content

Commit f2e0606

Browse files
authored
Merge pull request #4 from augmentcode/fix-cli-version
Fix CLI version to read from package.json dynamically
2 parents bcf0b80 + 50eb7ce commit f2e0606

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44
*/
55

66
import { Command } from "commander";
7+
import { createRequire } from "module";
78
import { indexCommand } from "./cmd-index.js";
89
import { searchCommand } from "./cmd-search.js";
910
import { mcpCommand } from "./cmd-mcp.js";
1011
import { listCommand, deleteCommand } from "./cmd-local.js";
1112
import { agentCommand } from "./cmd-agent.js";
1213

14+
const require = createRequire(import.meta.url);
15+
const packageJson = require("../../package.json");
16+
1317
const program = new Command();
1418

1519
program
1620
.name("context-connectors")
1721
.description("Index and search any data source with Augment's context engine")
18-
.version("0.1.0");
22+
.version(packageJson.version);
1923

2024
// Add subcommands
2125
program.addCommand(indexCommand);

0 commit comments

Comments
 (0)