shabti 1.12.1 → 1.13.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shabti",
3
- "version": "1.12.1",
3
+ "version": "1.13.0",
4
4
  "description": "Demo CLI tool — showcasing npm-publishable CLI structure",
5
5
  "type": "module",
6
6
  "main": "native.cjs",
@@ -4,7 +4,7 @@ import { success } from "../utils/style.js";
4
4
  export function registerHello(program) {
5
5
  program
6
6
  .command("hello")
7
- .description("Greet someone")
7
+ .description("Greet someone (demo)")
8
8
  .argument("<name>", "Name to greet")
9
9
  .option("-s, --shout", "Shout the greeting")
10
10
  .action((name, opts) => {
@@ -18,7 +18,7 @@ const STATUS_COLOR = {
18
18
  export function registerList(program) {
19
19
  program
20
20
  .command("list")
21
- .description("Show sample task list")
21
+ .description("Show sample task list (demo)")
22
22
  .option("-j, --json", "Output as JSON")
23
23
  .option("-f, --filter <status>", "Filter by status")
24
24
  .action((opts) => {
@@ -4,7 +4,7 @@ import { success } from "../utils/style.js";
4
4
  export function registerSpin(program) {
5
5
  program
6
6
  .command("spin")
7
- .description("Demo async operation with spinner")
7
+ .description("Demo async operation with spinner (demo)")
8
8
  .option("-d, --duration <ms>", "Spinner duration in ms", "2000")
9
9
  .action(async (opts) => {
10
10
  const ms = parseInt(opts.duration, 10);
@@ -14,15 +14,23 @@ const DEFAULT_CONFIG = {
14
14
  collection_name: "shabti",
15
15
  };
16
16
 
17
+ /** Env var overrides (highest priority). */
18
+ function envOverrides() {
19
+ const o = {};
20
+ if (process.env.SHABTI_QDRANT_URL) o.qdrant_url = process.env.SHABTI_QDRANT_URL;
21
+ return o;
22
+ }
23
+
17
24
  export function loadConfig() {
25
+ let config = DEFAULT_CONFIG;
18
26
  if (existsSync(CONFIG_PATH)) {
19
27
  try {
20
- return { ...DEFAULT_CONFIG, ...JSON.parse(readFileSync(CONFIG_PATH, "utf8")) };
28
+ config = { ...config, ...JSON.parse(readFileSync(CONFIG_PATH, "utf8")) };
21
29
  } catch {
22
- return DEFAULT_CONFIG;
30
+ // keep defaults
23
31
  }
24
32
  }
25
- return DEFAULT_CONFIG;
33
+ return { ...config, ...envOverrides() };
26
34
  }
27
35
 
28
36
  export function saveConfig(config) {
package/src/index.js CHANGED
@@ -67,7 +67,7 @@ function buildProgram() {
67
67
  const program = new Command();
68
68
  program
69
69
  .name("shabti")
70
- .description("Demo CLI toolshowcasing npm-publishable CLI structure")
70
+ .description("Agent Memory OSsemantic memory for AI agents")
71
71
  .version(version);
72
72
  registerChat(program);
73
73
  registerConfig(program);