jinzd-ai-cli 0.3.4 → 0.3.5
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/dist/{chunk-6YBF647F.js → chunk-GTQRHY5Q.js} +1 -1
- package/dist/{chunk-HUQVG74X.js → chunk-GU5NVLYL.js} +1 -1
- package/dist/{chunk-YYZEZ6BO.js → chunk-SGYQBV2O.js} +1 -1
- package/dist/index.js +103 -4
- package/dist/{run-tests-F5ZKAP6K.js → run-tests-WO3LYFX7.js} +1 -1
- package/dist/{run-tests-5F4IFT5H.js → run-tests-XCNLK66A.js} +1 -1
- package/dist/{server-AXKGLNOI.js → server-I7FDITW7.js} +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
theme,
|
|
37
37
|
truncateOutput,
|
|
38
38
|
undoStack
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-GTQRHY5Q.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-
|
|
59
|
+
} from "./chunk-GU5NVLYL.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-
|
|
1910
|
+
const { executeTests } = await import("./run-tests-XCNLK66A.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-
|
|
5520
|
+
const { startWebServer } = await import("./server-I7FDITW7.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,6 +5638,105 @@ program.command("sessions").description("List recent conversation sessions").act
|
|
|
5638
5638
|
}
|
|
5639
5639
|
console.log();
|
|
5640
5640
|
});
|
|
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}--context <files...>${R} Inject documents as context for all agents`,
|
|
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 --context spec.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
|
+
});
|
|
5641
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("--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) => {
|
|
5642
5741
|
const config = new ConfigManager();
|
|
5643
5742
|
const registry = new ProviderRegistry();
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
spawnAgentContext,
|
|
28
28
|
truncateOutput,
|
|
29
29
|
undoStack
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GTQRHY5Q.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-
|
|
42
|
+
} from "./chunk-GU5NVLYL.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-
|
|
1441
|
+
const { executeTests } = await import("./run-tests-XCNLK66A.js");
|
|
1442
1442
|
const argStr = args.join(" ").trim();
|
|
1443
1443
|
let testArgs = {};
|
|
1444
1444
|
if (argStr) {
|