jinzd-ai-cli 0.3.4 → 0.3.6

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.
@@ -8,7 +8,7 @@ import { platform } from "os";
8
8
  import chalk from "chalk";
9
9
 
10
10
  // src/core/constants.ts
11
- var VERSION = "0.3.4";
11
+ var VERSION = "0.3.6";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
@@ -16,7 +16,7 @@ import {
16
16
  SUBAGENT_MAX_ROUNDS_LIMIT,
17
17
  VERSION,
18
18
  runTestsTool
19
- } from "./chunk-HUQVG74X.js";
19
+ } from "./chunk-OQK3WSFD.js";
20
20
 
21
21
  // src/config/config-manager.ts
22
22
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.3.4";
9
+ var VERSION = "0.3.6";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  theme,
37
37
  truncateOutput,
38
38
  undoStack
39
- } from "./chunk-6YBF647F.js";
39
+ } from "./chunk-RS5ALOXF.js";
40
40
  import {
41
41
  AGENTIC_BEHAVIOR_GUIDELINE,
42
42
  AUTHOR,
@@ -56,7 +56,7 @@ import {
56
56
  REPO_URL,
57
57
  SKILLS_DIR_NAME,
58
58
  VERSION
59
- } from "./chunk-HUQVG74X.js";
59
+ } from "./chunk-OQK3WSFD.js";
60
60
 
61
61
  // src/index.ts
62
62
  import { program } from "commander";
@@ -1907,7 +1907,7 @@ ${hint}` : "")
1907
1907
  description: "Run project tests and show structured report",
1908
1908
  usage: "/test [command|filter]",
1909
1909
  async execute(args, _ctx) {
1910
- const { executeTests } = await import("./run-tests-5F4IFT5H.js");
1910
+ const { executeTests } = await import("./run-tests-PGGAA5PE.js");
1911
1911
  const argStr = args.join(" ").trim();
1912
1912
  let testArgs = {};
1913
1913
  if (argStr) {
@@ -5517,7 +5517,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5517
5517
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5518
5518
  process.exit(1);
5519
5519
  }
5520
- const { startWebServer } = await import("./server-AXKGLNOI.js");
5520
+ const { startWebServer } = await import("./server-2MJUVLUU.js");
5521
5521
  await startWebServer({ port, host: options.host });
5522
5522
  });
5523
5523
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
@@ -5638,7 +5638,106 @@ program.command("sessions").description("List recent conversation sessions").act
5638
5638
  }
5639
5639
  console.log();
5640
5640
  });
5641
- program.command("hub [topic]").description("Start multi-agent hub (discuss / brainstorm with multiple AI roles)").option("--preset <name>", "Use a built-in role preset (default: tech-review)").option("--roles <file>", "Load roles from a JSON file").option("--provider <name>", "Override default AI provider").option("-m, --model <name>", "Override default model").option("--max-rounds <n>", "Max discussion rounds (default: 10)").option("--presets", "List available role presets").option("--context <files...>", "Inject external document(s) as context for all agents (e.g. README.md spec.md)").option("--distributed", "Start WebSocket server so remote aicli instances can join as agents").option("--port <n>", "WebSocket port for distributed mode (default: 9527)", "9527").action(async (topic, options) => {
5641
+ program.command("help").description("Show a comprehensive guide to all aicli features and commands").action(() => {
5642
+ const B = "\x1B[1m";
5643
+ const D = "\x1B[2m";
5644
+ const C = "\x1B[36m";
5645
+ const G = "\x1B[32m";
5646
+ const Y = "\x1B[33m";
5647
+ const M = "\x1B[35m";
5648
+ const R = "\x1B[0m";
5649
+ const lines = [
5650
+ "",
5651
+ `${B} AI-CLI v${VERSION} \u2014 Cross-platform AI Programming Assistant${R}`,
5652
+ `${D} Supports OpenAI, Claude, Gemini, DeepSeek, Zhipu, Kimi, OpenRouter${R}`,
5653
+ "",
5654
+ `${B}${C} \u25A0 LAUNCH MODES${R}`,
5655
+ ` ${G}aicli${R} Interactive REPL (default)`,
5656
+ ` ${G}aicli web${R} Browser-based Web UI`,
5657
+ ` ${G}aicli -p "prompt"${R} Headless single-shot (for scripts/CI)`,
5658
+ ` ${G}aicli hub "topic"${R} Multi-agent collaborative discussion`,
5659
+ ` ${G}aicli join${R} Join a hub as a remote agent`,
5660
+ "",
5661
+ `${B}${C} \u25A0 CLI SUBCOMMANDS${R}`,
5662
+ ` ${G}aicli config${R} Setup wizard (API keys, preferences)`,
5663
+ ` ${G}aicli providers${R} List all providers and status`,
5664
+ ` ${G}aicli sessions${R} List recent conversation sessions`,
5665
+ ` ${G}aicli user <action>${R} User management (list/create/delete)`,
5666
+ "",
5667
+ `${B}${C} \u25A0 STARTUP OPTIONS${R}`,
5668
+ ` ${Y}--provider <name>${R} Set AI provider`,
5669
+ ` ${Y}-m, --model <name>${R} Set model`,
5670
+ ` ${Y}--resume <id>${R} Resume a previous session`,
5671
+ ` ${Y}--allowed-tools <list>${R} Tool whitelist (comma-separated)`,
5672
+ ` ${Y}--blocked-tools <list>${R} Tool blacklist (comma-separated)`,
5673
+ ` ${Y}--no-stream${R} Disable streaming output`,
5674
+ "",
5675
+ `${B}${C} \u25A0 HEADLESS OPTIONS${R}`,
5676
+ ` ${Y}-p, --prompt <text>${R} Send prompt and exit`,
5677
+ ` ${Y}--system <prompt>${R} Override system prompt`,
5678
+ ` ${Y}--json${R} Output as JSON`,
5679
+ ` ${Y}--output-format <fmt>${R} text | streaming-json (NDJSON)`,
5680
+ ` ${D}echo "code" | aicli -p "explain" \u2190 pipe stdin as context${R}`,
5681
+ "",
5682
+ `${B}${C} \u25A0 WEB UI OPTIONS${R}`,
5683
+ ` ${Y}aicli web --port 8080${R} Custom port (default: 3000)`,
5684
+ ` ${Y}aicli web --host 0.0.0.0${R} LAN access (mobile/tablet)`,
5685
+ "",
5686
+ `${B}${C} \u25A0 MULTI-AGENT HUB${R}`,
5687
+ ` ${Y}--preset <name>${R} Role preset (tech-review/brainstorm/code-review/debate)`,
5688
+ ` ${Y}--roles <file>${R} Custom roles JSON file`,
5689
+ ` ${Y}-c, --context <file>${R} Inject context doc (repeatable: -c a.md -c b.md)`,
5690
+ ` ${Y}--distributed${R} Distributed mode (WebSocket, multi-process)`,
5691
+ ` ${Y}--max-rounds <n>${R} Max discussion rounds (default: 10)`,
5692
+ ` ${Y}aicli join --human${R} Join as a human participant`,
5693
+ ` ${Y}aicli hub --presets${R} List available role presets`,
5694
+ "",
5695
+ `${B}${C} \u25A0 REPL COMMANDS (inside aicli)${R}`,
5696
+ ` ${M}/help${R} Full command list`,
5697
+ ` ${M}/provider${R} ${M}/model${R} Switch provider or model on the fly`,
5698
+ ` ${M}/plan${R} Enter read-only planning mode`,
5699
+ ` ${M}/think${R} Toggle Extended Thinking (deep reasoning)`,
5700
+ ` ${M}/review${R} AI code review from git diff`,
5701
+ ` ${M}/test${R} Run tests with structured report`,
5702
+ ` ${M}/init${R} Generate AICLI.md for project context`,
5703
+ ` ${M}/search${R} Search across all session histories`,
5704
+ ` ${M}/compact${R} Compress conversation to save context`,
5705
+ ` ${M}/checkpoint${R} ${M}/fork${R} Save/restore/fork session state`,
5706
+ ` ${M}/undo${R} Undo file operations`,
5707
+ ` ${M}/yolo${R} Skip all tool confirmations`,
5708
+ ` ${M}/mcp${R} Manage MCP server connections`,
5709
+ ` ${M}/skill${R} Manage agent skills`,
5710
+ ` ${M}/memory${R} View/edit persistent memory`,
5711
+ ` ${M}/doctor${R} Health check (keys, config, MCP)`,
5712
+ "",
5713
+ `${B}${C} \u25A0 AI TOOLS (Agentic Mode \u2014 AI uses these autonomously)${R}`,
5714
+ ` ${D}bash read_file write_file edit_file list_dir grep_files glob_files${R}`,
5715
+ ` ${D}web_fetch google_search run_interactive run_tests spawn_agent${R}`,
5716
+ ` ${D}ask_user write_todos save_memory save_last_response + MCP tools${R}`,
5717
+ "",
5718
+ `${B}${C} \u25A0 CONFIGURATION${R}`,
5719
+ ` ${D}Config: ~/.aicli/config.json${R}`,
5720
+ ` ${D}Context: ~/.aicli/AICLI.md (global) | ./AICLI.md (project)${R}`,
5721
+ ` ${D}Memory: ~/.aicli/memory.md${R}`,
5722
+ ` ${D}Skills: ~/.aicli/skills/*.md${R}`,
5723
+ ` ${D}Commands: ~/.aicli/commands/*.md${R}`,
5724
+ ` ${D}Sessions: ~/.aicli/history/*.json${R}`,
5725
+ "",
5726
+ `${B}${C} \u25A0 QUICK EXAMPLES${R}`,
5727
+ ` ${G}aicli${R} ${D}# start REPL${R}`,
5728
+ ` ${G}aicli --provider claude -m claude-sonnet-4-20250514${R} ${D}# specific model${R}`,
5729
+ ` ${G}aicli -p "explain this" < main.py${R} ${D}# headless + file${R}`,
5730
+ ` ${G}aicli web --host 0.0.0.0${R} ${D}# Web UI on LAN${R}`,
5731
+ ` ${G}aicli hub --preset brainstorm "idea"${R} ${D}# multi-agent brainstorm${R}`,
5732
+ ` ${G}aicli hub -c spec.md -c api.md "build it"${R} ${D}# hub + docs context${R}`,
5733
+ "",
5734
+ `${D} Docs: https://github.com/jinzhengdong/ai-cli${R}`,
5735
+ `${D} Issues: https://github.com/jinzhengdong/ai-cli/issues${R}`,
5736
+ ""
5737
+ ];
5738
+ console.log(lines.join("\n"));
5739
+ });
5740
+ program.command("hub [topic]").description("Start multi-agent hub (discuss / brainstorm with multiple AI roles)").option("--preset <name>", "Use a built-in role preset (default: tech-review)").option("--roles <file>", "Load roles from a JSON file").option("--provider <name>", "Override default AI provider").option("-m, --model <name>", "Override default model").option("--max-rounds <n>", "Max discussion rounds (default: 10)").option("--presets", "List available role presets").option("-c, --context <file>", "Inject context document (repeatable: -c a.md -c b.md)", (val, prev) => prev.concat(val), []).option("--distributed", "Start WebSocket server so remote aicli instances can join as agents").option("--port <n>", "WebSocket port for distributed mode (default: 9527)", "9527").action(async (topic, options) => {
5642
5741
  const config = new ConfigManager();
5643
5742
  const registry = new ProviderRegistry();
5644
5743
  await registry.initialize(
@@ -5659,7 +5758,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
5659
5758
  model: options.model,
5660
5759
  maxRounds: options.maxRounds ? parseInt(options.maxRounds, 10) : void 0,
5661
5760
  listPresets: options.presets === true,
5662
- contextFiles: options.context,
5761
+ contextFiles: options.context?.length ? options.context : void 0,
5663
5762
  distributed: options.distributed === true,
5664
5763
  port: options.port ? parseInt(options.port, 10) : void 0
5665
5764
  },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-YYZEZ6BO.js";
4
+ } from "./chunk-U7YCERTR.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-HUQVG74X.js";
5
+ } from "./chunk-OQK3WSFD.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -27,7 +27,7 @@ import {
27
27
  spawnAgentContext,
28
28
  truncateOutput,
29
29
  undoStack
30
- } from "./chunk-6YBF647F.js";
30
+ } from "./chunk-RS5ALOXF.js";
31
31
  import {
32
32
  AGENTIC_BEHAVIOR_GUIDELINE,
33
33
  CONTEXT_FILE_CANDIDATES,
@@ -39,7 +39,7 @@ import {
39
39
  PLAN_MODE_SYSTEM_ADDON,
40
40
  SKILLS_DIR_NAME,
41
41
  VERSION
42
- } from "./chunk-HUQVG74X.js";
42
+ } from "./chunk-OQK3WSFD.js";
43
43
  import {
44
44
  AuthManager
45
45
  } from "./chunk-CPLT6CD3.js";
@@ -1438,7 +1438,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
1438
1438
  case "test": {
1439
1439
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1440
1440
  try {
1441
- const { executeTests } = await import("./run-tests-5F4IFT5H.js");
1441
+ const { executeTests } = await import("./run-tests-PGGAA5PE.js");
1442
1442
  const argStr = args.join(" ").trim();
1443
1443
  let testArgs = {};
1444
1444
  if (argStr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",