ex-brain 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -109,7 +109,7 @@ Ask natural language questions and get answers based on your knowledge base:
109
109
 
110
110
  ```bash
111
111
  # Basic Q&A
112
- ex-brain query --llm "What is the main idea of River AI's product?"
112
+ ebrain query --llm "What is the main idea of River AI's product?"
113
113
 
114
114
  # Control context depth
115
115
  ebrain query --llm "What happened in Q4?" --context-limit 3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ex-brain",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "CLI personal knowledge base powered by seekdb",
5
5
  "module": "src/cli.ts",
6
6
  "type": "module",
@@ -1,4 +1,5 @@
1
1
  import { basename, resolve } from "node:path";
2
+ import { readFileSync } from "node:fs";
2
3
  import { Command } from "commander";
3
4
  import { DEFAULT_DB_NAME, inferTypeFromSlug, slugToTitle, normalizeLongSlug, slugify } from "../config";
4
5
  import { BrainDb } from "../db/client";
@@ -168,8 +169,11 @@ async function resolveInput(
168
169
  // ---------------------------------------------------------------------------
169
170
 
170
171
  export function buildProgram(): Command {
172
+ const pkgPath = new URL("../../package.json", import.meta.url);
173
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
171
174
  const program = new Command("ebrain")
172
175
  .description("Personal knowledge base CLI powered by seekdb")
176
+ .version(pkg.version, "-V, --version", "output the version number")
173
177
  .addHelpText(
174
178
  "after",
175
179
  `