Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

fix: correct version display and add upgrade to help text (#47)

Riley Thompson61399a53c33f
diff --git a/ix-cli/src/cli/commands/upgrade.ts b/ix-cli/src/cli/commands/upgrade.ts
index c645b9a0..06d34337 100644
--- a/ix-cli/src/cli/commands/upgrade.ts
+++ b/ix-cli/src/cli/commands/upgrade.ts
@@ -18,7 +18,7 @@ interface VersionCache {
function getCurrentVersion(): string {
try {
const pkg = JSON.parse(
- readFileSync(join(__dirname, "../../package.json"), "utf-8")
+ readFileSync(join(__dirname, "../../../package.json"), "utf-8")
);
return pkg.version || "0.0.0";
} catch {
diff --git a/ix-cli/src/cli/help-text.ts b/ix-cli/src/cli/help-text.ts
index e173baeb..ddebdafd 100644
--- a/ix-cli/src/cli/help-text.ts
+++ b/ix-cli/src/cli/help-text.ts
@@ -26,6 +26,7 @@ System:
doctor Check system health
docker <action> Manage the IX backend containers
reset Wipe all graph data for a clean re-ingest
+ upgrade Upgrade ix CLI and backend to the latest version
`;
const FOOTER = `Use "ix help advanced" for low-level graph commands.
diff --git a/ix-cli/src/cli/main.ts b/ix-cli/src/cli/main.ts
index c17bff07..0ab31377 100644
--- a/ix-cli/src/cli/main.ts
+++ b/ix-cli/src/cli/main.ts
@@ -10,7 +10,7 @@ import { join } from "path";
let cliVersion = "0.0.0";
try {
- const pkg = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
+ const pkg = JSON.parse(readFileSync(join(__dirname, "../../package.json"), "utf-8"));
cliVersion = pkg.version || "0.0.0";
} catch {}