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 +1 -1
- package/package.json +1 -1
- package/src/commands/index.ts +4 -0
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
|
-
|
|
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
package/src/commands/index.ts
CHANGED
|
@@ -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
|
`
|